User`s guide
Rev. 1.10 74 November 14, 2014 Rev. 1.10 75 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
Bit2~0 T0RP2~T0RP0: TM0CCRP3-bitregister,comparedwiththeTM0Counterbit9~bit7
ComparatorPMatchPeriod
000:1024TM0clocks
001:128TM0clocks
010:256TM0clocks
011:384TM0clocks
100:512TM0clocks
101:640TM0clocks
110:768TM0clocks
111:896TM0clocks
ThesethreebitsareusedtosetupthevalueontheinternalCCRP3-bitregister,which
arethencomparedwiththeinternalcounter’shighestthreebits.Theresultofthis
comparisoncanbeselectedtocleartheinternalcounteriftheT0CCLRbitissetto
zero.SettingtheT0CCLRbittozeroensuresthatacomparematchwiththeCCRP
valueswillresettheinternalcounter.AstheCCRPbitsareonlycomparedwiththe
highestthreecounterbits,thecomparevaluesexistin128clockcyclemultiples.
Clearingallthreebitstozeroisineffectallowingthecountertooverflowatits
maximumvalue
TM0C1 Register
Bit 7 6 5 4 3 2 1 0
Name T0M1 T0M0 T0IO1 T0IO0 T0OC T0POL T0DPX T0CCLR
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 T0M1~T0M0: SelectTM0OperatingMode
00:CompareMatchOutputMode
01:CaptureInputMode
10:PWMModeorSinglePulseOutputMode
11:Timer/CounterMode
ThesebitssetuptherequiredoperatingmodefortheTM.Toensurereliableoperation
theTMshouldbeswitchedoffbeforeanychangesaremadetotheT0M1andT0M0
bits.IntheTimer/CounterMode,theTMoutputpincontrolmustbedisabled.
Bit5~4 T0IO1~T0IO0:SelectTP0outputfunction
CompareMatchOutputMode
00:Nochange
01:Outputlow
10:Outputhigh
11:Toggleoutput
PWMMode/SinglePulseOutputMode
00:PWMOutputinactivestate
01:PWMOutputactivestate
10:PWMoutput
11:Singlepulseoutput
CaptureInputMode
00:InputcaptureatrisingedgeofTP0
01:InputcaptureatfallingedgeofTP0
10:Inputcaptureatfalling/risingedgeofTP0
11:Inputcapturedisabled
Timer/counterMode
unused
ThesetwobitsareusedtodeterminehowtheTM0outputpinchangesstatewhena
certainconditionisreached.Thefunctionthatthesebitsselectdependsuponinwhich
modetheTM0isrunning.
IntheCompareMatchOutputMode,theT0IO1andT0IO0bitsdeterminehowthe