BS85B12-3/BS85C20-3/BS85C20-5
Touch Key Flash MCU with LCD/LED Driver
Compact Type TM – CTM
AlthoughꢀtheꢀsimplestꢀformꢀofꢀtheꢀthreeꢀTMꢀtypes,ꢀtheꢀCompactꢀTMꢀtypeꢀstillꢀcontainsꢀthreeꢀ
operatingꢀmodes,ꢀwhichꢀareꢀCompareꢀMatchꢀOutput,ꢀTimer/EventꢀCounterꢀandꢀPWMꢀOutputꢀmodes.ꢀ
TheꢀCompactꢀTMꢀcanꢀalsoꢀbeꢀcontrolledꢀwithꢀanꢀexternalꢀinputꢀpinꢀandꢀcanꢀdriveꢀoneꢀorꢀtwoꢀexternalꢀ
outputꢀpins.ꢀTheseꢀtwoꢀexternalꢀoutputꢀpinsꢀcanꢀbeꢀtheꢀsameꢀsignalꢀorꢀtheꢀinverseꢀsignal.
CTM
Name
TM No.
TM Input Pin
TM Output Pin
BS85B12-3
10-bit CTM
0
TCK0
TP0_0ꢂ TP0_1
BS85C20-3
/BS85C20-5
10-bit CTM
0
TCK0
TP0_0ꢂ TP0_1
Compact TM Operation
Atꢀitsꢀcoreꢀisꢀaꢀ10-bitꢀcount-upꢀcounterꢀwhichꢀisꢀdrivenꢀbyꢀaꢀuserꢀselectableꢀinternalꢀorꢀexternalꢀclockꢀ
source.ꢀThereꢀareꢀalsoꢀtwoꢀinternalꢀcomparatorsꢀwithꢀtheꢀnames,ꢀComparatorꢀAꢀandꢀComparatorꢀ
P.ꢀTheseꢀcomparatorsꢀwillꢀcompareꢀtheꢀvalueꢀinꢀtheꢀcounterꢀwithꢀCCRPꢀandꢀCCRAꢀregisters.ꢀTheꢀ
CCRPꢀisꢀthreeꢀbitsꢀwideꢀwhoseꢀvalueꢀisꢀcomparedꢀwithꢀtheꢀhighestꢀthreeꢀbitsꢀinꢀtheꢀcounterꢀwhileꢀtheꢀ
CCRAꢀisꢀtheꢀtenꢀbitsꢀandꢀthereforeꢀcomparesꢀwithꢀallꢀcounterꢀbits.
Theꢀonlyꢀwayꢀofꢀchangingꢀtheꢀvalueꢀofꢀtheꢀ10-bitꢀcounterꢀusingꢀtheꢀapplicationꢀprogram,ꢀisꢀtoꢀ
clearꢀtheꢀcounterꢀbyꢀchangingꢀtheꢀTnONꢀbitꢀfromꢀlowꢀtoꢀhigh.ꢀTheꢀcounterꢀwillꢀalsoꢀbeꢀclearedꢀ
automaticallyꢀbyꢀaꢀcounterꢀoverflowꢀorꢀaꢀcompareꢀmatchꢀwithꢀoneꢀofꢀitsꢀassociatedꢀcomparators.ꢀ
Whenꢀtheseꢀconditionsꢀoccur,ꢀaꢀTMꢀinterruptꢀsignalꢀwillꢀalsoꢀusuallyꢀbeꢀgenerated.ꢀTheꢀCompactꢀ
TypeꢀTMꢀcanꢀoperateꢀinꢀaꢀnumberꢀofꢀdifferentꢀoperationalꢀmodes,ꢀcanꢀbeꢀdrivenꢀbyꢀdifferentꢀclockꢀ
sourcesꢀincludingꢀanꢀinputꢀpinꢀandꢀcanꢀalsoꢀcontrolꢀanꢀoutputꢀpin.ꢀAllꢀoperatingꢀsetupꢀconditionsꢀareꢀ
selectedꢀusingꢀrelevantꢀinternalꢀregisters.
C
C
R
P
C
m
o
a
p
r
a
P
t
M
a
o
c
t
r
h
3
-
i
b
t
C
o
m
a
p
o
t
a
r
P
r
T
P
n
F
n
I
e
t
r
r
p
u
t
f
S
Y
/
S
4
0
0
0
0
1
1
1
0
1
0
1
0
1
0
0
0
1
1
0
0
1
b
~
7
9
b
f
S
Y
S
T
O
n
C
f
/
6
1
f
/
4
6
T
n
P
_
0
f
e
T
C
B
O
t
u
u
p
t
P
l
o
r
a
t
i
y
T
n
P
P
n
i
C
u
o
n
t
C
l
e
a
e
r
r
0
C
n
o
r
t
l
o
C
n
o
r
t
l
o
O
t
u
u
p
t
R
s
e
r
e
v
d
1
-
0
i
b
t
C
o
u
-
n
p
u
C
t
u
o
n
t
e
r
T
n
P
_
1
1
T
K
C
n
1
1
1
T
M
n
,
1
T
M
n
0
T
P
n
L
O
T
C
n
L
C
R
T
O
n
N
T
I
n
1
O
,
T
n
O
I
0
b
~
0
9
b
T
P
n
A
U
C
m
o
a
p
r
a
A
t
M
o
t
a
r
h
c
1
0
b
-
t
C
i
m
o
p
a
a
o
r
t
r
A
T
A
n
F
n
I
e
t
r
r
p
u
t
T
C
n
2
K
T
~
C
n
0
K
C
C
R
A
Compact Type TM Block Diagram
Rev. 1.20
73
�ꢀꢁꢀst 10ꢂ 2012