English
Language : 

MC9S08GT16A Datasheet, PDF (190/300 Pages) Freescale Semiconductor, Inc – Microcontrollers
Serial Peripheral Interface (S08SPIV3)
12.1.2 Block Diagrams
This section includes block diagrams showing SPI system connections, the internal organization of the SPI
module, and the SPI clock dividers that control the master mode bit rate.
12.1.2.1 SPI System Block Diagram
Figure 12-3 shows the SPI modules of two MCUs connected in a master-slave arrangement. The master
device initiates all SPI data transfers. During a transfer, the master shifts data out (on the MOSI pin) to the
slave while simultaneously shifting data in (on the MISO pin) from the slave. The transfer effectively
exchanges the data that was in the SPI shift registers of the two SPI systems. The SPSCK signal is a clock
output from the master and an input to the slave. The slave device must be selected by a low level on the
slave select input (SS pin). In this system, the master device has configured its SS pin as an optional slave
select output.
MASTER
SPI SHIFTER
76543210
MOSI
MISO
MOSI
MISO
SLAVE
SPI SHIFTER
76543210
CLOCK
GENERATOR
SPSCK
SPSCK
SS
SS
Figure 12-3. SPI System Connections
The most common uses of the SPI system include connecting simple shift registers for adding input or
output ports or connecting small peripheral devices such as serial A/D or D/A converters. Although
Figure 12-3 shows a system where data is exchanged between two MCUs, many practical systems involve
simpler connections where data is unidirectionally transferred from the master MCU to a slave or from a
slave to the master MCU.
12.1.2.2 SPI Module Block Diagram
Figure 12-4 is a block diagram of the SPI module. The central element of the SPI is the SPI shift register.
Data is written to the double-buffered transmitter (write to SPID) and gets transferred to the SPI shift
register at the start of a data transfer. After shifting in a byte of data, the data is transferred into the
double-buffered receiver where it can be read (read from SPID). Pin multiplexing logic controls
connections between MCU pins and the SPI module.
MC9S08GT16A/GT8A Data Sheet, Rev. 1
190
Freescale Semiconductor