Watchdog Timers - Toshiba TLCS-90 Series Data Book

8 bit microcontroller
Table of Contents

Advertisement

TOSHIBA
TMP90C840
(6)
Reading
AID
conversion results
The results of
AID
conversion are stored into the ADREG register.
By reading the contents of the ADREG register, EOCF flag is cleared to
"0".
When
the
contents
of
the
ADREG
register
is
read
while
the
AID
conversion is performed, the
AID
conversion results become undefined.
AID
conversion is stopped by a HALT instruction except in the RUN
mode, by which the
AID
conversion results also become undefined.
In
th~
RUN mode,
AID
conversion is not stopped by a HALT instruction.
Example:
[1]
Analog input vo ltage to the
AN3
pin is converted to a
digital
value
in
the
high-speed
conversion
mode
(95
states), and the result is stored into the memory address
FFIOH by using
AID
interrupt IN TAD service routine.
Main setting
INTEH (- -
1
INTEL (- 1 - - - - -
ADMOD (- x x x
a
1 0 1 1
Set INTADE to
"1".
Enable INTT2
Select AN3 as the analog input channel,
and start the
AID
conversion in the high-
speed conversion mode.
AID
interrupt service routine
I
A
(-
ADREG
Load the contents of ADREG into the ac-.
cumulator.
Store the accumulator value
into the memory address FFIOH.
I
(FFIOH)
(-
A
I
Example:
[2]
Analog input voltage to the AN2 pin is converted to a
digital
value
in
the
high-speed
conversion
mode
(95
states), and the result is loaded into the accumulator when
the end of conversion is detected by the EOCF flag.
ADMOD (- x x x 0 1 0 1 0
loop:
if EOCF
o
then loop
Select AN2 as the analog input channel,
and start the
AID
conversion in the high-
speed conversion mode.
else A (-
ADREG
(Note)
Don't care
No change
3.10
Watchdog timers (Runaway detecting timer)
When the mulfunction (runaway) of the CPU occurs due to any cause such
as noise, the watchdog timer (WDT) detec ts it to return to the normal
sate.
When WDT has detected malfunction, a non-maskable interrupt is
generated to indicate it to the CPU.
MPU90-128

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents