English
Language : 

MC68HC08AS32 Datasheet, PDF (280/394 Pages) Motorola, Inc – M68HC08 Family of 8-bit microcontroller units (MCUs)
Serial Peripheral Interface (SPI)
18.5.1 Master Mode
The SPI operates in master mode when the SPI master bit, SPMSTR
(SPCR $0010), is set.
NOTE:
Configure the SPI modules as master and slave before enabling them.
Enable the master SPI before enabling the slave SPI. Disable the slave
SPI before disabling the master SPI. (See 18.14.1 SPI Control
Register.)
Only a master SPI module can initiate transmissions. Software begins
the transmission from a master SPI module by writing to the SPI data
register. If the shift register is empty, the byte immediately transfers to
the shift register, setting the SPI transmitter empty bit, SPTE (SPSCR
$0011). The byte begins shifting out on the MOSI pin under the control
of the serial clock. (See Figure 18-2.)
The SPR1 and SPR0 bits control the baud rate generator and determine
the speed of the shift register. (See 18.14.2 SPI Status and Control
Register.) Through the SPSCK pin, the baud rate generator of the
master also controls the shift register of the slave peripheral.
MASTER MCU
SHIFT REGISTER
BAUD RATE
GENERATOR
MISO
MOSI
SPSCK
SS
SLAVE MCU
MISO
MOSI
SPSCK
SHIFT REGISTER
SS
VDD
Figure 18-2. Full-Duplex Master-Slave Connections
Advance Information
280
Serial Peripheral Interface (SPI)
MC68HC08AS32 — Rev. 3.0
MOTOROLA