Page 1 of 1

SPI Output 0x55

Posted: Wed Dec 13, 2017 3:03 am
by kurt_k
I hope some else has seen this and has a solution. I am trying to communicate with a digital temperature sensor(ADT7301)via SPI . Reading through the data sheet I came to find that the sensor would prefer to have input data streamed as zero's. Looking at the SPI output, I've notice that during a read of the SDI line the SDO line is outputting 0x55. Does anyone know of a way to change this value? I really would like it to output 0x00. Anyone know how to work around this? Any help would be much appreciated.

Re: SPI Output 0x55

Posted: Wed Dec 13, 2017 10:58 am
by Benj
Hello,

SPI comms is bi-directional in nature but 99% of the time only the outgoing byte or incoming byte is used at any one time. Therefore for the read we are simply outputting an arbitrary value.

If the SPI slave device you're using requires both input and output bytes to contain valid data then instead of using the SPI master component you can use the SPI CAL component available from the Tools component menu. This component has a Master_Byte function which allows you to harness the transmitted byte and the received byte.

Let us know how you get on.

Re: SPI Output 0x55

Posted: Thu Jan 04, 2018 5:22 am
by kurt_k
Thank you for pointing out the peripheral components. I hadn't even noticed them. Using the SPI from that group seemed to do the trick. I was able to retrieve the correct values out of the sensor.

Re: SPI Output 0x55

Posted: Sun Sep 08, 2019 7:17 pm
by stefan.erni
Hi Kurt

Can you show me how did you use this Cal_SPI

regards

Stefan