User`s guide
Rev. 1.10 126 November 14, 2014 Rev. 1.10 127 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
Programming Considerations
Bydisablingtherelevantinterruptenablebits,arequestedinterruptcanbepreventedfrombeing
serviced,however,onceaninterruptrequestflagisset,itwillremaininthisconditioninthe
interruptregisteruntilthecorrespondinginterruptisservicedoruntiltherequestagisclearedby
theapplicationprogram.
WhereacertaininterruptiscontainedwithinaMulti-functioninterrupt,thenwhentheinterrupt
serviceroutineisexecuted,asonlytheMulti-functioninterruptrequestags,MF0F~MF2F,will
beautomaticallycleared,theindividualrequestflagforthefunctionneedstobeclearedbythe
applicationprogram.
Itisrecommendedthatprogramsdonotusethe“CALL”instructionwithintheinterruptservice
subroutine.Interruptsoftenoccurinanunpredictablemannerorneedtobeservicedimmediately.
Ifonlyonestackisleftandtheinterruptisnotwellcontrolled,theoriginalcontrolsequencewillbe
damagedonceaCALLsubroutineisexecutedintheinterruptsubroutine.
EveryinterrupthasthecapabilityofwakingupthemicrocontrollerwhenitisinSLEEPorIDLE
Mode,thewakeupbeinggeneratedwhentheinterruptrequestagchangesfromlowtohigh.Ifitis
requiredtopreventacertaininterruptfromwakingupthemicrocontrollerthenitsrespectiverequest
agshouldberstsethighbeforeenterSLEEPorIDLEMode.
AsonlytheProgramCounterispushedontothestack,thenwhentheinterruptisserviced,ifthe
contentsoftheaccumulator,statusregisterorotherregistersarealteredbytheinterruptservice
program,theircontentsshouldbesavedtothememoryatthebeginningoftheinterruptservice
routine.
Toreturnfromaninterruptsubroutine,eitheraRETorRETIinstructionmaybeexecuted.TheRETI
instructioninadditiontoexecutingareturntothemainprogramalsoautomaticallysetstheEMI
bithightoallowfurtherinterrupts.TheRETinstructionhoweveronlyexecutesareturntothemain
programleavingtheEMIbitinitspresentzerostateandthereforedisablingtheexecutionoffurther
interrupts.