English
Language : 

MC68HC908AT32 Datasheet, PDF (182/378 Pages) Freescale Semiconductor, Inc – Microcontrollers
Serial Peripheral Interface Module (SPI)
Use this formula to calculate the SPI baud rate:
Baud
rate
=
CGMOUT
2 x BD
=
Bus clock
BD
where:
CGMOUT = base clock output of the clock generator module (CGM), see Chapter 8 Clock Generator
Module (CGM).
BD = baud rate divisor
17.13.3 SPI Data Register
The SPI data register is the read/write buffer for the receive data register and the transmit data register.
Writing to the SPI data register writes data into the transmit data register. Reading the SPI data register
reads data from the receive data register. The transmit data and receive data registers are separate
buffers that can contain different values. See Figure 17-2.
Address: $0012
Bit 7
6
5
4
3
2
1
Bit 0
Read: R7
R6
R5
R4
R3
R2
R1
R0
Write: T7
T6
T5
T4
T3
T2
T1
T0
Reset:
Indeterminate after reset
Figure 17-14. SPI Data Register (SPDR)
R7–R0/T7–T0 — Receive/Transmit Data Bits
NOTE
Do not use read-modify-write instructions on the SPI data register since the
buffer read is not the same as the buffer written.
MC68HC908AT32 Data Sheet, Rev. 3.1
182
Freescale Semiconductor