Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
25
Copyright © 2015 Future Technology Devices International Limited
2.3
SPI Master
The Serial Peripheral Interface Bus is an industry standard communications interface. Devices
communicate in Master / Slave mode, with the Master initiating the data transfer.
The SPI Master module has seven signals:
-
Clock
-
4 Slave Select lines (numbered 0 to 3)
-
MOSI (master out – slave in)
-
MISO (master in – slave out).
The SPI Master protocol by default does not support any form of handshaking and the only
available mode is unmanaged. Data is clocked out of the Master and clocked in from the Slave
simultaneously.
Figure 2.1 SPI Master Schematic Diagram
The SPI interface has 4 unique modes of clock phase (CPHA) and clock polarity (CPOL), known as
Mode 0, Mode 1, Mode 2 and Mode 3. Table 2.29 summarizes these modes.
The registers associated with the SPI Master are outlined in Table 2.22. These are accessed using
IO_ADDR_x
SFRs to set the address, and the corresponding
IO_DATA_x
SFR to read and write the
data.