Toshiba H1 Series Data Book page 288

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

3.12.4 Operation in Each Mode
(1) 8-bit timer mode
Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers.
a. 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 us at f
follows;
* Clock state
MSB
7
TA01RUN
TA01MOD
0
TA1REG
0
← X
INTETA1
TA01RUN
X: Don't Care、−: No change
Select the input clock using Table 3.12.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, and φT256.
Clcok gear :
Prescaler of clock gear : 1/2
LSB
6
5
4
3
2
1
0
X
X
X
0
0
X
X
0
1
X
X
1
1
1
1
1
0
1
1
0
1
X
X
X
X
1
1
92CZ26A-285
= 50 MHz, set each register as
c
1/1
Stop TMRA1 and clear it to 0.
Select 8-bit timer mode and select φT1 (0.16 μs at f
MHz) as the input clock.
s ÷ φT1 = 125(7DH)
μ
Set TA1REG to 20
Enable INTTA1 and set it to level 5.
Start TMRA1 counting.
TMP92CZ26A
= 50
C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents