used, provides the basic on/off control of the respective timer. Setting the bit high allows the coun
-
ter to run, clearing the bit stops the counter. For timers that have prescalers, bits 0~2 of the Timer
Control Register determine the division ratio of the input clock prescaler. The prescaler bit settings
have no effect if an external clock source is used. 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 bit 3 of the
Timer Control Register which is known as TE, T0E or T1E, depending upon which timer is used.
38
A/D Type MCU
T i m e r / E v e n t C o u n t e r C o n t r o l R e g i s t e r
T M R C
N o t i m p l e m e n t e d , r e a d a s " 0 "
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 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
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 : 1
1 : 2
1 : 4
1 : 8
1 : 1 6
1 : 3 2
1 : 6 4
1 : 1 2 8
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
b 7
T ET O NT M 0T M 1
b 0
P S C 2 P S C 1 P S C 0
T i m e r / E v e n t C o u n t e r C o n t r o l R e g i s t e r
T M R 0 C
N o t i m p l e m e n t e d , r e a d a s " 0 "
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 i m e r p r e s c a l e r r a t e s e l e c t
T 0 P S C 2
0
0
0
0
1
1
1
1
T 0 P S C 1
0
0
1
1
0
0
1
1
T 0 P S C 0
0
1
0
1
0
1
0
1
T i m e r R a t e
1 : 1
1 : 2
1 : 4
1 : 8
1 : 1 6
1 : 3 2
1 : 6 4
1 : 1 2 8
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 0 M 1
0
0
1
1
T 0 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
b 7
T 0 ET 0 O NT 0 M 0T 0 M 1
b 0
T 0 P S C 2 T 0 P S C 1 T 0 P S C 0