3-15
Copyright 2009 Cirrus Logic, Inc.
DS734UM7
SPI Port
CS485xx Hardware User’s Manual
Both modes of the CS485xx serial port are shown in
Figure 3-13
.
Figure 3-13. Block Diagram of SPI System Bus
3.3.1.1 SPI Bus Dynamics
A SPI transaction begins by the master driving the slave chip select SCP_CS low. SPI transactions end by
the master driving the SCP_CS high. This SPI bus is considered busy while any device’s SCP_CS signal is
low. The bus is free only when all slave SCP_CS signals are high. A high-to-low transition on the SCP_CS
line defines an SPI Start condition. A low-to-high transition on the SCP_CS line defines an SPI Stop
condition. Start and Stop conditions are always generated by the master. The bus is considered to be busy
after the Start condition. The bus is considered to be free again following the Stop condition.
The data bits of the SCP_MOSI and SCP_MISO line are valid on the rising edge of SCP_CLK. It is the
slave’s responsibility to accept or supply bytes on the bus at the rate at which the master is driving
SCP_CLK.
All data put on the SCP_MOSI and SCP_MISO lines must be in 8-bit bytes. The number of bytes that can be
transmitted per transfer is unrestricted. Data is transferred with the most-significant bit (MSB) first. For the
CS485xx slave SPI port, the first byte is an address byte that must always be sent by the master after a Start
condition. This address byte is an “I
2
C-type” command of a 7-bit a a R/W bit. The 7-bit SPI address
is 1000000b (0x80).
If the SPI transaction is a write from master to the CS485xx (R/W = 0, Address = 0x80), then the master will
clock the SCP_CLK signal and drive the SCP_MOSI signal with data bytes for the to read. If the SPI
transaction is a read to the master from the CS485xx (R/W = 1, Address = 0x81), then the master will drive
the SCP_CLK signal and read the SCP_MISO signal with the data bytes from the CS485xx.
CS485xx
SPI EEPROM
MOSI
MISO
CS
CLK
SCP_CLK
SCP_MOSI
SCP_MISO
SCP_CS
MASTER
ONLY
RESET
SCP_CS
SCP_CLK
SCP_MOSI
SCP_MISO
SCP_IRQ
SCP_BSY
System Microcontroller
CS485xx
MOSI
MISO
3.3k
3.3k
3.3V
SLAVE
ONLY
GPIO
GPIO
GPIO
SCK
GPIO