Page 1 of 1

SPI read difficulty

Posted: Sat Nov 06, 2021 9:22 pm
by Nake350
I'm trying to read status of an Si4455 wireless module using SPI, but getting no response.

I suspect it's to do with my SPI clock stopping after the request for info is sent on the MOSI line (0x44), but the Slave appears to need the clock kept running whilst it sends back an answer?

SPI out
SPI_Capture.JPG
SPI_Capture.JPG (88.24 KiB) Viewed 2876 times
Si4455 SPI requirements.
Si4455 SPI Polling Method.JPG
Si4455 SPI Polling Method.JPG (112.95 KiB) Viewed 2876 times
I also noticed the SPI from my PIC16F88 is sending a character when the read character function is used. Is this normal?

Is there a way to keep the clock running past a send command in flowcode, or maybe I am not understanding the Si4455 requirements properly?

Thank you.

Re: SPI read difficulty

Posted: Sat Nov 06, 2021 11:38 pm
by medelec35
I'm not an expert on SPI but after sending the info request, then you will need to send dummy data e.g 0.
That will run the clock so the SPI data will receive the data on the MISO line.

Re: SPI read difficulty

Posted: Mon Nov 08, 2021 4:36 pm
by BenR
Hello,

SPI is always bi directional and so everytime you send a byte you also receive a byte. Usually only one of the bytes has significance.

So for this you would send 0x44, ignoring the incoming byte and then send a dummy byte, and collect the incoming byte.