EasyManua.ls Logo

Holtek HT66F0175 - Page 75

Default Icon
207 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50 74 August 28, 2017 Rev. 1.50 75 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
Programming Considerations
TheTMCounterRegistersandtheCapture/CompareCCRAandCCRPregisters,beingeither10-
bitor16-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CCRAandCCRPregistersareimplementedinthewayshowninthefollowingdiagramand
accessingtheseregisterpairsiscarriedoutinaspecicwayasdescribedabove,itisrecommended
tousethe“MOV”instructiontoaccesstheCCRAandCCRPlowbyteregisters,namedTMnALand
TMnRPL,usingthefollowingaccessprocedures.AccessingtheCCRAorCCRPlowbyteregisters
withoutfollowingtheseaccessprocedureswillresultinunpredictablevalues.
Data Bus
8-bit Buffer
TMnDHTMnDL
TMnAH
TMnAL
TMn Counter Register (Read only)
TMn CCRA Register (Read/Write)
TMnRPHTMnRPL
PTM CCRP Register (Read/Write)
Thefollowingstepsshowthereadandwriteprocedures:
• WritingDatatoCCRAorCCRP
Step1.WritedatatoLowByteTMnALorTMnRPL
notethatheredataisonlywrittentothe8-bitbuffer.
Step2.WritedatatoHighByteTMnAHorTMnRPH
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orCCRP
Step1.ReaddatafromtheHighByteTMnDH,TMnAHorTMnRPH
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TMnDL,TMnALorTMnRPL
thisstepreadsdatafromthe8-bitbuffer.

Table of Contents