EasyManua.ls Logo

Holtek BS82B12A-3 - Time Base Inte

Holtek BS82B12A-3
168 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.20 138 January 23, 2015 Rev. 1.20 139 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Time Base Interrupts
ThefunctionoftheTimeBaseInterruptistoprovideregulartimesignalintheformofaninternal
interrupt.Itiscontrolledbytheoverflowsignalfromitstimerfunction.Whenthishappensits
interruptrequestflagsTBnFwillbeset.Toallowtheprogramtobranchtoitsinterruptvector
address,theglobalinterruptenablebit,EMIandTimeBaseenablebit,TBnE,mustfirstbeset.
Whentheinterruptisenabled,thestackisnotfullandtheTimeBaseoverows,asubroutinecallto
itsvectorlocationwilltakeplace.Whentheinterruptisserviced,theinterruptrequestag,TBnF,
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.Each
TimeBaseclocksourceoriginatesfromanindependentinternalprescaler.
Each15-bitprescalercansourcefromf
SYS
,f
SYS
/4,f
SUB
orf
H
,selectedbyCLKSELn1~CLKSELn0
bitsinthePSCRregister.
PSCR Register
Bit 7 6 5 4 3 2 1 0
Name CLKSEL11 CLKSEL10 CLKSEL01 CLKSEL00
R/W R/W R/W R/W R/W
POR 0 0 0 0
Bit7~6 Unimplemented,readas"0"
B
it5~4 CLKSEL11 ~ CLKSEL10:TimeBase1prescalerclocksourceselection
00:f
SYS
01:f
SYS
/4
10:f
SUB
11:f
H
Bit3~2 Unimplemented,readas"0"
B
it1~0 CLKSEL01 ~ CLKSEL00:TimeBase0prescalerclocksourceselection
00:f
SYS
01:f
SYS
/4
10:f
SUB
11:f
H
TBC Register
Bit 7 6 5 4 3 2 1 0
Name TB1ON TB12 TB11 TB10 TB0ON TB02 TB01 TB00
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
Bit7 TB1ON:TimeBase1enable/disablecontrol
0:Disable
1:Enable
Bit6~4 TB12 ~ TB10:SelectTimeBase1Time-outPeriod
000:2
8
/f
PSC
001:2
9
/f
PSC
010:2
10
/f
PSC
011:2
11
/f
PSC
100:2
12
/f
PSC
101:2
13
/f
PSC
110:2
14
/f
PSC
111:2
15
/f
PSC

Table of Contents

Related product manuals