Rev. 1.20 86 January 23, 2015 Rev. 1.20 87 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
Periodic Type TM Register Description
OveralloperationofthePeriodicTypeTMiscontrolledusingaseriesofregisters.Areadonly
registerpairexiststostoretheinternalcounter10-bitvalue,whiletworead/writeregisterpairsexist
tostoretheinternal10-bitCCRAvalueandCCRPvalue.Theremainingtworegistersarecontrol
registerswhichsetupthedifferentoperatingandcontrolmodes.
Register
Name
Bit
7 6 5 4 3 2 1 0
PTM0C0 PT0PAU PT0CK2 PT0CK1 PT0CK0 PT0ON — — —
PTM0C1 PT0M1 PT0M0 PT0IO1 PT0IO0 PT0OC PT0POL PT0CKS PT0CCLR
PTM0DL D7 D6
D5 D4 D3 D2 D1 D0
PTM0DH — — — — — — D9 D8
PTM0AL D7 D6
D5 D4 D3 D2 D1 D0
PTM0AH — — — — — — D9 D8
PTM0RPL D7 D6
D5 D4 D3 D2 D1 D0
PTM0RPH — — — — — — D9 D8
10-bit Periodic TM Register List
PTM0C0 Register
Bit 7 6 5 4 3 2 1 0
Name PT0PAU PT0CK2 PT0CK1 PT0CK0 PT0ON — — —
R/W R/W R/W R/W R/W R/W — — —
POR 0 0 0 0 0 — — —
Bit7 PT0PAU:PTM0CounterPauseControl
0:Run
1:Pause
Thecountercanbepausedbysettingthisbithigh.Clearingthebittozerorestores
normalcounteroperation.WheninaPauseconditionthePTM1willremainpowered
upandcontinuetoconsumepower.Thecounterwillretainitsresidualvaluewhen
thisbitchangesfromlowtohighandresumecountingfromthisvaluewhenthebit
changestoalowvalueagain.
Bit6~4 PT0CK2 ~ PT0CK0:SelectPTM0Counterclock
000:f
SYS
/4
001:f
SYS
010:f
H
/16
011:f
H
/64
100:f
SUB
101:f
SUB
110:TCK1risingedgeclock
111:TCK1fallingedgeclock
ThesethreebitsareusedtoselecttheclocksourceforthePTM0.Theexternalpin
clocksourcecanbechosentobeactiveontherasingorfallingedge.Theclocksource
f
SYS
isthesystemclock,whilef
H
andf
SUB
areotherinternalclocks,thedetailsofwhich
canbefoundintheoscillatorsection.