Rev. 2.50 126 June 22, 2017 Rev. 2.50 127 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
• TM1C1 Register – 10-bit STM
Bit 7 6 5 4 3 2 1 0
Name
T1M1 T1M0 T1IO1 T1IO0 T1OC T1POL T1DPX T1CCLR
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
Bit7~6 T1M1~T1M0:SelectTM1OperatingMode
00:CompareMatchOutputMode
01:CaptureInputMode
10:PWMModeorSinglePulseOutputMode
11:Timer/CounterMode
ThesebitssetuptherequiredoperatingmodefortheTM.Toensurereliableoperation
theTMshouldbeswitchedoffbeforeanychangesaremadetotheT1M1andT1M0
bits.IntheTimer/CounterMode,theTMoutputpincontrolmustbedisabled.
Bit5~4 T1IO1~T1IO0:SelectTP1_0,TP1_1outputfunction
CompareMatchOutputMode
00:Nochange
01:Outputlow
10:Outputhigh
11:Toggleoutput
PWMMode/SinglePulseOutputMode
00:PWMoutputinactivestate
01:PWMoutputactivestate
10:PWMoutput
11:Singlepulseoutput
CaptureInputMode
00:InputcaptureatrisingedgeofTP1_0,TP1_1
01:InputcaptureatfallingedgeofTP1_0,TP1_1
10:Inputcaptureatfalling/risingedgeofTP1_0,TP1_1
11:Inputcapturedisabled
Timer/counterMode:
Unused
ThesetwobitsareusedtodeterminehowtheTMoutputpinchangesstatewhena
certainconditionisreached.Thefunctionthatthesebitsselectdependsuponinwhich
modetheTMisrunning.
IntheCompareMatchOutputMode,theT1IO1andT1IO0bitsdeterminehowthe
TMoutputpinchangesstatewhenacomparematchoccursfromtheComparatorA.
TheTMoutputpincanbesetuptoswitchhigh,switchlowortotoggleitspresent
statewhenacomparematchoccursfromtheComparatorA.Whenthebitsareboth
zero,thennochangewilltakeplaceontheoutput.TheinitialvalueoftheTMoutput
pinshouldbesetupusingtheT1OCbitintheTM1C1register.Notethattheoutput
levelrequestedbytheT1IO1andT1IO0bitsmustbedifferentfromtheinitialvalue
setupusingtheT1OCbitotherwisenochangewilloccurontheTMoutputpinwhen
acomparematchoccurs.AftertheTMoutputpinchangesstateitcanberesettoits
initiallevelbychangingtheleveloftheT1ONbitfromlowtohigh.
InthePWMMode,theT1IO1andT1IO0bitsdeterminehowtheTMoutputpin
changesstatewhenacertaincomparematchconditionoccurs.ThePWMoutput
functionismodiedbychangingthesetwobits.Itisnecessarytochangethevalues
oftheT1IO1andT1IO0bitsonlyaftertheTMhasbeenswitchedoff.Unpredictable
PWMoutputswilloccuriftheT1IO1andT1IO0bitsarechangedwhentheTMis
running.