EasyManuals Logo

Holtek HT48R05A-1 User Manual

Default Icon
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #35 background imageLoading...
Page #35 background image
Configuring the Timer Mode
In this mode, the timer can be utilized to measure fixed time intervals, providing an internal inter-
rupt signal each time the counter overflows. To operate in this mode, bits TM1 (bit7) and TM0 (bit6)
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 input clock frequency to the timer is f
SYS
divided by the value programmed into
the timer prescaler, the value of which is determined by bits PSC0~PSC2 of the TMRC register.
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, an inter-
rupt signal is generated and the timer will preload the value already loaded into the preload regis
-
ter and continue counting. A timer overflow condition and corresponding internal interrupt is one of
the wake-up sources, however, the internal interrupts can be disabled by ensuring that the ETI bit
of the INTC register is reset to zero.
28
Cost-Effective I/O Type MCU
T M R C R e g i s t e r f o r 8 - b i t T i m e r / E v e n t C o u n t e r
N o t i m p l e m e n t e d , r e a d a s " 0 "
b 7
E v e n t C o u n t e r A c t i v e E d g e S e l e c t
1 : c o u n t o n f a l l i n g e d g e
0 : c o u n t o n r i s i n g e d g e
T ET O NT M 0T M 1
T i m e r P r e s c a l e r R a t e S e l e c t
P S C 2
0
0
0
0
1
1
1
1
b 0
P S C 2
P S C 1 P S C 0
P S C 1
0
0
1
1
0
0
1
1
P S C 0
0
1
0
1
0
1
0
1
T i m e r R a t e
1 : 2
1 : 4
1 : 8
1 : 1 6
1 : 3 2
1 : 6 4
1 : 1 2 8
1 : 2 5 6
T i m e r / E v e n t C o u n t e r C o u n t i n g E n a b l e
1 : e n a b l e
0 : d i s a b l e
O p e r a t i n g M o d e S e l e c t
T M 1
0
0
1
1
T M 0
0
1
0
1
n o m o d e a v a i l a b l e
e v e n t c o u n t e r m o d e
t i m e r m o d e
p u l s e w i d t h m e a s u r e m e n t m o d e
P u l s e W i d t h M e a s u r e m e n t A c t i v e E d g e S e l e c t
1 : s t a r t c o u n t i n g o n r i s i n g e d g e , s t o p o n f a l l i n g e d g e
0 : s t a r t c o u n t i n g o n f a l l i n g e d g e , s t o p o n r i s i n g e d g e
I n c r e m e n t
T i m e r C o n t r o l l e r
P r e s c a l e r O u t p u t
T i m e r + 1
T i m e r + 2
T i m e r + N T i m e r + N + 1
Timer Mode Timing Chart

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Holtek HT48R05A-1 and is the answer not in the manual?

Holtek HT48R05A-1 Specifications

General IconGeneral
BrandHoltek
ModelHT48R05A-1
CategoryI/O Systems
LanguageEnglish