Toshiba TMP92CM22FG TLCS-900/H1 Series Manual page 113

Toshiba original cmos 32-bit microcontroller
Table of Contents

Advertisement

Operation in Each Mode
3.7.4
(1) 8-bit timer mode
Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers.
When set function and count data, TMRA0 and TMRA1 should be stopped.
1.
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 40 μs at f
MSB
← −
TA01RUN
← 0
TA01MOD
← 0
TA1REG
← X
INTETA01
← −
TA01RUN
X : Don't care, − : No change
Select the input clock refers to Table 3.7.3.
Table 3.7.3 Selecting Interrupt Interval and the Input Clock Using 8-Bit Timer
Input clock
φT1 (8/f
SYS
φT4 (32/f
SYS
φT16 (128/f
SYS
φT256 (2048/f
Note: The input clocks for TMRA0 and TMRA1 differ as follows:
TMRA0: Uses TMRA0 input (TA0IN) and can be selected from φT1, φT4, or φT16.
TMRA1: Matches output of TMRA0 (TA0TRG) and can be selected from φT1, φT16,
as follows:
LSB
7
6
5
4
3
2
1
X
X
X
0
0
X
X
0
1
1
1
0
0
1
0
1
0
1
X
X
X
1
1
Interrupt Interval (at f
)
)
)
102.4 μs to 26.21 ms
)
SYS
φT256.
92CM22-111
0
Stop TMRA1 and clear it to 0.
Select 8-bit timer mode and select φT1 (=(16/fc)s at f
40MHz) as the input clock.
Set 40 μs ÷ φT1 = 100 = 64H to TAREG.
0
Enable INTTA1 and set it to Level 5.
Start TMRA1 counting.
= 20 MHz)
SYS
0.4 μs to 102.4 μs
1.6 μs to 409.6 μs
6.4 μs to 1.638 ms
TMP92CM22
= 40 MHz, set each register
C
Resolution
0.4 μs
1.6 μs
6.4 μs
102.4 μs
2007-02-16
=
C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900/h1 series

Table of Contents