Compact Type TM – CTM
Although the simplest form of the three TM types, the Compact TM type still contains three
operating modes, which are Compare Match Output, Timer/Event Counter and PWM Output modes.
The Compact TM can also be controlled with an external input pin and can drive one or two external
output pins. These two external output pins can be the same signal or the inverse signal.
CTM
HT66F20
�0-bit CTM
HT66F30
�0-bit CTM
HT66F40
�0-bit CTM
HT66F50
�0-bit CTM
HT66F60
�0-bit CTM
f
/ 4
0 0 0
S Y S
f
0 0 1
S Y S
f
/ 1 6
0 1 0
H
f
/ 6 4
0 1 1
H
f
1 0 0
T B C
R e s e r v e d
1 0 1
1 1 0
T C K n
1 1 1
T n O N
T n P A U
T n C K 2 ~ T n C K 0
Compact TM Operation
At its core is a 10-bit count-up counter which is driven by a user selectable internal or external clock
source. There are also two internal comparators with the names, Comparator A and Comparator P.
These comparators will compare the value in the counter with CCRP and CCRA registers. The
CCRP is three bits wide whose value is compared with the highest three bits in the counter while the
CCRA is the ten bits and therefore compares with all counter bits.
The only way of changing the value of the 10-bit counter using the application program, is to
clear the counter by changing the TnON bit from low to high. The counter will also be cleared
automatically by a counter overflow or a compare match with one of its associated comparators.
When these conditions occur, a TM interrupt signal will also usually be generated. The Compact
Type TM can operate in a number of different operational modes, can be driven by different clock
sources including an input pin and can also control an output pin. All operating setup conditions are
selected using relevant internal registers.
Rev. 2.50
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
Name
TM No.
TM Input Pin
0
TCK0
0
TCK0
0
TCK0
0� 3
TCK0� TCK3
0� 3
TCK0� TCK3
C C R P
C o m p a r a t o r P M a t c h
3 - b i t C o m p a r a t o r P
b 7 ~ b 9
C o u n t e r C l e a r
1 0 - b i t C o u n t - u p C o u n t e r
T n C C L R
b 0 ~ b 9
C o m p a r a t o r A
M a t c h
1 0 - b i t C o m p a r a t o r A
C C R A
Compact Type TM Block Diagram
��2
A/D Flash MCU with EEPROM
TM Output Pin
TP0_0
TP0_0� TP0_�
TP0_0� TP0_�
TP0_0� TP0_�� TP3_0� TP3_�
TP0_0� TP0_�� TP3_0� TP3_�
T n P F I n t e r r u p t
T n O C
O u t p u t
P o l a r i t y
0
C o n t r o l
C o n t r o l
1
T n M 1 , T n M 0
T n P O L
T n I O 1 , T n I O 0
T n A F I n t e r r u p t
T P n _ 0
T P n P i n
O u t p u t
T P n _ 1
��ne 22� 20��
Need help?
Do you have a question about the HT66F20 and is the answer not in the manual?