English
Language : 

MMC2107 Datasheet, PDF (394/618 Pages) –
Freescale Semiconductor, Inc.
Serial Peripheral Interface Module (SPI)
17.8.6 Bidirectional Mode
Setting the SPC0 bit in SPICR1 selects bidirectional mode (see
Table 17-7). The SPI uses only one data pin for the interface with
external device(s). The MSTR bit determines which pin to use. In master
mode, the MOSI pin is the master out/master in pin, MOMI. In slave
mode, the MISO pin is the slave out/slave in pin, SISO. The MISO pin in
master mode and MOSI pin in slave mode are general-purpose I/O pins.
The direction of each data I/O pin depends on its data direction register
bit. A pin configured as an output is the output from the shift register. A
pin configured as an input is the input to the shift register, and data
coming out of the shift register is discarded.
The SCK pin is an output in master mode and an input in slave mode.
The SS pin can be an input or an output in master mode, and it is always
an input in slave mode.
In bidirectional mode, a mode fault does not clear DDRSP0, the data
direction bit for the SISO pin.
SPE = 1
Table 17-7. Normal Mode and Bidirectional Mode
Master Mode, MSTR = 1
Slave Mode, MSTR = 0
Normal Mode
SPC0 = 0
SERIAL OUT
SPI
SERIAL IN
DDRSP1
MOSI
MISO
SWOM enables open drain output.
SERIAL OUT
MOMI
Bidirectional Mode
SPC0 = 1
SPI
SERIAL IN
DDRSP1
SPI PORT
PIN 0
SWOM enables open drain output.
SPI port pin 0 is general-purpose I/O.
SERIAL IN
SPI
SERIAL OUT
DDRSP0
MOSI
MISO
SWOM enables open drain output.
SERIAL IN
SPI
SERIAL OUT
DDRSP0
SPI PORT
PIN 1
SISO
SWOM enables open drain output.
SPI port pin 1 is general-purpose I/O.
Technical Data
394
Serial Peripheral Interface Module (SPI)
For More Information On This Product,
Go to: www.freescale.com
MMC2107 – Rev. 2.0
MOTOROLA