- Bit-banging
Bit-banging is a technique for
serial communications to use software instead of dedicated hardware such as aUART orshift register . A software routine handles theUART transmit function by alternating a pin on themicrocontroller 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 costembedded systems .With a few extra components,
video signal s can be output from digital pins.(SeeTV Typewriter ).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 orglitch es, if the processor is also executing other tasks while communicating. However, if the bit-banging software ishardware interrupt -driven by the signal, this may be of minor importance.C code example
ee also
*
Software-defined radio External links
* [http://stud3.tuwien.ac.at/~e9725348/Theses/ Universal Asynchronous Receiver/Transmitters: A Software Implementation Approach] , a diploma thesis by Herbert Valerio Riedel,
Vienna University of Technology
* [http://dt.prohosting.com/pic/pong.html VCR Pong] , an example of bit-bangedNTSC video
* [http://www.brouhaha.com/~eric/pic/bitbanging.html Notes on Bit-Banging Async Serial]
* [http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Bit-Banging.html Bit Banging Algorithm]
Wikimedia Foundation. 2010.