Setting example:
① Convert the analog input voltage on the AN3 pin and write the result, to memory address
2800H using the AD interrupt (INTAD) processing routine.
Main routine:
7 6 5 4 3 2 1 0
← 1 1 0 0 - - - -
INTE0AD
← 1 1 0 0 0 0 1 1
ADMOD1
← X X 0 0 0 0 0 1
ADMOD0
Interrupt routine processing example:
← ADREG3
WA
WA
> > 6
← WA
(2800H)
② This example repeatedly converts the analog input voltages on the three pins AN0, AN1
and AN2, using Channel Scan Repeat Conversion Mode.
← 1 0 0 0 - - - -
INTE0AD
← 1 1 0 0 0 0 1 0
ADMOD1
← X X 0 0 0 1 1 1
ADMOD0
Note: X = Don't care; "−" = No change
Enable INTAD and set it to Interrupt Level 4.
Set pin AN3 to be the analog input channel.
Start conversion in Channel Fixed Single Conversion Mode.
Read value of ADREG3L and ADREG3H into 16-bit
general-purpose register WA.
Shift contents read into WA six times to right and zero-fill upper
bits.
Write contents of WA to memory address 2800H.
Disable INTAD.
Set pins AN0~AN2 to be the analog input channels.
Start conversion in Channel Scan Repeat Conversion Mode.
92CH21 - 290
TMP92CH21