
Serial Interface
Data Sheet
M68HC12B Family — Rev. 9.0
216
Serial Interface
MOTOROLA
Figure 14-13. SPI Clock Format 1 (CPHA = 1)
14.3.3 SS Output
Available in master mode only, SS output is enabled with the SSOE bit in the
SP0CR1 register if the corresponding DDRS bit is set. The SS output pin is
connected to the SS input pin of the external slave device. The SS output
automatically goes low for each transmission to select the external device and it
goes high during each idling state to deselect external devices.
14.3.4 Bidirectional Mode (MOMI or SISO)
In bidirectional mode, the SPI uses only one serial data pin for external device
interface. The MSTR bit decides which pin to be used. The MOSI pin becomes a
serial data I/O (MOMI) pin for the master mode, and the MISO pin becomes a serial
data I/O (SISO) pin for the slave mode. The direction of each serial I/O pin depends
on the corresponding DDRS bit.
tL
tT
for tT, tl, tL
Minimum 1/2 SCK
tI
tL
BEGIN
END
SCK (CPOL = 0)
SAMPLE I
CHANGE O
SEL SS (O)
TRANSFER
SCK (CPOL = 1)
MSB first (LSBF= 0) :
LSB first (LSBF = 1) :
MSB
LSB
MSB
Bit 5
Bit 2
Bit 6
Bit 1
Bit 4
Bit 3
Bit 4
Bit 2
Bit 5
Bit 1
Bit 6
CHANGE O
SEL SS (I)
MOSI PIN
MISO PIN
MASTER ONLY
MOSI/MISO
Table 14-3. SS Output Selection
DDS7
SSOE
Master Mode
Slave Mode
00
SS input with MODF feature
SS input
01
Reserved
SS input
1
0
General-purpose output
SS input
11
SS output
SS input