English
Language : 

MC68HC812A4 Datasheet, PDF (267/342 Pages) Motorola, Inc – 16-bit device composed of standard on-chip peripheral modules connected by an intermodule bus. Modules include
Serial Peripheral Interface (SPI)
Functional Description
slave mode, the SPI depends on a master peripheral to start and
synchronize transmissions.
15.6.1 Master Mode
The SPI operates in master mode when the master mode bit, MSTR, is
set.
NOTE:
Configure SPI modules as master or slave before enabling them. Enable
the master SPI before enabling the slave SPI. Disable the slave SPI
before disabling the master SPI.
Only a master SPI module can initiate transmissions. Begin 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. The byte begins shifting out on the master out, slave in
pin (MOSI) under the control of the serial clock. See Figure 15-3.
As the byte shifts out on the MOSI pin, a byte shifts in from the slave on
the master in, slave out pin (MISO) pin. On the eighth serial clock cycle,
the transmission ends and sets the SPI flag, SPIF. At the same time that
SPIF becomes set, the byte from the slave transfers from the shift
register to the SPI data register. The byte remains in a read buffer until
replaced by the next byte from the slave.
MASTER MCU
SHIFT REGISTER
CLOCK
DIVIDER
MISO
MOSI
SCK
SS
SLAVE MCU
MISO
MOSI
SCK
SHIFT REGISTER
VDD
SS
Figure 15-3. Full-Duplex Master/Slave Connections
Advance Information
MOTOROLA
Serial Peripheral Interface (SPI)
MC68HC812A4 — Rev. 3.0
267