
Rev. 2.50
�00
��ne 22� 20��
Rev. 2.50
�0�
��ne 22� 20��
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Each device in the series contains a specific number of either Compact Type, Standard Type and
Enhanced Type TM units which are shown in the table together with their individual reference name,
TM0~TM3.
Device
TM0
TM1
TM2
TM3
HT66F20
�0-bit CTM
�0-bit STM
—
—
HT66F30
�0-bit CTM
�0-bit ETM
—
—
HT66F40
�0-bit CTM
�0-bit ETM
�6-bit STM
—
HT66F50
�0-bit CTM
�0-bit ETM
�6-bit STM
�0-bit CTM
HT66F60
�0-bit CTM
�0-bit ETM
�6-bit STM
�0-bit CTM
TM Name/Type Reference
TM Operation
The three different types of TM offer a diverse range of functions, from simple timing operations
to PWM signal generation. The key to understanding how the TM operates is to see it in terms of
a free running counter whose value is then compared with the value of pre-programmed internal
comparators. When the free running counter has the same value as the pre-programmed comparator,
known as a compare match situation, a TM interrupt signal will be generated which can clear the
counter and perhaps also change the condition of the TM output pin. The internal TM counter is
driven by a user selectable clock source, which can be an internal clock or an external pin.
TM Clock Source
The clock source which drives the main counter in each TM can originate from various sources.
The selection of the required clock source is implemented using the TnCK2~TnCK0 bits in the TM
control registers. The clock source can be a ratio of either the system clock f
SYS
or the internal high
clock f
H
, the f
TBC
clock source or the external TCKn pin. Note that setting these bits to the value 101
will select a reserved clock input, in effect disconnecting the TM clock source. The TCKn pin clock
source is used to allow an external signal to drive the TM as an external clock source or for event
counting.
TM Interrupts
The Compact and Standard type TMs each have two internal interrupts, one for each of the internal
comparator A or comparator P, which generate a TM interrupt when a compare match condition
occurs. As the Enhanced type TM has three internal comparators and comparator A or comparator
B or comparator P compare match functions, it consequently has three internal interrupts. When a
TM interrupt is generated it can be used to clear the counter and also to change the state of the TM
output pin.