Inter-Microcontroller Traffic with the SPI Bus and ATmega328p
Here’s a quick primer on sending data over the SPI bus from one microcontroller to another. The data is this case consists of 10-bit readings from, say, an A/D converter. This shows another advantage of SPI, which is that the data width is not fixed. No matter whether you send 8, 10, 12 or 16◦bits, the procedure is always the same. If the only objective were to connect two microcontrollers together, it would actually be less effort to use an asynchronous serial interface with the TXD and RXD lines. The SPI bus, by contrast, is better for controlling and communicating with external hardware. Here our main purpose is to illustrate the transmission protocol.
Downloading of this magazine article is reserved for registered users only.
Discussion (0 comments)