User`s guide

Rev. 1.10 116 November 14, 2014 Rev. 1.10 117 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
Interrupts
Interruptsareanimportantpartofanymicrocontrollersystem.Whenanexternaleventoran
internalfunctionsuchasaTimerModuleoranA/Dconverterrequiresmicrocontrollerattention,
theircorrespondinginterruptwillenforceatemporarysuspensionofthemainprogramallowingthe
microcontrollertodirectattentiontotheirrespectiveneeds.Thedevicecontainsseveralexternal
interruptandinternalinterruptsfunctions.Theexternalinterruptisgeneratedbytheactionof
theexternalINT0andINT1pins,whiletheinternalinterruptsaregeneratedbyvariousinternal
functionssuchastheTMs,Demodulation,OCP,TimeBase,LVD,EEPROMandtheA/Dconverter.
Interrupt Registers
Overallinterruptcontrol,whichbasicallymeansthesettingofrequestflagswhencertain
microcontrollerconditionsoccurandthesettingofinterruptenablebitsbytheapplicationprogram,
iscontrolledbyaseriesofregisters,locatedintheSpecialPurposeDataMemory,asshowninthe
accompanyingtable.Thenumberofregistersdependsuponthedevicechosenbutfallintothree
categories.TherstistheINTC0~INTC2registerswhichsetuptheprimaryinterrupts,thesecond
istheMFI0~MFI2registerswhichsetuptheMulti-functioninterrupts.FinallythereisanINTEG
registertosetuptheexternalinterrupttriggeredgetype.
Eachregistercontainsanumberofenablebitstoenableordisableindividualregistersaswellas
interruptflagstoindicatethepresenceofaninterruptrequest.Thenamingconventionofthese
followsaspecicpattern.Firstislistedanabbreviatedinterrupttype,thenthe(optional)numberof
thatinterruptfollowedbyeitheran“E”forenable/disablebitor“F”forrequestag.
Function Enable Bit Request Flag Notes
Global EMI
INTn Pin INTnE INTnF n=0 or 1
OCP OCPE OCPF
Demodulation DEME DEMF
A/D Converter ADE ADF
Multi-function MFnE MFnF
n=0~2
Time Base TBnE TBnF n=0 or 1
I
2
C IICE IICF
LVD LVE LVF
EEPROM DEE DEF
TM
TnPE TnPF
n=0 or 1
TnAE TnAF
Interrupt Register Bit Naming Conventions
Interrupt Register Contents
Name Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
INTEG INT1S1 INT1S0 INT0S1 INT0S0
INTC0 INT0F DEMF OCPF INT0E DEME OCPE EMI
INTC1 ADF MF2F MF1F MF0F ADE MF2E MF1E MF0E
INTC2 INT1F TB1F TB0F IICF INT1E TB1E TB0E IICE
MFI0 T0AF T0PF T0AE T0PE
MFI1 T1AF T1PF T1AE T1PE
MFI2 DEF LVF DEE LVE