ht82m75r Holtek Semiconductor Inc., ht82m75r Datasheet - Page 19

no-image

ht82m75r

Manufacturer Part Number
ht82m75r
Description
I/o Type 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
registers control the full operation of the Timer/Event
Counter. Before the timer can be used, it is essential
that the TMRC register is fully programmed with the
right data to ensure its correct operation, a process that
is normally carried out during program initialisation.
To choose which of the three modes the timer is to oper-
ate in, the timer mode, the event counting mode or the
pulse width measurement mode, bits TM0 and TM1
must be set to the required logic levels. The timer-on bit
TON or bit 4 of the TMRC register provides the basic
on/off control of the timer, setting the bit high allows the
counter to run, clearing the bit stops the counter. If the
timer is in the event count or pulse width measurement
mode the active transition edge level type is selected by
the logic level of the TE or bit 3 of the TMRC register.
Rev. 1.10
Timer/Event Counter Control Register
16-bit Timer/Event Counter Structure
Timer Mode Timing Chart
19
Configuring the Timer Mode
In this mode, the timer can be utilised to measure fixed
time intervals, providing an internal interrupt signal each
time the counter overflows. To operate in this mode, bits
TM1 and TM0 of the TMRC register must be set to 1 and
0 respectively. In this mode, the internal clock is used as
the timer clock. The timer-on bit, TON, must be set high
to enable the timer to run. Each time an internal clock
high to low transition occurs, the timer increments by
one. When the timer is full and overflows, the timer will
be reset to the value already loaded into the preload reg-
ister and continue counting. If the timer interrupt is en-
abled, an interrupt signal will also be generated. The
timer interrupt can be disabled by ensuring that the ETI
bit in the INTC register is cleared to zero.
HT82M75R/HT82M75RE
HT82K75R/HT82K75RE
June 11, 2010

Related parts for ht82m75r