Rev. 1.71 116 April 11, 2017 Rev. 1.71 117 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
Time Base Interrupts
ThefunctionoftheTimeBaseInterruptsistoprovideregulartimesignalintheformofaninternal
interrupt.Theyarecontrolledbytheoverowsignalsfromtheirrespectivetimerfunctions.When
thesehappenstheirrespectiveinterruptrequestflags,TB0ForTB1Fwillbeset.Toallowthe
programtobranchtotheirrespectiveinterruptvectoraddresses,theglobalinterruptenablebit,EMI
andTimeBaseenablebits,TB0EorTB1E,mustrstbeset.Whentheinterruptisenabled,thestack
isnotfullandtheTimeBaseoverows,asubroutinecalltotheirrespectivevectorlocationswill
takeplace.Whentheinterruptisserviced,therespectiveinterruptrequestag,TB0ForTB1F,will
beautomaticallyresetandtheEMIbitwillbeclearedtodisableotherinterrupts.
ThepurposeoftheTimeBaseInterruptistoprovideaninterruptsignalatxedtimeperiods.Their
clocksourcesoriginatefromtheinternalclocksourcef
TB
.Thisf
TB
inputclockpassesthrougha
divider,thedivisionratioofwhichisselectedbyprogrammingtheappropriatebitsintheTBC
registertoobtainlongerinterruptperiodswhosevalueranges.Theclocksourcethatgeneratesf
TB
,
whichinturncontrolstheTimeBaseinterruptperiod,canoriginatefromseveraldifferentsources,
asshownintheSystemOperatingModesection.
TBC Register
Bit 7 6 5 4 3 2 1 0
Name TBON TBCK TB11 TB10 — TB02 TB01 TB00
R/W R/W R/W R/W R/W — R/W R/W R/W
POR 0 0 1 1 — 1 1 1
B
it7 TBON:TB0andTB1Controlbit
0:Disable
1:Enable
Bit6 TBCK:Selectf
TB
Clock
0:f
TBC
1:f
SYS
/4
B
it5~4 TB11 ~ TB10:SelectTimeBase1Time-outPeriod
00:4096/f
TB
01:8192/f
TB
10:16384/f
TB
11:32768/f
TB
Bit3 Unimplemented,readas"0"
Bit2~0 TB02 ~ TB00:SelectTimeBase0Time-outPeriod
000:256/f
TB
001:512/f
TB
010:1024/f
TB
011:2048/f
TB
100:4096/f
TB
101:8192/f
TB
110:16384/f
TB
111:32768/f
TB
Time Base Interrupt