HT46R64 Holtek Semiconductor Inc., HT46R64 Datasheet - Page 17

no-image

HT46R64

Manufacturer Part Number
HT46R64
Description
Ht46r64/ht46c64 -- A/d With Lcd Type 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT46R64
Manufacturer:
Bussmann
Quantity:
25 000
Part Number:
HT46R64
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
Company:
Part Number:
HT46R64
Quantity:
9 000
Company:
Part Number:
HT46R64
Quantity:
18
Timer/Event Counter
Two timer/event counters (TMR0,TMR1) are imple-
mented in the microcontroller. The Timer/Event Counter
0 contains a 8-bit programmable count-up counter and
the clock may come from an external source or an inter-
nal clock source. An internal clock source comes from
f
grammable count-up counter and the clock may come
from an external source or an internal clock source. An
internal clock source comes from f
lected by option. The external clock input allows the
user to count external events, measure time intervals or
pulse widths, or to generate an accurate time base.
There are two registers related to the Timer/Event
Counter 0; TMR0 ([0DH]) and TMR0C ([0EH]). Two
physical registers are mapped to TMR0 location; writing
TMR0 puts the starting value in the Timer/Event Coun-
ter 0 register and reading TMR0 takes the contents of
the Timer/Event Counter 0. The TMR0C is a timer/event
counter control register, which defines some options.
There are three registers related to the Timer/Event
Counter 1; TMR1H (0FH), TMR1L (10H) and TMR1C
(11H). Writing TMR1L will only put the written data to an
Rev. 1.80
SYS
. The Timer/Event Counter 1 contains a 16-bit pro-
SYS
/4 or 32768Hz se-
Timer/Event Counter 0
Timer/Event Counter 1
PFD Source Option
17
internal lower-order byte buffer (8-bit) and writing
TMR1H will transfer the specified data and the contents
of the lower-order byte buffer to TMR1H and TMR1L
registers, respectively.
The Timer/Event Counter 1 preload register is changed
everytime there is a writing operation to TRM1H. Read-
ing TMR1H will latch the contents of TMR1H and
TMR1L counters to the destination and the lower-order
byte buffer, respectively. Reading the TMR1L will read
the contents of the lower-order byte buffer. The TMR1C
is the Timer/Event Counter 1 control register, which de-
fines the operating mode, counting enable or disable
and an active edge.
The T0M0, T0M1 (TMR0C) and T1M0, T1M1 (TMR1C)
bits define the operation mode. The event count mode is
used to count external events, which means that the
clock source is from an external (TMR0, TMR1) pin. The
timer mode functions as a normal timer with the clock
source coming from the internal selected clock source.
Finally, the pulse width measurement mode can be used
to count the high or low level duration of the external sig-
nal (TMR0, TMR1), and the counting is based on the in-
ternal selected clock source.
HT46R64/HT46C64
February 14, 2006

Related parts for HT46R64