Bit Banging Method For SPI/I2C Communication
1. Bit Banging is technique for serial communication using software intead
of dedicated hardware(MC inbuilt HW).
2. Software directly sets and samples the state of pins on the
microcontroller, and is responsible for all parameters of the signal: timing,
levels, synchronization, etc.
3. In Normal (Without bit banging) Micro-controller already have the
peripheral pins for thr SPI/I2c. But if i go for the 8051 MC then its not
have this facility.
4. Then we have to move from dedicated hardware to software SPI/I2C.
5. Dedicated Hardware means MC itselve having the facility(Inbuild
Hardware)to generate the CLOCK signal when data is TX/RX. So while a
dedicated SPI controller takes care of all the pulses, data shifting and
timing.
6. But in Software SPI/I2C(Bit Banging Method) Developer need to take
care of generating a clock, Timing,pulses, Bus is busy or not etc. when bit-
banging Developer have to take every action therself.
7. Bit-banging refers to the concept of having the signals which go out of
or come into a device be generated/sampled by software rather than
hardware(MC inbuilt HW).
Thanks
Anil D.