Rev. 1.20 74 January 23, 2015 Rev. 1.20 75 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
Compact Type TM Register Description
OveralloperationofeachCompactTMiscontrolledusingseveralregisters.Areadonlyregister
pairexiststostoretheinternalcounter10-bitvalue,whilearead/writeregisterpairexiststostore
theinternal10-bitCCRAvalue.Theremainingtworegistersarecontrolregisterswhichsetupthe
differentoperatingandcontrolmodesaswellasthethreeCCRPbits.
Register
Name
Bit
7 6 5 4 3 2 1 0
CTM0C0 CT0PAU CT0CK2 CT0CK1 CT0CK0 CT0ON CT0RP2 CT0RP1 CT0RP0
CTM0C1 CT0M1 CT0M0 CT0IO1 CT0IO0 CT0OC CT0POL CT0DPX CT0CCLR
CTM0DL D7 D6
D5 D4 D3 D2 D1 D0
CTM0DH — — — — — — D9 D8
CTM0AL D7 D6
D5 D4 D3 D2 D1 D0
CTM0AH — — — — — — D9 D8
Compact TM Register List
CTM0C0 Register
Bit 7 6 5 4 3 2 1 0
Name CT0PAU CT0CK2 CT0CK1 CT0CK0 CT0ON CT0RP2 CT0RP1 CT0RP0
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
Bit7 CT0PAU:CTM0CounterPauseControl
0:Run
1:Pause
Thecountercanbepausedbysettingthisbithigh.Clearingthebittozerorestores
normalcounteroperation.WheninaPauseconditiontheCTM0willremainpowered
upandcontinuetoconsumepower.Thecounterwillretainitsresidualvaluewhen
thisbitchangesfromlowtohighandresumecountingfromthisvaluewhenthebit
changestoalowvalueagain.
Bit6~4 CT0CK2~CT0CK0:SelectCTM0Counterclock
000:f
SYS
/4
001:f
SYS
010:f
H
/16
011:f
H
/64
100:f
SUB
101:f
SUB
110:TCK0risingedgeclock
111:TCK0fallingedgeclock
ThesethreebitsareusedtoselecttheclocksourcefortheCTM0.Theexternalpin
clocksourcecanbechosentobeactiveontherisingorfallingedge.Theclocksource
f
SYS
isthesystemclock,whilef
H
andf
SUB
areotherinternalclocks,thedetailsofwhich
canbefoundintheoscillatorsection.