We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
while interfacing SPI with EEPROM we generally send some commands before writing or reading how does slave differentiates that incoming data is DATA or Address or COMMAND?
how does slave differentiates that incoming data is DATA or Address or COMMAND exactly as described in the EEPROM datasheet.
If you want someone to read the datasheet for you, you need to specify the part number of your EEPROM (they do not all do it the same way)
Note that the slave-select signal is normally extremely important for the SPI listener to synchronize the internal state machine. A single spurious clock pulse would totally confuse a SPI slave about what the next bit received would mean. And it's critical for SPI to have a way to reset the slave state machine since SPI is a synchronous protocol where the slave counts bits to keep track of the state.
Keil has a SPI program for the LPC2148, the part it is to interface with is a Atmel AT25160 SPI EEPROM. Here is the datasheet for that part.
www.atmel.com/.../doc0675.pdf