Bit banging

In contrast, dedicated communication hardware (e.g., UART, SPI, I²C) satisfies protocol requirements which tends to reduce the runtime load on the controlling system – software and its host processor.

In particular, some communication hardware provides data buffering to lower the runtime load of the controlling system.

The processor spends much of its time controlling data lines which precludes other processing.

Also, bit banging typically results in a lower quality signal – with more jitter and glitches – especially if the processor is performing other tasks simultaneously.

The following C language code example transmits a byte of data on an SPI bus via bit banging.