English
Language : 

AN979 Datasheet, PDF (3/14 Pages) STMicroelectronics – DRIVING AN ANALOG KEYBOARD WITH THE ST7 ADC
DRIVING AN ANALOG KEYBOARD WITH THE ST7 ADC
Then the analog channel to convert must be selected using CH3-CH0 bits of ADCCSR reg-
sister.
Then select the SPEED of conversion.
Setting the ADON bit will switch the converter on.
Figure 2. Flowchart: initialization of the ADC
KBD_init
I/O Initialization
Channel Selection
SPEED Selection
ADC ON
return
Once a conversion is done, the EOC bit is set by hardware. It will be reset when the ADCDRH
register is read.
Once enabled, conversions will run continuously until the peripheral is disabled.
3/14