ADS7816 analog to digital converter chip
Steve2381
Posts: 94
Hi
I am planning a project using a ADS7816 analog to digital converter chip.
The results are provided in 12 bit binary.
How do I convert the 12 bit binary to a usable variable?·
I basically need a result of 0 volts=0 and say 5 volts=100.· The actual value don't matter.
Data sheet is here:
http://www.ortodoxism.ro/datasheets/texasinstruments/ads7816.pdf
Many thanks
Steve
I am planning a project using a ADS7816 analog to digital converter chip.
The results are provided in 12 bit binary.
How do I convert the 12 bit binary to a usable variable?·
I basically need a result of 0 volts=0 and say 5 volts=100.· The actual value don't matter.
Data sheet is here:
http://www.ortodoxism.ro/datasheets/texasinstruments/ads7816.pdf
Many thanks
Steve
Comments
Your 12-bit variable will simply go into a Word variable. The extra bits won’t be used and can be ignored. There is example code for converting an 8-bit value to volts/milli-volts. You could use that example to convert the 12-bit value since you would just use 4096 in place of the 256 that you use for the 8-bit value in your calculations. You can find the 8-bit example using the ADC0831 in the Stamp Works manual at the following link.
http://www.parallax.com/detail.asp?product_id=27220
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support