Go Down

Topic: SPI dummy bytes.. (Read 107 times) previous topic - next topic


I am having a hard time trying to figure something out.

Whilst reading about the SPI protocol, I see that in order  to read a byte you have to actually also send a byte to initiate the clock, hence you send a dummy byte.. but wont the spi device take that byte as a command? even if I send 0x00 , what if 0x00 is a command on the spi device?  Do i just have to look in the device data sheet and see what I can use as a dummy byte?

Also If I am reading data the device is sending me data at the same time... If for example this is my first byte sent then what is it sending me if it doesnt know what my command will be asking for? And if i have interrupts enabled for data reception..every time  i send data ill also get a interrupt on the receive line?

I have tried google but no one ever mentions what happens to the dummy byte.. how does the spi know its a dummy byte? Can i initiate a read and not send a dummy byte but rather send a real command?
I could print the Arduino logo on a box of cereal and sell it as "Arduin-O's"


have a look at


Dummy bite 0x00 is normaly fine or sometimes 0xff on some spi.

Go Up