16.1.3Features

Features of the SPI module include:

Master or slave mode operation

Full-duplex or single-wire bidirectional option

Programmable transmit bit rate

Double-buffered transmit and receive

Serial clock phase and polarity options

Slave select output

Selectable msb-first or lsb-first shifting

16.1.4Block 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.

16.1.4.1SPI System Block Diagram

Figure 16-2shows 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

 

 

7

6

5

4

3

2

1

0

Clock

Generator

MOSI MOSI

MISO MISO

SPSCK SPSCK

SSSS

 

Slave

 

 

 

 

 

 

 

SPI Shifter

 

 

 

7

6

5

4

3

2

1

0

Figure 16-2. 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

MCF51QE128 MCU Series Reference Manual, Rev. 3

Freescale Semiconductor

317

Get the latest version from freescale.com

Page 317
Image 317
Freescale Semiconductor MCF51QE128RM manual Block Diagrams, SPI System Block Diagram, Freescale Semiconductor 317