Rev. 1.71 92 April 11, 2017 Rev. 1.71 93 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Single Pulse Output Mode
Toselectthismode,therequiredbitpairs,PTnM1andPTnM0shouldbesetto10respectivelyand
alsothecorrespondingPTnIO1andPTnIO0bitsshouldbesetto11respectively.TheSinglePulse
OutputMode,asthenamesuggests,willgenerateasingleshotpulseontheTMoutputpin.
ThetriggerforthepulseoutputleadingedgeisalowtohightransitionofthePTnONbit,which
canbeimplementedusingtheapplicationprogram.HoweverintheSinglePulseMode,thePTnON
bitcanalsobemadetoautomaticallychangefromlowtohighusingtheexternalPTCKnpin,
whichwillinturninitiatetheSinglePulseoutput.WhenthePTnONbittransitionstoahighlevel,
thecounterwillstartrunningandthepulseleadingedgewillbegenerated.ThePTnONbitshould
remainhighwhenthepulseisinitsactivestate.Thegeneratedpulsetrailingedgewillbegenerated
whenthePTnONbitisclearedtozero,whichcanbeimplementedusingtheapplicationprogramor
whenacomparematchoccursfromComparatorA.
HoweveracomparematchfromComparatorAwillalsoautomaticallyclearthePTnONbitandthus
generatetheSinglePulseoutputtrailingedge.InthiswaytheCCRAvaluecanbeusedtocontrol
thepulsewidth.AcomparematchfromComparatorAwillalsogenerateTMinterrupts.Thecounter
canonlyberesetbacktozerowhenthePTnONbitchangesfromlowtohighwhenthecounter
restarts.IntheSinglePulseModeCCRPisnotused.ThePTnCCLRbitisalsonotused.
PTnON bit
0 � 1
S/W Command
SET“PTnON”
or
PTCKn Pin
Transition
PTnON bit
1 � 0
Trailing Edge
S/W Command
CLR“PTnON”
or
CCRA Compare
Match
PTPn/PTPnB
Output Pin
Pulse Width = CCRA Value
Leading Edge
Single Pulse Generation (n=0 or 1)