cancel
Showing results for 
Search instead for 
Did you mean: 

ADC conversion offset

tj2
Associate II
Posted on December 19, 2005 at 18:23

ADC conversion offset

7 REPLIES 7
tj2
Associate II
Posted on September 23, 2005 at 12:13

Hi

I've compiled the Polling example under the ADC12 folder and downloaded it to the evaluationboard. When the potentiometer is placed to output 0V, the Calib_result value is 0x1D6, which indeed is not zero. Is this the offset mentioned in the datasheet? or is there another explanation to this?

Regards

Thomas Jespersen, Logic IO

nopti_albe
Associate II
Posted on September 25, 2005 at 10:25

Yes there is an explanation to that. They use only a diode for voltage regulation. 3,3v-0.6v=2,7v

So the adc overflows. Above 2,5v instead of seeing ffffffff you see 00000000 because it overflows on the bit sign. You could have verified that yourself by reading directly the register from adc and rotating the button(and verify with the scope the voltage there). The solution to this is a good 2.5v regulator.

tj2
Associate II
Posted on September 26, 2005 at 05:46

@RISC

Thank you. What do you mean by ''To do this it's better to chose two voltage the first 0''?

@Tudor

At the moment it's only the offset that I was investigating. But I'll be aware of the problem....! Thanks.

tj2
Associate II
Posted on September 26, 2005 at 08:55

Okay.

I've encountered another problem during testing of our target board (not the evaluation board). I want to do a single conversion of each analog input. But the program stoppes in second

while (ADC12_FlagStatus (ADC12_DAx)==RESET);

Is it not possible to do a single conversion, then change channel, and do another conversion?

fa
Associate II
Posted on September 28, 2005 at 11:28

Well how do I find the Offset and the gain, please include an example in C.

Best regards, Frank Andersen

fa
Associate II
Posted on September 29, 2005 at 11:07

Thanks, but in the source it says 2500 mV and 1830 mV in another line, I think it is the 2500 mV, that is the correct value?

Best regards,

Frank Andersen

doug2
Associate II
Posted on December 19, 2005 at 18:23

There are a few questions I have about the ADC conversion offset thread:

1) Is Frank Anderson correct about the comment in the example calibration code that the 1830 mV should have been 2500 mV?

2) Why did ST make this ADC so convoluted? It seems that in a production setting I would need more external circuitry to calibrate the offset and gain of the internal ADC than I would need for just putting a serial ADC on the board (lower cost anyway). What is the ''typical'' way of using the on board ADC? What is the benefit of using the two's complement output of the ADC?

Thanks in advance for any insight.

Doug