EasyManua.ls Logo

Holtek HT66F0175 - D Operation

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 124 August 28, 2017 Rev. 1.50 125 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
A/D Input Pins
AlloftheA/Danaloginputpinsarepin-sharedwiththeI/Opinsaswellasotherfunctions.The
correspondingpin-sharedfunctionselectionbitsintheACERLregisterdeterminewhichexternal
inputpinsareselectedasA/Dconverteranalogchannelinputsorotherfunctionalpins.Ifthe
correspondingpinissetuptobeanA/Dconverteranalogchannelinput,theoriginalpinfunctions
willbedisabled.Inthisway,pinscanbechangedunderprogramcontroltochangetheirfunction
betweenA/Dinputsandotherfunctions.Allpull-highresistors,whicharesetupthroughregister
programming,willbeautomaticallydisconnectedifthepinsaresetupasA/Dinputs.Notethatit
isnotnecessarytorstsetuptheA/DpinasaninputintheportcontrolregistertoenabletheA/D
inputaswhentherelevantA/DinputfunctionselectionbitsenableanA/Dinput,thestatusofthe
portcontrolregisterwillbeoverridden.
TheA/Dconverterhasitsownreferencevoltageinputpin,VREFI.However,thereferencevoltage
canalsobesuppliedfromthepowersupplypinoraninternalBandgapcircuit,achoicewhich
ismadethroughtheSAVRS3~SAVRS0bitsintheSADC2register.TheselectedA/Dreference
voltagecanbeoutputontheVREFpin.Theanaloginputvaluesmustnotbeallowedtoexceedthe
valueofV
REF
.NotethattheVREFIorVREFpinfunctionselectionbitintheSADC2registermust
beproperlyconguredbeforethereferencevoltagepinfunctionisused.
A/D Reference Voltage
ThereferencevoltagesupplytotheA/DConvertercanbesuppliedfromthepositivepowersupply
pin,V
DD
,anexternalreferencesourcesuppliedonpinVREFIoraninternalreferencesourcederived
fromtheBandgapcircuit.Thentheselectedreferencevoltagesourcecanbeampliedthrougha
programmablegainamplierexceptthevoltagesourcedfromV
DD
.ThePGAgaincanbeequalto
1,2,3or4.ThedesiredselectionismadeusingtheSAVRS3~SAVRS0bitsintheSADC2register
andrelevantpin-sharedfunctionselectionbits.Notethatthedesiredselectedreferencevoltagewill
beoutputontheVREFpinwhichispin-sharedwithotherfunctions.AstheVREFIandVREFpins
botharepin-sharedwithotherfunctions,whentheVREFIorVREFpinisselectedasthereference
voltagesupplypin,theVREFIorVREFpin-sharedfunctionselectionbitshouldbeproperly
conguredtodisableotherpin-sharedfunctions.
A/D Operation
TheSTARTbitintheSADC0registerisusedtostarttheADconversion.Whenthemicrocontroller
setsthisbitfromlowtohighandthenlowagain,ananalogtodigitalconversioncyclewillbe
initiated.
TheADBZbitintheSADC0registerisusedtoindicatewhethertheanalogtodigitalconversion
processisinprogressornot.Thisbitwillbeautomaticallysetto1bythemicrocontrollerafteran
A/Dconversionissuccessfullyinitiated.WhentheA/Dconversioniscomplete,theADBZwillbe
clearedto0.Inaddition,thecorrespondingA/Dinterruptrequestagwillbesetintheinterrupt
controlregister,andifthecorrespondinginterruptcontrolbitsareenabled,aninternalinterrupt
signalwillbegenerated.ThisA/Dinternalinterruptsignalwilldirecttheprogramflowtothe
associatedA/Dinternalinterruptaddressforprocessing.IftheA/Dinternalinterruptisdisabled,the
microcontrollercanpolltheADBZbitintheSADC0registertocheckwhetherithasbeencleared
asanalternativemethodofdetectingtheendofanA/Dconversioncycle.

Table of Contents