
Rev. 1.21
66
�ove��e� ��� 2�1�
Rev. 1.21
6�
�ove��e� ��� 2�1�
HT66F488/HT66F489
A/D Flash MCU with EEPROM
HT66F488/HT66F489
A/D Flash MCU with EEPROM
If the TM is in the Compare Match Output Mode then the TM output pin will be reset
to its initial condition, as specified by the CTOC bit, when the CTON bit changes from
low to high.
Bit 2 ~ 0
CTRP2~CTRP0
: CTM CCRP 3-bit register, compared with the CTM Counter bit9~bit7
Comparator P Match Period
000: 1024 CTM clocks
001: 128 CTM clocks
010: 256 CTM clocks
011: 384 CTM clocks
100: 512 CTM clocks
101: 640 CTM clocks
110: 768 CTM clocks
111: 896 CTM clocks
These three bits are used to setup the value on the internal CCRP 3-bit register, which
are then compared with the internal counter's highest three bits. The result of this
comparison can be selected to clear the internal counter if the CTCCLR bit is set to
zero. Setting the CTCCLR bit to zero ensures that a compare match with the CCRP
values will reset the internal counter. As the CCRP bits are only compared with the
highest three counter bits, the compare values exist in 128 clock cycle multiples.
Clearing all three bits to zero is in effect allowing the counter to overflow at its
maximum value.
CTMC1 Register
Bit
7
6
5
4
3
2
1
0
�a�e
CTM1
CTM�
CTIO1
CTIO�
CTOC
CTPOL
CTDPX CTCCLR
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
�
�
�
�
�
�
�
�
Bit 7 ~ 6
CTM1~CTM0
: Select CTM Operating Mode
00: Compare Match Output Mode
01: Compare Match Output Mode
10: PWM Mode
11: Timer/Counter Mode
These bits setup the required operating mode for the TM. To ensure reliable operation
the TM should be switched off before any changes are made to the bits. In the Timer/
Counter Mode, the TM output pin control must be disabled.
Bit 5 ~ 4
CTIO1~CTIO0
: Select CTM output function
Compare Match Output Mode
00: No change
01: Output low
10: Output high
11: Toggle output
PWM Mode
00: PWM output inactive state
01: PWM output active state
10: PWM output
11: Undefined
Timer/counter Mode
Unused
These two bits are used to determine how the TM output pin changes state when a
certain condition is reached. The function that these bits select depends upon in which
mode the TM is running.