ST7LUS5, ST7LU05, ST7LU09
On-chip peripherals
A/D conversion phases
The A/D conversion is based on two conversion phases:
● Sample capacitor loading [duration: tSAMPLE]
During this phase, the VAIN input voltage to be measured is loaded into the CADC
sample capacitor.
● A/D conversion [duration: tHOLD]
During this phase, the A/D conversion is computed (8 successive approximations
cycles) and the CADC sample capacitor is disconnected from the analog input pin to get
the optimum analog to digital conversion accuracy.
The total conversion time: tCONV = tSAMPLE + tHOLD
While the ADC is on, these two phases are continuously repeated.
) At the end of each conversion, the sample capacitor is kept loaded with the previous
t(s measurement load. The advantage of this behavior is that it minimizes the current
c consumption on the analog pin in case of single input channel measurement.
du A/D conversion
Pro t(s) The analog input ports must be configured as input, no pull-up, no interrupt. Refer to the “I/O
ports” chapter. Using these pins as analog inputs does not affect the ability of the port to be
te c read as a logic input.
le du In the ADCCSR register:
so ro Select the CH[2:0] bits to assign the analog channel to convert.
- Ob te P ADC conversion mode
) le In the ADCCSR register:
t(s so Set the ADON bit to enable the A/D converter and to start the conversion. From this
c b time on, the ADC performs a continuous conversion of the selected channel.
u O When a conversion is complete:
rod ) - – The EOC bit is set by hardware.
P t(s – The result is in the ADCDR registers.
te c A read to the ADCDRH or a write to any bit of the ADCCSR register resets the EOC bit.
le du To read the 10 bits, perform the following steps:
so ro 1. Poll EOC bit
b P 2. Read ADCDRL
O te3. Read ADCDRH. This clears EOC automatically.
oleTo read only 8 bits, perform the following steps:
s 1. Poll EOC bit
Ob 2. Read ADCDRH. This clears EOC automatically.
Changing the conversion channel
The application can change channels during conversion. When software modifies the
CH[2:0] bits in the ADCCSR register, the current conversion is stopped, the EOC bit is
cleared, and the A/D converter starts converting the newly selected channel.
79/124