<aside> <img src="/icons/map-pin_gray.svg" alt="/icons/map-pin_gray.svg" width="40px" /> Relevant Notes/Resources:

10 The SPI Function

</aside>



1. Baud Rate

A few things to make note of:

a) Desired Baud Rate

The desired baud rate can be calculated given the sampling rate:

$$ 8\textrm{-bit} \times 75000\ \textrm{samples/sec} = 600000\ \textrm{bits/sec} \textrm{ or } 6 \times 10^5\ \textrm{bits/sec} $$

Desired Baud Rate for the SPI interface $=$ $6 \times 10^5$ $\textrm{bits/sec}$

b) Baud Rate Divisor

For SPI, the baud rate divisor is given by the following formula:

$$ \textrm{Baud Rate Divisor} = \frac{\textrm{E-clk}}{\textrm{Baud Rate}} $$

This is pretty much a plug-and-chug question, where $\textrm{E-clk} = 24\textrm{-MHz}$ and we use the baud rate derived from a).

$$ \textrm{Baud Rate Divisor} = \frac{24 \times 10^6}{6 \times 10^5} = 40 $$

Baud Rate Divisor = $40$

2. Content of SPI Baud Rate (SPIBR) Register