Hardware manual

Rev. 3.0, 09/98, page 235 of 361
Value set in ADCSR
ADF ADIE ADST SCAN CKS CH2 CH1 CH0
01100001
(2) The A/D converter converts the voltage level at the AN1 input pin to a digital value. At the
end of the conversion process the A/D converter transfers the result to register ADDRB, sets
the ADF bit to “1,” clears the ADST bit to “0,” and halts.
(3) ADF = “1” and ADIE = “1,” so an A/D interrupt is requested.
(4) The user-coded A/D interrupt-handling routine is started.
(5) The interrupt-handling routine reads the ADCSR value, then writes a “0” in the ADF bit to
clear this bit to “0.”
(6) The interrupt-handling routine reads and processes the A/D conversion result (ADDRB).
(7) The routine ends.
Steps (2) to (7) can now be repeated by setting the ADST bit to “1” again.