Rev. 1.50 178 August 28, 2017 Rev. 1.50 179 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
MFI2 Register
Bit 7 6 5 4 3 2 1 0
Name — — DEF LVF — — DEE LVE
R/W — — R/W R/W — — R/W R/W
POR — — 0 0 — — 0 0
Bit7~6 Unimplemented,readas“0”
Bit5 DEF:DataEEPROMInterruptrequestag
0:Norequest
1:Interruptrequest
Bit4 LVF:LVDInterruptrequestag
0:Norequest
1:Interruptrequest
Bit3~2 Unimplemented,readas“0”
Bit1 DEE:DataEEPROMInterruptcontrol
0:Disable
1:Enable
Bit0 LVE:LVDInterruptcontrol
0:Disable
1:Enable
Interrupt Operation
Whentheconditionsforaninterrupteventoccur,suchasaTMComparatorPorComparatorAorA/D
conversioncompletion,etc,therelevantinterruptrequestagwillbeset.Whethertherequestag
actuallygeneratesaprogramjumptotherelevantinterruptvectorisdeterminedbytheconditionof
theinterruptenablebit.Iftheenablebitissethighthentheprogramwilljumptoitsrelevantvector;
iftheenablebitiszerothenalthoughtheinterruptrequestagissetanactualinterruptwillnotbe
generatedandtheprogramwillnotjumptotherelevantinterruptvector.Theglobalinterruptenable
bit,ifclearedtozero,willdisableallinterrupts.
Whenaninterruptisgenerated,theProgramCounter,whichstorestheaddressofthenextinstruction
tobeexecuted,willbetransferredontothestack.TheProgramCounterwillthenbeloadedwitha
newaddresswhichwillbethevalueofthecorrespondinginterruptvector.Themicrocontrollerwill
thenfetchitsnextinstructionfromthisinterruptvector.Theinstructionatthisvectorwillusually
beaJMPwhichwilljumptoanothersectionofprogramwhichisknownastheinterruptservice
routine.Hereislocatedthecodetocontroltheappropriateinterrupt.Theinterruptserviceroutine
mustbeterminatedwithaRETI,whichretrievestheoriginalProgramCounteraddressfromthe
stackandallowsthemicrocontrollertocontinuewithnormalexecutionatthepointwherethe
interruptoccurred.
Thevariousinterruptenablebits,togetherwiththeirassociatedrequestflags,areshowninthe
accompanyingdiagramswiththeirorderofpriority.Someinterruptsourceshavetheirown
individualvectorwhileotherssharethesamemulti-functioninterruptvector.Onceaninterrupt
subroutineisserviced,allotherinterruptswillbeblocked,astheglobalinterruptenablebit,EMI
bitwillbeclearedautomatically.Thiswillpreventanyfurtherinterruptnestingfromoccurring.
However,ifotherinterruptrequestsoccurduringthisinterval,althoughtheinterruptwillnotbe
immediatelyserviced,therequestagwillstillberecorded.