Analog-to-digital converter (ADC)
ST10F296E
14
Analog-to-digital converter (ADC)
A 10-bit ADC with 16+16 multiplexed input channels and a sample and hold circuit is
integrated on-chip. An automatic self-calibration adjusts the ADC module to process
parameter variations at each reset event. The sample time (for loading the capacitors) and
the conversion time is programmable and can be adjusted to the external circuitry.
The ADC input bandwidth is limited by the achievable accuracy as follows: If a maximum
error of 0.5 LSB (2 mV) impacts the global TUE (TUE also depends on other causes) in the
worst case of temperature and process, the maximum frequency for a sine wave analog
signal is around 7.5 kHz. To reduce the effect of the input signal variation on the accuracy to
0.05 LSB, the maximum input frequency of the sine wave should be reduced to 800 Hz.
If static signal is applied during the sampling phase, the series resistance should not be
greater than 20 k
(takingeventual input leakage into account). It is suggested not to
connect any capacitance on analog input pins, to reduce the effect of charge partitioning
(and consequent voltage drop error) between the external and the internal capacitance. If an
RC filter is necessary the external capacitance must be greater than 10 nF to minimize the
accuracy impact.
Overrun error detection/protection is controlled by the ADDAT register. Either, an interrupt
request is generated when the result of a previous conversion has not been read from the
result register at the time the next conversion is complete, or, the next conversion is
suspended until the previous result has been read. For applications which require less than
16 analog input channels, the remaining channel inputs can be used as digital input port
pins. The ADC of the ST10F296E supports different conversion modes:
●
Single channel single conversion: The analog level of the selected channel is
sampled once and converted. The result of the conversion is stored in the ADDAT
register.
●
Single channel continuous conversion: The analog level of the selected channel is
repeatedly sampled and converted. The result of the conversion is stored in the ADDAT
register.
●
Auto scan single conversion: The analog level of the selected channels are sampled
once and converted. After each conversion the result is stored in the ADDAT register.
The data can be transferred to the RAM by interrupt software management or using the
PEC data transfer.
●
Auto scan continuous conversion: The analog level of the selected channels are
repeatedly sampled and converted. The result of the conversion is stored in the ADDAT
register. The data can be transferred to the RAM by interrupt software management or
using the PEC data transfer.
●
Wait for ADDAT read mode: The ADWR bit of the ADCON control register must be
activated to avoid overwriting the result of a current conversion by the next one, when
using continuous modes. This is because until the ADDAT register is read, the new
result is stored in a temporary buffer and the conversion is on hold.
●
Channel injection mode: When using continuous modes, a selected channel can be
converted between two of the continuous conversions without changing the current
operating mode. The 10-bit data of the conversions are stored in the ADRES field of the
ADDAT2 register. The current continuous mode remains active after the single
conversion is completed.