HT56R66 Holtek Semiconductor Inc., HT56R66 Datasheet - Page 40

no-image

HT56R66

Manufacturer Part Number
HT56R66
Description
Tinypower Tm A/d Type With Lcd 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Timer/Event Counters
The provision of timers form an important part of any
microcontroller, giving the designer a means of carrying
out time related functions. The devices contain several
8-bit and 16-bit count-up timers. As each timer has three
different operating modes, they can be configured to op-
erate as a general timer, an external event counter or as
a pulse width measurement device. The provision of a
prescaler to the clock circuitry of the 8-bit Timer/Event
Counter also gives added range to this timer.
There are two types of registers related to the
Timer/Event Counters. The first are the registers that
contain the actual value of the Timer/Event Counter and
into which an initial value can be preloaded. Reading
from these registers retrieves the contents of the
Timer/Event Counter. The second type of associated
register is the Timer Control Register which defines the
timer options and determines how the Timer/Event
Counter is to be used. The Timer/Event Counters can
have the their clock configured to come from an internal
clock source. In addition, their clock source can also be
configured to come from an external timer pin.
Rev. 1.10
Note: For 1/2 bias, the VA=VLCD1, VB=VLCD1 1/2 for both R and C type.
LCD Driver Output - Type B - 1/2 Duty, 1/2 Bias
40
Configuring the Timer/Event Counter Input Clock
Source
The internal timer s clock can originate from various
sources. The system clock source is used when the
Timer/Event Counter is in the timer mode or in the pulse
width measurement mode. For the 8-bit Timer/Event
Counter this internal clock source is f
vided by a prescaler, the division ratio of which is condi-
tioned by the Timer Control Register, TMRnC, bits
TnPSC0~TnPSC2. For the 16-bit Timer/Event Counter
this internal clock source can be chosen from a combi-
nation of internal clocks using a configuration option and
the TnS bit in the TMRnC register.
An external clock source is used when the timer is in the
event counting mode, the clock source being provided
on an external timer pin TMR0, TMR1, TMR2 or TMR3
depending upon which timer is used. Depending upon
the condition of the TnE bit, each high to low, or low to
high transition on the external timer pin will increment
the counter by one.
HT56R66/HT56R666
September 8, 2009
SYS
which is also di-

Related parts for HT56R66