Author Topic: using internal a/d converter  (Read 7598 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
using internal a/d converter
« on: June 04, 2010, 07:09:40 PM »
Hi Mark,
  I want to test the internal a/d converter of the 52259 chip. I have tied vrefH to 2.5v, and want to simply test one channel, is there an example on how to use this on the demo application?

Thanks
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: using internal a/d converter
« Reply #1 on: June 05, 2010, 08:17:07 PM »
Hi Neil

The file ADC_Timers.h includes code to do this. The fact that you are using 2.5V is not relevant apart for the fact that the result is a fraction of this voltage as given by the formula:

(value measured/ ADC_FULL_SCALE)*(VREFH - VREFL) Volts

where full scale is
#define ADC_FULL_SCALE                  (0xfff << 3)


Regards

Mark