Shop OBEX P1 Docs P2 Docs Learn Events
ADS7816 analog to digital converter chip — Parallax Forums

ADS7816 analog to digital converter chip

Steve2381Steve2381 Posts: 94
edited 2007-02-18 18:08 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-18 16:00
    Hello,

    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
  • Steve2381Steve2381 Posts: 94
    edited 2007-02-18 18:08
    Thanks for your time Chris
Sign In or Register to comment.