English
Language : 

SM59R16A2 Datasheet, PDF (52/67 Pages) SyncMOS Technologies,Inc – 8-Bit Micro-controller
SM59R16A2/SM59R08A2
8-Bit Micro-controller
64KB/32KB ISP Flash & 2KB RAM embedded
15 SPI function
Serial Peripheral Interface (SPI) is a synchronous protocol that allows a master device to initiate
communication with slave devices. There are 4 signals used in SPI, they are
SPI_MOSI: data output in the master mode, data input in the slave mode,
SPI_MISO: data input in the master mode, data output in the master mode,
SPI_SCK: clock output form the master, the above data are synchronous to this signal
SPI_SS: input in the slave mode.
This slave device detects this signal to judge if it is selected by the master.
In the master mode, it can select the desired slave device by any IO with value = 0. Fig. 15-1 is an
example showing the relation of the 4 signals between master and slaves.
Master
MOSI
MISO
CLK
IO
IO
Slave 1
MOSI
MISO
CLK
SS
Slave 2
MOSI
MISO
CLK
SS
Fig. 15-1: SPI signals between master and slave devices
There is only one channel SPI interface. The SPI SFRs are shown as below:
SPI
Description
SPIC1
SPIC2
SPIS
SPITXD
SPIRXD
SPI control register 1
SPI control register 2
SPI status register
SPI transmit data
buffer
SPI receive data
buffer
Direct
F1h
F2h
F5h
F3h
Bit 7
SPIEN
SPIFD
-
Bit 6 Bit 5 Bit 4 Bit 3
SPI function
SPIMSS SPISSP SPICKP
TBC[2:0]
SPIMLS SPIOV SPITXIF
SPICKE
-
SPITDR
SPITXD[7:0]
Bit 2 Bit 1 Bit 0
SPIBR[2:0]
RBC[2:0]
SPIRXIF SPIRDR SPIRS
F4h
SPIRXD[7:0]
RESE
T
08h
00h
40h
00h
00h
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M034
52
Ver.B SM59R16A2/SM59R08A2 06/2009