you mean mode(8,0)? mode(3,0) isnt a mode, needs to be 8bit or 16bit,
LSW means Least Significant Word and MSW is Most Significant Word,
and a word is 2 bytes,
0xE4 send the temperature it has in its memory, 0xE5 checks the temperature and sends that
anyway to reconstruct the data returned,
byte 0 = reply status (dont know what that means)
byte 1 - 4 is a 32bit value for the temperature that we need to reconstruct
uint8_t value[4];
value[0] = packet[3];
value[1] = packet[4]; //LSW
value[2] = packet[1];
value[3] = packet[2]; //MSW
uint32_t int_value = *(reinterpret_cast<uint32_t *>(value); //convert the value to a 32bit integer
Im not sure about the byte order though
Hi !
I am new on SPI interface. I enjoy to understand this fabulous technology !
My problème : Write and read data (temperature) on an EM4325 rfid tag (yes, yes, it is also a sensor !)
http://www.datasheets.org.uk/indexdl/Datasheet-093/DSA0072652.pdf
First :: I read the class doc. First or second, I read the wiki page on SPI.
So I start my script like follow :
My question : how to read a data in spi. I have understood that I need cs = 1 and write 0x00 with write method of the spi class.