µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on June 04, 2010, 07:09:40 PM

Title: using internal a/d converter
Post by: neil 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
Title: Re: using internal a/d converter
Post by: mark 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