HT95CXXX
Rev. 1.50
21
May 26, 2005
Reading TMR0H latches the TMR0L into the low byte
buffer to avoid a false timing problem. Reading TMR0L
returns the contents of the low byte buffer. In other
words, the low byte of the Timer/Event Counter 0 can
not be read directly. It must read the TMR0H first to
make the low byte contents of Timer/Event Counter 0 be
latched into the buffer.
There are 3 registers related to the Timer/Event Counter
1; TMR1H, TMR1L and TMR1C. The Timer/Event
Counter 1 operates in the same manner as the
Timer/Event Counter 0.
The TMR0C is the Timer/Event Counter 0 control regis-
ter, which defines the Timer/Event Counter 0 options.
The Timer/Event Counter 1 has the same options as the
Timer/Event Counter 0 and is defined by TMR1C. The
timer/event counter control registers define the operat-
ing mode, counting enable or disable and active edge.
The T0M0/T1M0, T0M1/T1M1 bits define the operating
mode. The event count mode is used to count external
events, which means the clock source comes from an
external(TMR0orINT/TMR1)pin.Thetimermodefunc-
tions as a normal timer with the clock source coming
from instruction clock (TMR0) or 32768Hz (TMR1). The
pulse width measurement mode can be used to count
the high or low level duration of the external signal
(TMR0 or INT/TMR1). The counting is based on the
32768Hz clock for TMR1 or instruction clock for TMR0.
$
1
$
$ 1
$
1
$
$ 3 1
3
/
" .
"
/
1 3 #
"
" $ 1
/
"
1 #
" $ 1
" 7
/
#
! / %
"
" $ B "
" /
0 " <
" /
0 1 2 =
" B " ' ( ) * + , -
% " 7
" 7
! !
$
1
$
$ 1
$
$
1
Timer/Event Counter 0/1
Bit No.
Label
R/W
Function
0~2
RO
Unused bit, read as 0
3
T0E/T1E
RW
To define the TMR0/TMR1 active edge of timer
For event count or Timer mode
(0=active on low to high; 1=active on high to low)
For pulse width measurement mode
(0=measures low pulse width; 1=measures high pulse width)
4
T0ON/T1ON
RW
To enable/disable timer counting (0=disabled; 1=enabled)
5
RO
Unused bit, read as 0
6
7
T0M0/T1M0
T0M1/T1M1
RW
To define the operating mode
Bit 7, 6=01, Event count mode (external clock)
Bit 7, 6=10, Timer mode
Bit 7, 6=11, Pulse width measurement mode
Bit 7, 6=00, Unused
TMR0C (0EH)/TMR1C (11H) Register
Register
Bit No.
R/W
Function
TMR0H (0CH)
0~7
RW
Timer/Event Counter 0 higher-order byte register
TMR0L (0DH)
0~7
RW
Timer/Event Counter 0 lower-order byte register
TMR1H (0FH)
0~7
RW
Timer/Event Counter 1 higher-order byte register
TMR1L (10H)
0~7
RW
Timer/Event Counter 1 lower-order byte register