In embedded electronics, in order to swap information between those individual circuits, they must share a common communication protocol In general, each can be separated into one of two categories among hundreds of communications protocols: parallel or serial.
Parallel interfaces transfer multiple bits at the same time. They usually require buses of data-transmitting across eight, sixteen, or more wires.
Serial interfaces stream their data, one single bit at a time. These interfaces can operate on as little as one wire, usually never more than four.
Think of the two interface as a stream of cars: a parallel interface would be the 8+lane mega-highway, while a serial interface is more like a two-lane rural country road. Over a set amount of time, the mega-highway potentially gets more people to their destinations, but that rural two-laner serves its purpose and costs a fraction of the funds to build.
Parallel communication certainly has its benefits. It’s fast, straightward, and relatively easy to implement. But it requires many more I/O lines. You know that the I/O lines on a microprocessor can be precious and few. So we often opt for serial communication, sacrificing potential speed for pin real estate.
Over the yeas, dozens of serial protocols have been crafted to meet particular needs of embedded systems, like USB, Ethernet, SPI, I2C. Each of these serial interfaces can be sorted into one of two groups:synchronous or asynchronous.
Synchronous interfaces includes SPI, I2C. They pairs its data lines with a clock signal, so all devices on a synchronous serial bus share a common clock.
Asynchronous means that data is transferred without support from an external clock signal. This transmission method is perfect for minimizing the required wires and I/O pins, but it does mean we need to put some extra effort into reliably transferreing and receiving data. In fact, when most folks say “serial” they’re talking about the asynchronous transfers.