User`s guide
Rev. 1.10 84 November 14, 2014 Rev. 1.10 85 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
A/D Converter Data Registers – ADRL, ADRH
Asthedevicecontainsaninternal12-bitA/Dconverter,theyrequiretwodataregisterstostorethe
convertedvalue.Theseareahighbyteregister,knownasADRH,andalowbyteregister,known
asADRL.Aftertheconversionprocesstakesplace,theseregisterscanbedirectlyreadbythe
microcontrollertoobtainthedigitisedconversionvalue.Asonly12bitsofthe16-bitregisterspace
isutilised,theformatinwhichthedataisstorediscontrolledbytheADRFSbitintheADCR0
registerasshownintheaccompanyingtable.D0~D11aretheA/Dconversionresultdatabits.Any
unusedbitswillbereadaszero.
ADRFS
ADRH ADRL
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
0 D11 D10 D9 D8 D7 D6 D5
D4 D3 D2 D1 D0 0 0 0 0
1 0 0 0 0 D11 D10 D9 D8 D7 D6 D5
D4 D3 D2 D1 D0
A/D Data Registers
A/D Converter Control Registers – ADCR0, ADCR1
TocontrolthefunctionandoperationoftheA/Dconverter,threecontrolregistersknownasADCR0,
ADCR1areprovided.These8-bitregistersdenefunctionssuchastheselectionofwhichanalog
channelisconnectedtotheinternalA/Dconverter,thedigitiseddataformat,theA/Dclocksource
aswellascontrollingthestartfunctionandmonitoringtheA/Dconverterendofconversionstatus.
TheACS4~ACS0bitsintheADCR0registerdenetheADCinputchannelnumber.Asthedevice
containsonlyoneactualanalogtodigitalconverterhardwarecircuit,eachoftheindividual8analog
inputsmustberoutedtotheconverter.ItisthefunctionoftheACS4~ACS0bitstodetermine
whichanalogchannelinputsignals,DEM_OPA_output,OCP_OPA_outputorinternal1.04Vis
actuallyconnectedtotheinternalA/Dconverter.
ThePAS0controlregistercontainsthePAS07~PAS00bitsandPAS1controlregistercontains
thePAS17~PAS10bitswhichdeterminewhichpinsonPortAareusedasanaloginputsforthe
A/DconverterinputandwhichpinsarenottobeusedastheA/Dconverterinput.Settingthe
correspondingbithighwillselecttheA/Dinputfunction,clearingthebittozerowillselecteither
theI/Oorotherpin-sharedfunction.WhenthepinisselectedtobeanA/Dinput,itsoriginal
functionwhetheritisanI/Oorotherpin-sharedfunctionwillberemoved.Inaddition,anyinternal
pull-highresistorsconnectedtothesepinswillbeautomaticallyremovedifthepinisselectedtobe
anA/Dinput.
ADCR0 Register
Bit 7 6 5 4 3 2 1 0
Name START EOCB ADOFF ACS4 ACS3 ACS2 ACS1 ACS0
R/W R/W R R/W R/W R/W R/W R/W R/W
POR 0 1 1 0 0 0 0 0
Bit7 START:StarttheA/Dconversion
0-->1-->0:start
0-->1:resettheA/DconverterandsetEOCBto"1"
ThisbitisusedtoinitiateanA/Dconversionprocess.Thebitisnormallylowbutifset
highandthenclearedlowagain,theA/Dconverterwillinitiateaconversionprocess.
WhenthebitissethightheA/Dconverterwillbereset.
Bit6 EOCB:EndofA/Dconversionag
0:A/Dconversionended
1:A/Dconversioninprogress
ThisreadonlyagisusedtoindicatewhenanA/Dconversionprocesshascompleted.
Whentheconversionprocessisrunningthebitwillbehigh.