danny136631 wrote:Can't wait to hear updates from you once you finished setting up your modules.
hi Danny, I received my 'blocks' today from Sparkfun, including the ADC block. I got my ADC block to successfully 'read' my nine push-botton analog keyboard (simple resistor voltage divider) and I have updated my Intel Edison photo journal on MoHPC with the details; some of which I will post here, but here is the link:
http://www.hpmuseum.org/forum/thread-34 ... l#pid32230
Read through that post. There are two hi-res pics (just click the pic to get a much larger image).
Basically, you will want to read the I2C tutorial posted by Sparkfun (the link is highlighted above). Also, you will want to carefully review the datasheet for the TI ADS1015 chip, which is on the Sparkfun ADC.
You can read the ADC with on-board tools, without any programming, to make sure things work. The tools are already installed on yocto linux on the Edison: i2cdetect, i2cset, i2cget, and i2cdump. My post
on the link above will tell you how to use them.
The ADC is first configured with a write (i2cset) to the configuration register (two bytes, little-endian)... see my post on the link above. Then, you read the ADC (i2cget) to get the value register back (also little-endian) again, see my post on the link above.
You can detect your board before you do anything with i2cdetect -r -y 1
The ADC can be configured (see the datasheet pages 15 and 16) to read continuous, voltage maximum, AinX, or it can be configured as a dual differential analog to digital. You probably want to try my setup from the link above (from the terminal first) before you try differential reads, or before you try programming.
Good luck... and feel free to contact me if you have any questions or need some help|advice.
Cheers,
marcus