User`s guide

Rev. 1.10 60 November 14, 2014 Rev. 1.10 61 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
PB2/TP1_0
PB2 Out put F unctio n
PBS03~P BS02
0
1
PA7/TC K1
Outp ut
TC K I nput

 
PB3/TP1_1
PB3 Out put F unctio n
PBS05~P BS04
0
1
Outp ut
TM1 Function Pin Control Block Diagram
Note:1.TheI/OregisterdatabitsshownareusedforTMoutputinversioncontrol.
2.IntheCaptureInputMode,theTMpincontrolregistermustneverenablemorethanoneTMinput.
Programming Considerations
TheTMCounterRegisters,theCapture/CompareCCRAregister,beingboth10-bit,allhavealowand
highbytestructure.Thehighbytescanbedirectlyaccessed,butasthelowbytescanonlybeaccessed
viaaninternal8-bitbuffer,readingorwritingtotheseregisterpairsmustbecarriedoutinaspecic
way.Theimportantpointtonoteisthatdatatransfertoandfromthe8-bitbufferanditsrelatedlow
byteonlytakesplacewhenawriteorreadoperationtoitscorrespondinghighbyteisexecuted.
AstheCCRAregisterisimplementedinthewayshowninthefollowingdiagramandaccessing
theseregisterpairsiscarriedoutinaspecicwaydescribedabove,itisrecommendedtousethe
“MOV”instructiontoaccesstheCCRAlowbyteregisters,namedTMxAL,usingthefollowing
accessprocedures.AccessingtheCCRAlowbyteregisterwithoutfollowingtheseaccessprocedures
willresultinunpredictablevalues.
    
 
 
 
 

  


Thefollowingstepsshowthereadandwriteprocedures:
• WritingDatatoCCRA
Step1.WritedatatoLowByteTMxAL
-notethatheredataisonlywrittentothe8-bitbuffer.
Step2.WritedatatoHighByteTMxAH
-heredataiswrittendirectlytothehighbyteregistersandsimultaneouslydataislatchedfrom
the8-bitbuffertotheLowByteregisters.
• ReadingDatafromtheCounterRegistersandCCRA
Step1.ReaddatafromtheHighByteTMxDH,TMxAH
-heredataisreaddirectlyfromtheHighByteregistersandsimultaneouslydataislatched
fromtheLowByteregisterintothe8-bitbuffer.
Step2.ReaddatafromtheLowByteTMxDLorTMxAL
-thisstepreadsdatafromthe8-bitbuffer.