Bit-banging is a technique in embedded systems for example to use serial communications without the use of dedicated hardware such as a UART or shift register, instead using software to emulate their behavior. 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.
With a few extra components, video signals can be output from digital pins.
Although it is not referred to as bit-banging, software-defined radio is an extreme extension of the same idea.
Although it is often considered to be something of a hack, bit-banging does allow greater flexibility, allowing the same device to speak different protocols with minimal or no hardware changes required.
There are some problems with bit-banging. More power is normally consumed in the software emulation process than in dedicated hardware. Another problem is that the microcontroller is busy most of the time looking at samples or sending a sample to the pin, instead of doing some other useful stuff. Yet another potential problem is that the signal produced, normally has more jitter or glitches, if or when the microcontroller does something else, but if the bit-banging software is hardware interrupt driven by the signal, this may be of minor issue.
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Bit-banging".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world