28.10.2014 Views

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

MMC2107 - Freescale Semiconductor

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Serial Peripheral Interface Module (SPI)<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, Inc.<br />

17.8.6 Bidirectional Mode<br />

Setting the SPC0 bit in SPICR1 selects bidirectional mode (see<br />

Table 17-7). The SPI uses only one data pin for the interface with<br />

external device(s). The MSTR bit determines which pin to use. In master<br />

mode, the MOSI pin is the master out/master in pin, MOMI. In slave<br />

mode, the MISO pin is the slave out/slave in pin, SISO. The MISO pin in<br />

master mode and MOSI pin in slave mode are general-purpose I/O pins.<br />

nc...<br />

<strong>Freescale</strong> <strong>Semiconductor</strong>, I<br />

The direction of each data I/O pin depends on its data direction register<br />

bit. A pin configured as an output is the output from the shift register. A<br />

pin configured as an input is the input to the shift register, and data<br />

coming out of the shift register is discarded.<br />

The SCK pin is an output in master mode and an input in slave mode.<br />

The SS pin can be an input or an output in master mode, and it is always<br />

an input in slave mode.<br />

In bidirectional mode, a mode fault does not clear DDRSP0, the data<br />

direction bit for the SISO pin.<br />

Table 17-7. Normal Mode and Bidirectional Mode<br />

SPE = 1 Master Mode, MSTR = 1 Slave Mode, MSTR = 0<br />

Normal Mode<br />

SPC0 = 0<br />

Bidirectional Mode<br />

SPC0 = 1<br />

SERIAL OUT<br />

SPI<br />

SERIAL IN<br />

DDRSP1<br />

SWOM enables open drain output.<br />

SERIAL OUT<br />

SPI<br />

SERIAL IN<br />

DDRSP1<br />

MOSI<br />

MISO<br />

MOMI<br />

SPI PORT<br />

PIN 0<br />

SERIAL IN<br />

SPI<br />

SERIAL OUT<br />

DDRSP0<br />

SWOM enables open drain output.<br />

SERIAL IN<br />

SPI<br />

SERIAL OUT<br />

DDRSP0<br />

MOSI<br />

MISO<br />

SPI PORT<br />

PIN 1<br />

SISO<br />

SWOM enables open drain output.<br />

SPI port pin 0 is general-purpose I/O.<br />

SWOM enables open drain output.<br />

SPI port pin 1 is general-purpose I/O.<br />

Technical Data <strong>MMC2107</strong> – Rev. 2.0<br />

394 Serial Peripheral Interface Module (SPI) MOTOROLA<br />

For More Information On This Product,<br />

Go to: www.freescale.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!