Download Print this page

Holtek BS66F340C Manual page 118

Touch a/d flash mcu

Advertisement

TM Interrupts
The Compact, Standard or Periodic type TM has 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. 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 or two TM input pin, with the label xTCKn and
xTPnI respectively. The xTMn input pin, xTCKn, is essentially a clock source for the xTMn and is
selected using the xTnCK2~xTnCK0 bits in the xTMnC0 register. This external TM input pin allows
an external clock source to drive the internal TM. The xTCKn input pin can be chosen to have either
a rising or falling active edge. The STCK and PTCK pins are also used as the external trigger input
pin in single pulse output mode for the STM and PTM respectively.
For STM and PTM, another input pin, STPI or PTPI, is the capture input whose active edge can
be a rising edge, a falling edge or both rising and falling edges and the active edge transition type
is selected using the STIO1~STIO0 or PTIO1~PTIO0 bits in the STMC1 or PTMC1 register
respectively. There is another capture input, PTCK, for PTM capture input mode, which can be used
as the external trigger input source except the PTPI pin.
The TMs each have two output pins, xTPn and xTPnB. The xTPnB is the inverted signal of the
xTPn output. 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 situation occurs. The
output pins are also the pins where the TM generates the PWM output waveform.
As the TM input and output pins are pin-shared with other functions, the TM input and output
functions must first be setup using the relevant pin-shared function selection bits described in the
Pin-shared Function section. The details of the pin-shared function selection are described in the
pin-shared function section.
Device
BS66F340C
BS66F350C
BS66F360C
Rev. 1.11
BS66F340C/BS66F350C/BS66F360C
CTM0, CTM1
Input
Output
Input
CTCK0
CTP0, CTP0B
STCK, STPI
CTCK1
CTP1, CTP1B
TM External Pins
CTMn
CTMn Function Pin Block Diagram (n=0~1)
118
Touch A/D Flash MCU
STM
Output
Input
STP, STPB
PTCK, PTPI
Clock input
CTCKn
CCR output
CTPn
CTPnB
PTM
Output
PTP, PTPB
November 09, 2023

Advertisement

loading
Need help?

Need help?

Do you have a question about the BS66F340C and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Bs66f350cBs66f360c