Toshiba H1 Series Network Card User Manual


 
TMP92CZ26A
92CZ26A-308
3.13.4 Operation in Each Mode
(1) 16 bit timer mode
Generating interrupts at fixed intervals
In this example, the interrupt INTTB01 is set to be generated at fixed intervals. The
interval time is set in the timer register TB0RG1H/L.
7 6 5 4 3210
TB0RUN
– 0 X X – – X 0 Stop TMRB0
INTETB0
X 1 0 0 X 0 0 0 Enable INTTB01and set interrupt level 4.
Disable INTTB00
TB0FFCR
1 1 0 0 0011 Disable the trigger
TB0MOD
0 0 1 0 0 1 * * Select internal clock for input and
(** = 01, 10, 11) disable the capture function.
TB0RG1
* * * * **** Set the interval time
* * * * **** (16 bits).
TB0RUN
– 0 X X – 1 X 1 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 (TB0IN0 pin input) as the input clock. Up
counter (UC10) counts up at the rising edge of TB0IN0 input. To read the value of
the counter, first perform “software capture” once and read the captured value.
7 6 5 4 3210
TB0RUN
– 0 X X – – X 0 Stop TMRB0
PPCR
X X 1 X Set PP4 to input mode for TB0IN0
PPFC
– – – 1 – – – X
INTETB0
X 1 0 0 X 0 0 0 Enable INTTB01 and sets interrupt level 4
Disable INTTB00
TB0FFCR
1 1 0 0 0011 Disable trigger
TB0MOD
0 0 1 0 0100 Select TB0IN0 as the input clock
TB0RG1
* * * * **** Set the number of counts
* * * * **** (16 bit)
TB0RUN
– 0 X X – 1 X 1 Start TMRB0
X: Don't care, : No change
When used as an event counter, set the prescaler in RUN mode.
(TB0RUN <TB0PRUN> = “1”)