English
Language : 

BS66F340 Datasheet, PDF (170/256 Pages) Holtek Semiconductor Inc – Enhanced Touch A/D Flash MCU with LED Driver
BS66F340/BS66F350/BS66F360/BS66F370
Enhanced Touch A/D Flash MCU with LED Driver
S P I M a s te r
SCK
SDO
SDI
SCS
S P I S la v e
SCK
SDI
SDO
SCS
SPI Master/Slave Connection
D a ta B u s
S IM D
T x /R x S h ift R e g is te r
S D I P in
S D O P in
C K E G b it
C K P O L B b it
S C K P in
fS Y S
f5 7 *
C T M 0 C C R P m a tc h fre q u e n c y /2
S C S P in
C S E N b it
C lo c k
E d g e /P o la r ity
C o n tro l
C lo c k
S o u r c e S e le c t
B usy
S ta tu s
SPI Block Diagram
W C O L F la g
T R F F la g
SPI Registers
There are three internal registers which control the overall operation of the SPI interface. These are
the SIMD data register and two registers SIMC0 and SIMC2. Note that the SIMC1 register is only
used by the I2C interface.
Register
Name
SIMC0
SIMC2
SIMD
7
SIM2
D7
D7
6
SIM1
D6
D6
5
SIM0
CKPOLB
D5
Bit
4
3
2
— SIMDEB1 SIMDEB0
CKEG
MLS
CSEN
D4
D3
D2
1
SIMEN
WCOL
D1
0
SIMICF
TRF
D0
SPI Registers List
• SIMD Register
The SIMD register is used to store the data being transmitted and received. The same register is used
by both the SPI and I2C functions. Before the device writes data to the SPI bus, the actual data to
be transmitted must be placed in the SIMD register. After the data is received from the SPI bus, the
device can read it from the SIMD register. Any transmission or reception of data from the SPI bus
must be made via the SIMD register.
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
x
x
x
x
x
x
x
x
"x": unknown
Rev. 1.40
170
December 15, 2016