Rev. 1.71 46 April 11, 2017 Rev. 1.71 47 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Standby Current Considerations
AsthemainreasonforenteringtheSLEEPorIDLEModeistokeepthecurrentconsumptionof
thedevicestoaslowavalueaspossible,perhapsonlyintheorderofseveralmicro-ampsexcept
intheIDLE1Mode,thereareotherconsiderationswhichmustalsobetakenintoaccountbythe
circuitdesignerifthepowerconsumptionistobeminimised.Specialattentionmustbemadeto
theI/Opinsonthedevice.Allhigh-impedanceinputpinsmustbeconnectedtoeitheraxedhigh
orlowlevelasanyfloatinginputpinscouldcreateinternaloscillationsandresultinincreased
currentconsumption.Thisalsoappliestodeviceswhichhavedifferentpackagetypes,astheremay
beunbonbedpins.Thesemusteitherbesetupasoutputsorifsetupasinputsmusthavepull-high
resistorsconnected.
Caremustalsobetakenwiththeloads,whichareconnectedtoI/Opins,whicharesetupas
outputs.Theseshouldbeplacedinaconditioninwhichminimumcurrentisdrawnorconnected
onlytoexternalcircuitsthatdonotdrawcurrent,suchasotherCMOSinputs.IntheIDLE1Mode
thesystemoscillatorison,ifthesystemoscillatorisfromthehighspeedsystemoscillator,the
additionalstandbycurrentwillalsobeperhapsintheorderofseveralhundredmicro-amps.
Wake-up
AfterthesystementerstheSLEEPorIDLEMode,itcanbewokenupfromoneofvarioussources
listedasfollows:
• Anexternalreset
•
AnexternalfallingedgeonPortA
• Asysteminterrupt
• AWDToverow
Ifthesystemiswokenupbyanexternalreset,thedevicewillexperienceafullsystemreset,
however,IfthesedevicesarewokenupbyaWDToverflow,aWatchdogTimerresetwillbe
initiated.Althoughbothofthesewake-upmethodswillinitiatearesetoperation,theactualsource
ofthewake-upcanbedeterminedbyexaminingtheTOandPDFags.ThePDFagisclearedbya
systempower-uporexecutingtheclearWatchdogTimerinstructionsandissetwhenexecutingthe
“HALT”instruction.TheTOagissetifaWDTtime-outoccurs,andcausesawake-upthatonly
resetstheProgramCounterandStackPointer,theotheragsremainintheiroriginalstatus.
EachpinonPortAcanbesetupusingthePAWUregistertopermitanegativetransitiononthepin
towake-upthesystem.WhenaPortApinwake-upoccurs,theprogramwillresumeexecutionat
theinstructionfollowingthe“HALT”instruction.Ifthesystemiswokenupbyaninterrupt,then
twopossiblesituationsmayoccur.Therstiswheretherelatedinterruptisdisabledortheinterrupt
isenabledbutthestackisfull,inwhichcasetheprogramwillresumeexecutionattheinstruction
followingthe“HALT”instruction.Inthissituation,theinterruptwhichwoke-upthedevicewillnot
beimmediatelyserviced,butwillratherbeservicedlaterwhentherelatedinterruptisnallyenabled
orwhenastacklevelbecomesfree.Theothersituationiswheretherelatedinterruptisenabledand
thestackisnotfull,inwhichcasetheregularinterruptresponsetakesplace.Ifaninterruptrequest
flagissethighbeforeenteringtheSLEEPorIDLEMode,thewake-upfunctionoftherelated
interruptwillbedisabled.