English
Language : 

AN3137 Datasheet, PDF (28/42 Pages) STMicroelectronics – Analog-to-digital converter on STM8L and STM8AL devices
Methods for precision improvement
AN3137
Figure 15. ADC input pin noise spikes from internal charge during sampling process
4.4.3
3AMPLINGTIMET3

$ISCHARGINGTIME
#ONVERSION TIME
T#
T
AI
Note that a non-zero external capacitance Cext (parasitic pin capacitance) also exists, so
during conversion time the pin capacitance is discharged through source impedance Rin.
Minimizing added errors
Workaround for high impedance sources
To solve the added error problem, you can increase the sampling time (tS) configuring ADC
settings in MCU firmware, so that you discharge the Csh charge through the source
impedance Rin. The time constant (Rin * Csh) is the reference for choosing the sampling
time. To choose the sampling time cycles, use this formula (see also Section 1):
tS ≥ fADC ⋅
(Rin ⋅
Csh) ⋅
In
4----0---9---6--
0.5
[cycles]
The clock for ADC (fADC) is another important factor; slowing down the ADC clock
increases the sampling time.
28/42
Doc ID 16983 Rev 3