View Full Version : C Driver and API for the TLV2543 ADC

03-15-2009, 03:42 AM
I have been using this device (11 channel 12bit ADC operating at 3.3V) for a while and decided to convert my SPIN code to C in part to see what kind oef a performance increase C might provide in an apples - to - apples comparison. Quite significant it turns out. Virtually the same code in pure SPIN would sample each channel at ~152 samples per second (11 channels means 1672 conversions per second). In C this became ~1082 samples per second for each channel (for 11 channels this means 11902 conversions per second). That is a speed increase of just over 7x for C vs SPIN. This bears out the 5x to 10x speed increase generally quoted for C vs SPIN.

I uploaded this Driver and API to OBEX today. It is written solely in C if anyone with ICCV7 wants to take it out for a (ahem ...) ... spin (groan).


03-15-2009, 06:10 AM
OBEX Link: C Driver for TLV2543 12 Bit 11 Channel ADC (http://obex.parallax.com/objects/429/)

Greg LaPolla
03-31-2009, 02:44 AM
would you be willing to also share your spin version? I have been working with several different objects trying to get one of these chips working and I am having very limited success.


03-31-2009, 03:36 AM

Keep those C Objects coming http://forums.parallax.com/images/smilies/smile.gif

03-31-2009, 05:34 AM

can you also post a comparison of the code size for the Spin and the C object?