HT48R05A-1/HT48C05/HT48R06A-1/HT48C06/HT48R08A-1
The TM0, TM1 bits define the operating mode. The
remain in the timer/event counter even if the activated
transient occurs again. In other words, only one cycle
measurement can be done. Until setting the TON, the
cycle measurement will function again as long as it re-
ceives further transient pulse. Note that, in this operat-
ing mode, the timer/event counter starts counting not
according to the logic level but according to the transient
edges. In the case of counter overflows, the counter is
reloaded from the timer/event counter preload register
and issues the interrupt request just like the other two
modes. To enable the counting operation, the timer ON
bit (TON; bit 4 of TMRC) should be set to 1. In the pulse
width measurement mode, the TON will be cleared au-
tomatically after the measurement cycle is completed.
But in the other two modes the TON can only be reset by
instructions. The overflow of the timer/event counter is
one of the wake-up sources. No matter what the opera-
tion mode is, writing a 0 to ETI can disable the interrupt
service.
event count mode is used to count external events,
which means the clock source comes from an external
(TMR) pin. The timer mode functions as a normal timer
with the clock source coming from the fINT clock. The
pulse width measurement mode can be used to count
the high or low level duration of the external signal
(TMR). The counting is based on the fINT clock.
In the event count or timer mode, once the timer/event
counter starts counting, it will count from the current
contents in the timer/event counter to FFH. Once over-
flow occurs, the counter is reloaded from the timer/event
counter preload register and generates the interrupt re-
quest flag (TF; bit 5 of INTC) at the same time.
In the pulse width measurement mode with the TON
and TE bits equal to one, once the TMR has received a
transient from low to high (or high to low if the TE bits is
²0²) it will start counting until the TMR returns to the orig-
inal level and resets the TON. The measured result will
f
S Y S
8
-
s
t
a
g
e
P
r
e
s
c
a
l
e
r
f
I N T
D
a
t
a
B
u
s
8
-
1
M
U
X
T
M
1
R
e
l
o
a
d
T
i
m
e
r
/
E
v
e
n
t
C
o
u
n
t
e
r
T
M
0
P
r
e
l
o
a
d
R
e
g
i
s
t
e
r
P
S
C
2
~
P
S
C
0
T
M
R
T
E
P
u
l
s
e
W
i
d
t
h
T
i
m
e
r
/
E
v
e
n
t
O
v
e
r
f
l
o
w
T
T
T
M
M
O
1
M
e
a
s
u
r
e
m
e
n
t
C
o
u
n
t
e
r
t
o
I
n
t
e
r
r
u
p
t
0
M
o
d
e
C
o
n
t
r
o
l
N
1
/
2
B
B
Z
Z
Timer/Event Counter
Bit No.
Label
Function
To define the prescaler stages, PSC2, PSC1, PSC0=
000: fINT=fSYS/2
001: fINT=fSYS/4
010: fINT=fSYS/8
0~2
PSC0~PSC2 011: fINT=fSYS/16
100: fINT=fSYS/32
101: fINT=fSYS/64
110: fINT=fSYS/128
111: fINT=fSYS/256
To define the TMR active edge of the timer/event counter
(0=active on low to high; 1=active on high to low)
3
TE
4
5
TON
To enable or disable timer counting (0=disabled; 1=enabled)
¾
Unused bit, read as ²0²
To define the operating mode
01=Event count mode (external clock)
10=Timer mode (internal clock)
11=Pulse width measurement mode
00=Unused
6
7
TM0
TM1
TMRC (0EH) Register
Rev. 1.51
13
December 30, 2008