ETIC 2230 Guia do Utilizador Página 127

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 148
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 126
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
Bydisablingtherelevantinterruptenablebits,arequestedinterruptcanbepreventedfrombeing
serviced,however,onceaninterruptrequestflagisset,itwillremaininthisconditioninthe
interruptregisteruntilthecorrespondinginterruptisservicedoruntiltherequestagisclearedby
theapplicationprogram.
WhereacertaininterruptiscontainedwithinaMulti-functioninterrupt,thenwhentheinterrupt
serviceroutineisexecuted,asonlytheMulti-functioninterruptrequestags,MF0F~MF2F,will
beautomaticallycleared,theindividualrequestflagforthefunctionneedstobeclearedbythe
applicationprogram.
Itisrecommendedthatprogramsdonotusethe“CALL”instructionwithintheinterruptservice
subroutine.Interruptsoftenoccurinanunpredictablemannerorneedtobeservicedimmediately.
Ifonlyonestackisleftandtheinterruptisnotwellcontrolled,theoriginalcontrolsequencewillbe
damagedonceaCALLsubroutineisexecutedintheinterruptsubroutine.
EveryinterrupthasthecapabilityofwakingupthemicrocontrollerwhenitisinSLEEPorIDLE
Mode,thewakeupbeinggeneratedwhentheinterruptrequestagchangesfromlowtohigh.Ifitis
requiredtopreventacertaininterruptfromwakingupthemicrocontrollerthenitsrespectiverequest
agshouldberstsethighbeforeenterSLEEPorIDLEMode.
AsonlytheProgramCounterispushedontothestack,thenwhentheinterruptisserviced,ifthe
contentsoftheaccumulator,statusregisterorotherregistersarealteredbytheinterruptservice
program,theircontentsshouldbesavedtothememoryatthebeginningoftheinterruptservice
routine.
Toreturnfromaninterruptsubroutine,eitheraRETorRETIinstructionmaybeexecuted.TheRETI
instructioninadditiontoexecutingareturntothemainprogramalsoautomaticallysetstheEMI
bithightoallowfurtherinterrupts.TheRETinstructionhoweveronlyexecutesareturntothemain
programleavingtheEMIbitinitspresentzerostateandthereforedisablingtheexecutionoffurther
interrupts.
Vista de página 126
1 2 ... 122 123 124 125 126 127 128 129 130 131 132 ... 147 148

Comentários a estes Manuais

Sem comentários