Hello, Can anyone give me the working [Bit Banged] code for SPI[Master/Slave] for the devices like AT89C51 or AT89C2051 because this devices doesn't have SPI port and I want to have such functions there.
Thanks.
Did you read - and understand - what was written above?
What use would you have of a SPI master, if you don't have a SPI slave? You really should switch to a processor that have hardware SPI, in which case you would not need to implement the master side in software.
And as I said, you can write the master side yourself in a very, very short time. And the time spent writing an SPI master is well-invested time just to make sure that you are very comfortable with the timings of the different signals. But in the end, you will suffer greatly if trying to run an SPI slave since you must have the baudrate so low that it will be impossible for the slave to miss a single signal change. A single interrupt on the slave side while processing the data will slow down the slave significantly, but the master will not know about that.