Bit-banging is a technique for serial communications to use software instead of dedicated hardware such as a UART or shift register. A software routine handles the UART transmit function by alternating a pin on the microcontroller by given time intervals. A receiver function is implemented by sampling a pin on the microcontroller by a given time interval. The technique can be applied in very low cost embedded systems.
Although it is often considered to be something of a hack, bit-banging does allow the same device to use different protocols with minimal or no hardware changes required.
There are some problems with bit-banging. More processing power is consumed in the software emulation process than in supporting dedicated hardware. The microcontroller is busy most of the time looking at samples or sending a sample to the pin, instead of performing other tasks. The signal produced normally has more jitter or glitches, if the processor is also executing other tasks while communicating. However, if the bit-banging software is hardware interrupt-driven by the signal, this may be of minor importance.