Rev. 1.71 108 April 11, 2017 Rev. 1.71 109 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
Interrupts
Interruptsareanimportantpartofanymicrocontrollersystem.Whenanexternaleventoran
internalfunctionsuchasaTimerModuleoranA/Dconverterrequiresmicrocontrollerattention,
theircorrespondinginterruptwillenforceatemporarysuspensionofthemainprogramallowingthe
microcontrollertodirectattentiontotheirrespectiveneeds.Thedevicescontainseveralexternal
interruptsandinternalinterruptsfunctions.Theexternalinterruptsaregeneratedbytheactionof
theexternalINT0~INT1andINTpin,whiletheinternalinterruptsaregeneratedbyvariousinternal
functionssuchastheTMs,TimeBase,EEPROMandtheA/Dconverter.
Interrupt Registers
Overallinterruptcontrol,whichbasicallymeansthesettingofrequestflagswhencertain
microcontrollerconditionsoccurandthesettingofinterruptenablebitsbytheapplicationprogram,
iscontrolledbyaseriesofregisters,locatedintheSpecialPurposeDataMemory,asshowninthe
accompanyingtable.Thenumberofregistersdependsuponthedevicechosenbutfallintothree
categories.TherstistheINTC0~INTC1registerswhichsetuptheprimaryinterrupts,thesecond
istheMFI0~MFI1registerswhichsetuptheMulti-functioninterrupts.FinallythereisanINTEG
registertosetuptheexternalinterrupttriggeredgetype.
Eachregistercontainsanumberofenablebitstoenableordisableindividualregistersaswellas
interruptflagstoindicatethepresenceofaninterruptrequest.Thenamingconventionofthese
followsaspecicpattern.Firstislistedanabbreviatedinterrupttype,thenthe(optional)numberof
thatinterruptfollowedbyeitheran“E”forenable/disablebitor“F”forrequestag.
Function Enable Bit Request Flag Notes
Global EMI — —
INT Pin INTE INTF —
A/D Converter ADE ADF —
Multi-function MF0E MF0F —
Time Base TBnE TBnF n=0 or 1
EEPROM DEE DEF —
TM
STMA0E STMA0F
—
STMP0E STMP0F
Interrupt Register Bit Naming Conventions – HT66F002/HT66F0025
Function Enable Bit Request Flag Notes
Global EMI — —
INT Pin INTE INTF —
A/D Converter ADE ADF —
Multi-function MFnE MFnF n=0 or 1
Time Base TBnE TBnF n=0 or 1
EEPROM DEE DEF —
TM
STMA0E STMA0F
—
STMP0E STMP0F
PTMA1E PTMA1F
PTMP1E PTMP1F
Interrupt Register Bit Naming Conventions – HT66F003