Has anyone a C code example for reading the BOE's ADC? (AD7993)
Alex.Stanfield
Posts: 198
I'm testing C waters with the BOE and needed an ADC driver.
Unless I missed something, the C learn pages are for the activity board which has a different ADC chip...
So if anyone has a working driver I'll be happy to learn from it.
Thanks!
Alex
PD: I found this thread (http://forums.parallax.com/showthread.php/142801-Anyone-have-examples-of-using-the-Prop-Boe-s-ADC-from-PASM) (see post #10) however I couldn't build it right away
Unless I missed something, the C learn pages are for the activity board which has a different ADC chip...
So if anyone has a working driver I'll be happy to learn from it.
Thanks!
Alex
PD: I found this thread (http://forums.parallax.com/showthread.php/142801-Anyone-have-examples-of-using-the-Prop-Boe-s-ADC-from-PASM) (see post #10) however I couldn't build it right away
Comments
You'll need to mod the #if 0 to #if 1 to try several options to see what works for you.
EDIT: Seems to be the same code from the previous thread... Builds for me with SimpleIDE. What kind of errors are you getting if it's not in fact building???
dgately
Would you be kind enough to pack the whole thing? adc.* i2c.* will be needed (possibly more than that) and I don't have a complete set for that.
Thanks again!
Alex
Unpacking the file in the adc dir with no further modification; this is what I get This is what I have on my project view
The "lib" dir is not in the zip, neither is the "libi2c.a" file
Alex
Alex
I have download adc.zip
unfortunaly I have no Propgcc Toolchain around me yet.
But I read the Makefile and it seems you have to build the adc_driver and i2c_driver first,
then you can use the adc_test.side ...
I try it later if I am at home
Reinhard
Can not test because I have not the hardware.
cheers Reinhard
adcSimpleIDE.zip
dgately
Here it is
Again thanks for your support.
Alex
And thanks for responding with your code. I'll check it out!
dgately