ST7LITE20F2 ST7LITE25F2 ST7LITE29F2
On-chip peripherals
Note:
For example, if VDD = 5 V, then the ADC can convert voltages in the range 0 V to 430 mV
with an ideal resolution of 0.6 mV (equivalent to 13-bit resolution with reference to a VSS to
VDD range).
For more details, refer to Section 13: Electrical characteristics.
The amplifier is switched on by the ADON bit in the ADCCSR register, so no additional
startup time is required when the amplifier is selected by the AMPSEL bit.
Digital A/D conversion result
The conversion is monotonic, meaning that the result never decreases if the analog input
does not and never increases if the analog input does not.
If the input voltage (VAIN) is greater than VDDA (high-level voltage reference) then the
conversion result is FFh in the ADCDRH register and 03h in the ADCDRL register (without
overflow indication).
If the input voltage (VAIN) is lower than VSSA (low-level voltage reference) then the
conversion result in the ADCDRH and ADCDRL registers is 00 00h.
The A/D converter is linear and the digital result of the conversion is stored in the ADCDRH
and ADCDRL registers. The accuracy of the conversion is described in Section 13:
Electrical characteristics.
RAIN is the maximum recommended impedance for an analog input signal. If the impedance
is too high, this will result in a loss of accuracy due to leakage and sampling not being
completed in the allowed time.
A/D Conversion
The analog input ports must be configured as input, no pull-up, no interrupt. Section 10: I/O
ports. Using these pins as analog inputs does not affect the ability of the port to be read as
a logic input.
In the ADCCSR register, select the CS[2:0] bits to assign the analog channel to convert.
ADC Conversion mode
● In the ADCCSR register:
– set the ADON bit to enable the A/D converter and to start the conversion. From
this time on, the ADC performs a continuous conversion of the selected channel.
● When a conversion is complete:
– the EOC bit is set by hardware.
– the result is in the ADCDR registers.
A read to the ADCDRH resets the EOC bit.
To read the 10 bits, perform the following steps:
1. Poll EOC bit
2. Read ADCDRL
3. Read ADCDRH. This clears EOC automatically.
To read only 8 bits, perform the following steps:
1. Poll EOC bit
2. Read ADCDRH. This clears EOC automatically.
Doc ID 8349 Rev 5
105/166