Toshiba TMP91C824F Data Book page 102

16bit microcontroller tlcs-900/l1 series
Table of Contents

Advertisement

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:
TA01RUN
TA01MOD
TA1REG
INTETA01
TA01RUN
(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
∗ Clock state
System clock: High frequency (fc)
Prescaler clock: f
FPH
MSB
7
6
5
4
3
2
X
X
0
0
X
X
1
0
0
0
1
0
1
0
← X
1
0
1
X
X
X
1
LSB
1
0
0
Stop TMRA1 and clear it to 0.
Select 8-Bit Timer Mode and select φ T1 (0.5 µ s at fc = 16 MHz)
X
X
as the input clock.
Set TA1REG to 20 µ s ÷ φ T1 = 40 = 28H
0
0
Enable INTTA1 and set it to Level 5.
1
Start TMRA1 counting.
91C824-99
TMP91C824

Advertisement

Table of Contents
loading

Table of Contents