Rev. 2.50 164 June 22, 2017 Rev. 2.50 165 June 22, 2017
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
Single Pulse Mode
Toselectthismode,therequiredbitpairs,TnAM1,TnAM0andTnBM1,TnBM0shouldbesetto
10respectivelyandalsothecorrespondingTnAIO1,TnAIO0andTnBIO1,TnBIO0bitsshouldbe
setto11respectively.TheSinglePulseOutputMode,asthenamesuggests,willgenerateasingle
shotpulseontheTMoutputpin.
ThetriggerforthepulseTPnAoutputleadingedgeisalowtohightransitionoftheTnONbit,which
canbeimplementedusingtheapplicationprogram.ThetriggerforthepulseTPnBoutputleading
edgeisacomparematchfromComparatorB,whichcanbeimplementedusingtheapplication
program.HoweverintheSinglePulseMode,theTnONbitcanalsobemadetoautomatically
changefromlowtohighusingtheexternalTCKnpin,whichwillinturninitiatetheSinglePulse
outputofTPnA.WhentheTnONbittransitionstoahighlevel,thecounterwillstartrunningand
thepulseleadingedgeofTPnAwillbegenerated.TheTnONbitshouldremainhighwhenthepulse
isinitsactivestate.ThegeneratedpulsetrailingedgeofTPnAandTPnBwillbegeneratedwhen
theTnONbitisclearedtozero,whichcanbeimplementedusingtheapplicationprogramorwhena
comparematchoccursfromComparatorA.
HoweveracomparematchfromComparatorAwillalsoautomaticallycleartheTnONbitandthus
generatetheSinglePulseoutputtrailingedgeofTPnAandTPnB.InthiswaytheCCRAvaluecan
beusedtocontrolthepulsewidthofTPnA.TheCCRA-CCRBvaluecanbeusedtocontrolthe
pulsewidthofTPnB.AcomparematchfromComparatorAandComparatorBwillalsogenerate
TMinterrupts.ThecountercanonlyberesetbacktozerowhentheTnONbitchangesfromlowto
highwhenthecounterrestarts.IntheSinglePulseModeCCRPisnotused.TheTnCCLRbitisalso
notused.
S/W Command
SET“TnON”
or
TCKn Pin
Transition
CCRB
Leading Edge
CCRA
Trailing Edge
S/W Command
CLR“TnON”
or
CCRA Compare
Match
TPnA Output Pin
TPnB Output Pin
Pulse Width = (CCRA-CCRB) Value
Pulse Width = CCRA Value
Counter Value
CCRB
CCRA
0
Time
TnON = 1
CCRB Compare
Match
S/W Command
CLR“TnON”
or
CCRA Compare
Match
CCRB
Trailing Edge
CCRA
Leading Edge
TnON bit
0 ® 1
TnON bit
1 ® 0
TnON bit
1 ® 0
Single Pulse Generation