User`s guide

Rev. 1.10 124 November 14, 2014 Rev. 1.10 125 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
Time Base Interrupts
ThefunctionoftheTimeBaseInterruptsistoprovideregulartimesignalintheformofaninternal
interrupt.Theyarecontrolledbytheoverowsignalsfromtheirrespectivetimerfunctions.When
thesehappenstheirrespectiveinterruptrequestflags,TB0ForTB1Fwillbeset.Toallowthe
programtobranchtotheirrespectiveinterruptvectoraddresses,theglobalinterruptenablebit,EMI
andTimeBaseenablebits,TB0EorTB1E,mustrstbeset.Whentheinterruptisenabled,thestack
isnotfullandtheTimeBaseoverows,asubroutinecalltotheirrespectivevectorlocationswill
takeplace.Whentheinterruptisserviced,therespectiveinterruptrequestag,TB0ForTB1F,will
beautomaticallyresetandtheEMIbitwillbeclearedtodisableotherinterrupts.
ThepurposeoftheTimeBaseInterruptistoprovideaninterruptsignalatxedtimeperiods.Their
clocksourcesoriginatefromtheinternalclocksourcef
TB
.Thisf
TB
inputclockpassesthrougha
prescaler,theprescaltionratioofwhichisselectedbyprogrammingtheappropriatebitsinthePSCR
registertoobtainlongerinterruptperiodswhosevalueranges.Theclocksourcethatgenerates
f
TB
,whichinturncontrolstheTimeBaseinterruptperiod,canoriginatefromf
SYS
,f
SYS
/4orf
SUB
by
settingCLKSEL1~CLKSEL0bitsinthePSCRregister.
TBC0 Register
Bit 7 6 5 4 3 2 1 0
Name TB0EN TB02 TB01 TB00
R/W R/W R/W R/W R/W
POR 0 0 0 0
Bit7 TB0EN:TB0Controlbit
0:Disable
1:Enable
Bit6~3 Unimplemented,readas"0"
Bit2~0 TB02 ~ TB00:SelectTimeBase0Time-outPeriod
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
TBC1 Register
Bit 7 6 5 4 3 2 1 0
Name TB1EN TB12 TB11 TB10
R/W R/W R/W R/W R/W
POR 0 0 0 0
Bit7 TB1EN:TB1Controlbit
0:Disable
1:Enable
Bit6~3 Unimplemented,readas"0"
Bit2~0 TB12 ~ TB10:SelectTimeBase1Time-outPeriod
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