English
Language : 

MC68HC05V12 Datasheet, PDF (110/246 Pages) Freescale Semiconductor, Inc – HCMOS Microcontreller Unit
Freescale Semiconductor, Inc.
Serial Peripheral Interface (SPI)
Setting the MODF bit affects the internal serial peripheral interface
system in these ways:
1. An SPI interrupt is generated if SPIE = 1.
2. The SPE bit is cleared, disabling the SPI.
3. The MSTR bit is cleared, thus forcing the device into the slave
mode.
Clearing the MODF bit is accomplished by reading the SPSR (with
MODF set), followed by a write to the SPCR. Control bits SPE and
MSTR may be restored by user software to their original state after
the MODF bit has been cleared. It is also necessary to restore the
port B DDR bits after a mode fault.
10.6.3 Serial Peripheral Data Register
Address: $000C
Bit 7
6
5
4
3
2
1
Read:
SPD7
Write:
SPD6
SPD5
SPD4
SPD3
SPD2
SPD1
Reset:
Unaffected by reset
Figure 10-6. SPI Data Register (SPDR)
Bit 0
SPD0
The serial peripheral data I/O register is used to transmit and receive
data on the serial bus. Only a write to this register will initiate
transmission/reception of another byte, and this will only occur in the
master device. At the completion of transmitting a byte of data, the SPIF
status bit is set in both the master and slave devices.
When the user reads the serial peripheral data I/O register, a buffer is
actually being read. The first SPIF must be cleared by the time a second
transfer of the data from the shift register to the read buffer is initiated or
an overrun condition will exist. In cases of overrun, the byte which
causes the overrun is lost.
A write to the serial peripheral data I/O register is not buffered and
places data directly into the shift register for transmission.
Technical Data
Serial Peripheral Interface (SPI)
For More Information On This Product,
Go to: www.freescale.com
MC68HC05V12 — Rev. 2.0