BS85B12-3/BS85C20-3/BS85C20-5
Touch Key Flash MCU with LCD/LED Driver
SPI Communication
AfterꢀtheꢀSPIꢀinterfaceꢀisꢀenabledꢀbyꢀsettingꢀtheꢀSIMENꢀbitꢀhigh,ꢀthenꢀinꢀtheꢀMasterꢀMode,ꢀwhenꢀ
dataꢀisꢀwrittenꢀtoꢀtheꢀSIMDꢀregister,ꢀtransmission/receptionꢀwillꢀbeginꢀsimultaneously.ꢀWhenꢀtheꢀdataꢀ
transferꢀisꢀcomplete,ꢀtheꢀTRFꢀflagꢀwillꢀbeꢀsetꢀautomatically,ꢀbutꢀmustꢀbeꢀclearedꢀusingꢀtheꢀapplicationꢀ
program.ꢀInꢀtheꢀSlaveꢀMode,ꢀwhenꢀtheꢀclockꢀsignalꢀfromꢀtheꢀmasterꢀhasꢀbeenꢀreceived,ꢀanyꢀdataꢀinꢀ
theꢀSIMDꢀregisterꢀwillꢀbeꢀtransmittedꢀandꢀanyꢀdataꢀonꢀtheꢀSDIꢀpinꢀwillꢀbeꢀshiftedꢀintoꢀtheꢀSIMDꢀ
register.ꢀTheꢀmasterꢀshouldꢀoutputꢀanꢀSCSꢀsignalꢀtoꢀenableꢀtheꢀslaveꢀdeviceꢀbeforeꢀaꢀclockꢀsignalꢀ
isꢀprovided.ꢀTheꢀslaveꢀdataꢀtoꢀbeꢀtransferredꢀshouldꢀbeꢀwellꢀpreparedꢀatꢀtheꢀappropriateꢀmomentꢀ
relativeꢀtoꢀtheꢀSCSꢀsignalꢀdependingꢀuponꢀtheꢀconfigurationsꢀofꢀtheꢀCKPOLBꢀbitꢀandꢀCKEGꢀbit.ꢀ
TheꢀaccompanyingꢀtimingꢀdiagramꢀshowsꢀtheꢀrelationshipꢀbetweenꢀtheꢀslaveꢀdataꢀandꢀSCSꢀsignalꢀforꢀ
variousꢀconfigurationsꢀofꢀtheꢀCKPOLBꢀandꢀCKEGꢀbits.
TheꢀSPIꢀwillꢀcontinueꢀtoꢀfunctionꢀevenꢀinꢀtheꢀIDLEꢀMode.
S
M
I
N
E
1
=
,
C
S
N
E
0
=
(
x
E
e
t
r
n
P
u
a
l
H
l
-
l
g
i
)
h
S
C
S
M
I
N
E
,
C
S
N
E
1
=
K
K
K
K
O
O
I
C
C
C
C
D
D
D
(
(
(
(
K
K
K
K
C
C
C
C
O
O
O
O
P
P
P
P
B
B
B
B
L
L
L
L
1
0
1
0
=
,
C
K
G
E
E
E
E
0
=
)
=
=
=
,
,
,
K
K
K
C
C
C
G
G
G
0
1
1
=
=
=
)
)
)
D
/
7
0
D
6
D
D
/
1
/
D
2
D
5
4
D
D
/
3
/
D
4
D
3
2
D
D
/
5
/
D
6
D
1
0
D
D
/
7
(
K
C
G
E
0
=
=
p
)
D
/
7
0
D
6
D
D
/
1
/
D
2
D
5
4
D
D
/
3
/
D
4
D
3
2
D
D
/
5
/
D
6
D
1
0
D
D
/
7
(
K
C
G
E
1
)
D
t
a
a
a
C
e
t
u
r
W
i
r
e
t
t
o
D
S
I
M
SPI Master Mode Timing
S
S
C
S
S
S
S
C
C
D
D
(
K
K
C
O
P
B
L
1
=
)
(
K
K
C
O
P
B
L
0
=
)
D
/
7
0
D
6
D
D
/
1
/
D
2
D
5
4
D
D
/
3
/
D
4
D
3
2
D
D
/
5
/
D
6
D
1
0
D
D
/
7
O
I
D
t
a
a
a
p
C
e
t
u
r
W
i
r
e
t
t
o
D
S
I
M
(
D
S
O
d
o
s
e
n
o
h
c
t
a
n
u
g
t
n
l
f
i
e
r
i
t
s
S
K
C
e
d
)
g
e
SPI Slave Mode Timing CKEG=0
Rev. 1.20
125
�ꢀꢁꢀst 10ꢂ 2012