Toshiba TLCS-900/L1 Series Manual page 193

Original cmos 16-bit microcontroller
Hide thumbs Also See for TLCS-900/L1 Series:
Table of Contents

Advertisement

Example:
a.
Convert the analog input voltage on the AN3 pin and write the result, to memory
address 0800H using the AD interrupt (INTAD) processing routine.
Main routine:
7 6 5 4 3 2 1 0
← – 1 0 0 – – – –
INTE0AD
← 1 1 X X 0 0 1 1
ADMOD1
← – – 0 0 X 0 0 1
ADMOD0
Interrupt routine processing example:
← ADREG37
WA
WA
> > 6
← WA
(0800H)
b.
This example repeatedly converts the analog input voltages on the three pins
AN0, AN1 and AN2, using channel scan repeat conversion mode.
← – 0 0 0 – – – –
INTE0AD
← 1 – X X 0 0 1 0
ADMOD1
← – – 0 0 X 1 1 1
ADMOD0
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 ADREG37L and ADREG37H 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 0800H.
Disable INTAD.
Set pins AN0 to AN2 to be the analog input channels.
Start conversion in channel scan repeat conversion mode.
91C824-191
TMP91C824
2008-02-20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tmp91c824fgJtmp91c824-s

Table of Contents