Specifications

SPI Interrupts
9-11
Serial Peripheral Interface (SPI)
Example 9–1. Transmission of Bit from SPIRXBUF
Conditions:
1) Transmission character length = 1 bit (specified in bits SPICCR.3–0)
2) The current value of SPIDAT = 737Bh
SPIDAT (before transmission)
0 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1
SPIDAT (after transmission)
(TXed) 0
1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 x (RXed)
SPIRXBUF (after transmission)
1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 x
Note: x = 1 if SPISOMI data is high; x = 0 if SPISOMI data is low; master mode is assumed.
9.4.7 Baud Rate and Clocking Schemes
The SPI module supports 125 different baud rates and four different clock
schemes. Depending on whether the SPI clock is in slave or master mode, the
SPICLK pin can receive an external SPI clock signal or provide the SPI clock
signal, respectively.
- In the slave mode, the SPI clock is received on the SPICLK pin from the
external source, and can be no greater than the CLKOUT frequency
divided by 4.
- In the master mode, the SPI clock is generated by the SPI and is output
on the SPICLK pin, and can be no greater than the CLKOUT frequency
divided by 4.
Baud Rate Determination
Equation 9–1 shows how to determine the SPI baud rates.
Equation 9–1. SPI Baud-Rate Calculations
- For SPIBRR = 3 to 127:
SPI Baud Rate
CLKOUT
(SPIBRR 1)
=
+