Dear all,
How to communicate At89c51rd2(Master) with At89c51rd2(Slave) using SPI protocol.I am using seperate pins for spi(not the dedicated pins of spi protocol).I am using 20 Mhz crystal for both and same power supply.How to read/write from master to slave?
regards, krishna
If you use generic GPIO pins, then the answer is simple. You will have to bit-bang the communication, following any of a million available documents about how SPI works. You just have to decide yourself which of the four variants to use for clock and phase.
Footnote - it is trivial to bit-bang the master.
If you have placed yourself in a situation where you have to bit-bang the slave, then you better make sure to run the master slowly. You really, really, really should do everything you can to avoid bit-banging an SPI slave.
If you have placed yourself in a situation where you have to bit-bang the slave, go buy a "family size" bottle of aspirin
Erik