Toshiba TLCS-90 Series Data Book page 291

8 bit microcontroller
Table of Contents

Advertisement

TOSHIBA
®
(1)
(2)
T~P90C840
Comparators (CP4 and CPS)
The 16-bit comparators detect the match of the up-counter UC16 and the
timer register TREG4 or TREG5.
When the up-counter matches registers TREG4 or GREGS,
the interrupt
INTT4 or INTT5 occurs, respectively.
The up-counter is cleared only
when
it
matches
TREGS
(the
clear
operation
can
be
disabled
if
neces sary) .
Timer Flip-flop (TFF4)
This
Timer
Flip-flop
is
inverted
by
the
match
signal
from
the
comparators
(CP4
and
CPS)
and
the
latch
signal
to
the
capture
registers (CAPI and CAP2).
It
is
pos sib Ie
to enab lei di sab Ie
the
invers ion for
each of
these
sources by using TRFFCR5-2.
Also TFF4 can be
inverted,
cleared
to
"0"
and
set
to
"1"
under
software control.
Its value can be output to the timer output pin T04 also used as P83
or T03.
Either pin function may be selected by the registers P8CR and
SMMOD.
T04 is selected by setting P8CR3
=
1 and SMMODS,4
=
11.
16-bit timer mode
In this mode, the interval time
generate the interrupt INTT5.
TRLJN
<-
-
a
INTEL <-
- -
a
-
1
T4FFCR<-
x x
a a
0 0 1 I
T4MOD <-
x x
1 0 0 1 * *
(**=01,10,11)
TREG5 <-
**** **** **** ****
TRLJN
<-
-
-
1 1
- -
- -
(Note)
x:
Don't care
16-bit event counter mode
is set in the timer register TREG5 to
Stop Timer 4.
Enable INTT5 and disable INTT4.
Disable trigger.
Se 1ec t interna 1 clock for input, and
disable the capture function.
Set the interval time (16 bits).
Start Timer 4.
No change
This timer can be used as a 16-bit event counter by selecting the
external clock (TI4) as the input clock in the above timer mode (1).
The counter counts up at the rising edge of the TI4 input clock.
The TI4 pin is also used as P81 or INTI.
TRLJN
P8CR
<- - - -
0
<- - - - - -
INTEL <- - - 0 0 1
- * -
T4FFCR<- x x 0 0 0
a
1 1
T4MOD <- x x 1 0 0 1 0 0
TREG5 <- **** **** **** ****
TRLJN
<- - - 1 1 -
Stop Timer 4.
*=0; TI4 is square wave.
*=1; TI4 is sign (zero-cross) wave
Enable INTT5 and disable INTT4 and
INTI.
Disable trigger.
Select TI4 as the input clock.
Set the number of counts (16 bits).
Start Timer 4.
MPU90-93

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents