![Toshiba TMP91C824F Data Book Download Page 102](http://html.mh-extra.com/html/toshiba/tmp91c824f/tmp91c824f_data-book_428625102.webp)
TMP91C824
91C824-99
3.7.4
Operation in each mode
(1) 8-Bit Timer Mode
Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers.
Setting its function or counter data for TMRA0 and TMRA1 after stop these registers.
!
Generating interrupts at a fixed interval (using TMRA1)
To generate interrupts at constant intervals using TMRA1 (INTTA1), first stop TMRA1 then set
the operation mode, input clock and a cycle to TA01MOD and TA1REG register, respectively.
Then, enable the interrupt INTTA1 and start TMRA1 counting.
Example: To generate an INTTA1 interrupt every 20
µ
seconds at fc = 16 MHz, set each register as follows:
∗
Clock state
System clock: High frequency (fc)
Prescaler clock: f
FPH
MSB
LSB
7 6
5
4 3 2
1
0
TA01RUN
←
–
–
X
X
–
–
0
–
Stop TMRA1 and clear it to 0.
TA01MOD
←
0
0
X
X
1
0
X X
Select 8-Bit Timer Mode and select
φ
T1 (0.5
µ
s at fc = 16 MHz)
as the input clock.
TA1REG
←
0 0
1
0 1 0
0
0
Set
TA1REG
to
20
µ
s
÷
φ
T1 = 40 = 28H
INTETA01
←
X
1
0
1
–
–
–
–
Enable INTTA1 and set it to Level 5.
TA01RUN
←
– X X X – 1
1
–
Start
TMRA1
counting.
(note): X = Don’t care; “
−
” = No change
Select the input clock using in Table 3.7.2.
(note): The input clocks for TMRA0 and TMRA1 are different from as follows.
TMRA0: TA0IN input,
φ
T1,
φ
T4 or
φ
T16
TMRA1: Match output of TMRA0,
φ
T1,
φ
T16,
φ
T256