Toshiba TLCS-900 Computer Hardware User Manual


 
TMP92CM22
2007-02-16
92CM22-133
3.8.4 Operation in Each Mode
(1) 16-bit interval timer mode
Generating interrupts at fixed intervals in this example, the interval time is set the
timer register TB0RG1H/L to generate the interrupt INTTB01.
7 6 5 4 3 2 1 0
TB0RUN 0 0 X X 0 X 0 Stop TMRB0.
INTETB0 X 1 0 0 X 0 0 0 Enable INTTB01 and set interrupt level 4. Disable
INTTB00.
TB0FFCR 1 1 0 0 0 0 1 1 Disable the trigger.
TB0MOD 0 0 1 0 0 1 **
(** = 01, 10, 11)
Set input clock to prescaler clock, and set capture function
to disable.
TB0RG1 * * * * * * * * Set the interval time.
* * * * * * * * (16 bits)
TB0RUN 0 0 X X 1X1 Start TMRB0.
X : Don’t care, : No change
(2) 16-bit event counter mode
In 16-bit timer mode as described in above, the timer can be used as an event counter
by selecting the external clock (TB1IN0 pin input) as the input clock.
Up counter counting up by rising edge of TB1IN0 pin input. And execution software
capture and reading capture value enable reading count value.
7 6 5 4 3 210
TB1RUN 0 0 X X 0 X 0 Stop TMRB1.
PDCR X X X X
0 Set PD0 to TB1IN0 input mode.
PDFC X X X X
1
INTETB1 X 1 0 0 X 000 Set INTTB11 to enable (Interrupt level4).
Set INTTB00 to disable.
TB1FFCR 1 1 0 0 0 011 Set trigger to disable.
TB1MOD 0 0 1 0 0 100 Set input clock to TB1IN0 pin input.
* * * * * * * * Set number of count. TB1RG1
* * * * * * * * (16 bits)
TB1RUN 0 0 X X 1X1 Start TMRB1.
X: Don’t care, : No change
Note: When used as an event counter, set the prescaler to “RUN” (TB1RUN<TB1PRUN> = “1”).