HT66F016/HT66F017/HT68F016/HT68F017
HT66F016R/HT66F017R/HT68F016R/HT68F017R
TM Interrupts
The Compact and Standard type TMs each have two in-
ternal interrupts, one for each of the internal comparator
A or comparator P, which generate a TM interrupt when
a compare match condition occurs. 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.
TM External Pins
Each of the TMs, irrespective of what type, has one TM
input pin, with the label TCKn. The TM input pin, is es-
sentially a clock source for the TM and is selected using
the TnCK2~TnCK0 bits in the TMnC0 register. This ex-
ternal TM input pin allows an external clock source to
drive the internal TM. This external TM input pin is
shared with other functions but will be connected to the
internal TM if selected using the TnCK2~TnCK0 bits.
The TM input pin can be chosen to have either a rising or
falling active edge.
The TMs each have one output pin with the label TPn.
When the TM is in the Compare Match Output Mode,
these pins can be controlled by the TM to switch to a
high or low level or to toggle when a compare match sit-
uation occurs. The external TPn output pin is also the
pin where the TM generates the PWM output waveform.
The TPn pin acts as an input when the TM is setup to op-
erate in the Capture Input Mode. As the TPn pins are
pin-shared with other functions, the TPn pin function is
enabled or disabled according to the internal TM on/off
control, operation mode and output control settings.
When the corresponding TM configuration selects the
TPn pin to be used as an output pin, the associated pin
will be setup as an external TM output pin. If the TM con-
figuration selects the TPn pin to be setup as an input pin,
the input signal supplied on the associated pin can be
derived from an external signal and other pin-shared
output function. If the TM configuration determines that
the TPn pin function is not used, the associated pin will
be controlled by other pin-shared functions. The details
of the TPn pin for each TM type and device are provided
in the accompanying table.
Device
HT66F016
HT68F016
HT66F017
HT68F017
CTM
¾
TP0
STM
TP1
TP1
Registers
TMPC
TMPC
TM Output Pins
TM Input/Output Pin Control Registers
Selecting to have a TM input/output or whether to retain
its other shared functions is implemented using one reg-
ister with a single bit in each register corresponding to a
TM input/output pin. Setting the bit high will setup the
corresponding pin as a TM input/output if reset to zero
the pin will retain its original other functions.
TMPC Register List
Device
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
HT66F016
HT68F016
¾
¾
¾
¾
¾
¾
T1CP
¾
HT66F017
HT68F017
¾
¾
¾
¾
¾
¾
T1CP
T0CP
TM0
TP0
(CTM)
TP0
T0CP
TM1
TP1
(STM)
T1CP
TP1
TP1
TM Function Pin Control Block Diagram
Rev. 1.40
51
November 22, 2016