Serial Peripheral Interface Module (SPI)
I/O Registers
MC68HC908MR16/MC68HC908MR32 — Rev. 4.0 Advance Information
MOTOROLA Serial Peripheral Interface Module (SPI) 275
Use this formula to calculate the SPI baud rate:
where:
CGMOUT = base clock output of the clock generator module (CGM)
BD = baud rate divisor
13.13.3 SPI Data Register
The SPI data register consists of the read-only recei ve data register and
the write-only transmit data register. Writing to the SPI data register
writes data into the transmit data register . Reading t he SPI data register
reads data from the receive data register. The transmit data and recei ve
data registers are separate registers that can contain different values.
See Figure 13-1.
R7:R0/T7:T0 — Receive/Transmit Data Bits
NOTE: Do not use read-modify-write instructions on the SPI dat a register si nce
the register read is not the same as the register written.
Baud rate CGMOUT
2BD×
--------------------------=
Address: $0046
Bit 7654321Bit 0
Read: R7 R6 R5 R4 R3 R2 R1 R0
Write: T7 T6 T5 T4 T3 T2 T1 T0
Reset: Indeterminate after reset
Figure 13-15. SPI Data Register (SPDR)