TMP92CF30
2009-06-12
92CF30-254
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
μ
s at f
SYS
=
50 MHz, set each register as follows;
* Clock state
Clcok gear :
1/1
Prescaler of clock gear :1/2
MSB
LSB
7
6
5
4
3
2
1
0
TA01RUN
←
–
X
X
X
–
–
0
–
Stop TMRA1 and clear it to 0.
TA01MOD
←
0 0 X X 0
1
X
X
Select 8-bit timer mode and select
φ
T1 (0.16
μ
s at f
SYS
=
50 MHz) as the input clock.
TA1REG
←
0
1
1
1
1
1
0
1
Set TA1REG to 20
μ
s
÷
φ
T1
=
125(7DH)
INTETA1
←
X
1
0
1
X
–
–
–
Enable INTTA1 and set it to level 5.
TA01RUN
←
–
X
X
X
–
1
1
–
Start TMRA1 counting.
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: Matches output of TMRA0,
φ
T1,
φ
T16, and
φ
T256.
Summary of Contents for TLCS-900/H1 Series
Page 652: ...TMP92CF30 2009 06 12 92CF30 650 ...