English
Language : 

HT83FXX Datasheet, PDF (21/61 Pages) Holtek Semiconductor Inc – Flash Type Voice OTP MCU
P r e s c a le r O u tp u t
In c re m e n t
T im e r C o n tr o lle r
T im e r + 1
b7
TM 1 TM 0
TO N
HT83FXX
T im e r + 2
Timer Mode Timing Diagram
T im e r + N
T im e r + N + 1
PSC2
PSC1
b0
PSC0
T M R 0 C /T M R 1 C R e g is te r
T im e r P r e s c a le r R a te S e le c t
T0P S C 2
T1P S C 2
0
0
0
0
1
1
1
1
T0P S C 1
T1P S C 1
0
0
1
1
0
0
1
1
T0P S C 0
T1P S C 0
0
1
0
1
0
1
0
1
T im e r R a te
1 :2
1 :4
1 :8
1 :1 6
1 :3 2
1 :6 4
1 :1 2 8
1 :2 5 6
N o t im p le m e n te d , r e a d a s " d o n 't c a r e "
T im e r C o u n tin g E n a b le
1 : e n a b le
0 : d is a b le
N o t im p le m e n te d , r e a d a s " 0 "
O p e r a tin g M o d e S e le c t
T0TM 1
T1TM 1
0
0
1
1
T0TM 0
T1TM 0
0
1
0
1
n o m o d e a v a ila b le
n o m o d e a v a ila b le
tim e r m o d e
n o m o d e a v a ila b le
Timer Control Register
reload the value already loaded into the preload register
and continue counting. The interrupt can be disabled by
ensuring that the Timer Interrupt Enable bit in the Inter-
rupt Control Register, INTC, is reset to zero.
Prescaler
All of the 8-bit timers possess a prescaler. Bits 0~2 of
their associated timer control register, define the
pre-scaling stages of the internal clock source of the
Timer. The Timer overflow signal can be used to gener-
ate signals for the Timer interrupt.
Programming Considerations
The internal system clock is used as the timer clock
source and is therefore synchronized with the overall
operation of the microcontroller. In this mode, when the
appropriate timer register is full, the microcontroller will
generate an internal interrupt signal directing the pro-
gram flow to the respective internal interrupt vector.
When the Timer is read, the clock is blocked to avoid er-
rors, however as this may result in a counting error, this
should be taken into account by the programmer. Care
must be taken to ensure that the timers are properly ini-
tialized before using them for the first time. The associ-
ated timer enable bits in the interrupt control register must
be properly set otherwise the internal interrupt associated
with the timer will remain inactive. The edge select, timer
mode and clock source control bits in timer control regis-
ter must also be correctly set to ensure the timer is prop-
erly configured for the required application. It is also
important to ensure that an initial value is first loaded into
the timer registers before the timer is switched on; this is
because after power-on the initial values of the timer reg-
isters are unknown. After the timer has been initialized
the timer can be turned on and off by controlling the en-
able bit in the timer control register.
Rev. 1.00
21
May 12, 2009