Reading an analogue value in C on a Freescale Freedom KL25Z

After spending the last few days messing with a MCP3002 SPI ADC chip, I’m beginning to wonder if it is not really suitable for my needs after all. Both the SPI libraries I have tried have had problems with excess waiting around transfers, which becomes very significant when each new sample requires a whole new SPI “connection” as well as two bytes of data transfer. It occurs to me that perhaps the alternative plan holds more hope: Do the analogue input on a separate board (preferably one with a built-in high-performance ADC) and transfer partially-digested data in bulk to the Raspberry Pi for analysis and output.

With this in mind (also reminded by Tony Abbey’s recent comments), I have gone back to investigating analogue input on the low-cost but surprisingly powerful Freescale Freedom boards. Not much direct to report at the moment, though. A few hours of getting a “Code Warrior” development environment set up on this machine, and since then I’ve been mainly working through Erich Styger’s comprehensive tutorial on the subject.

I hope I’ll have something a bit more exciting and original to report tomorrow.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *