SPI read difficulty

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Nake350
Posts: 8
http://meble-kuchenne.info.pl
Joined: Tue May 11, 2021 10:53 pm
Has thanked: 3 times
Been thanked: 1 time

SPI read difficulty

Post 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 1434 times
Si4455 SPI requirements.
Si4455 SPI Polling Method.JPG
Si4455 SPI Polling Method.JPG (112.95 KiB) Viewed 1434 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.

medelec35
Matrix Staff
Posts: 1463
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 514 times
Been thanked: 473 times

Re: SPI read difficulty

Post 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.
Martin

BenR
Matrix Staff
Posts: 1756
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 446 times
Been thanked: 606 times

Re: SPI read difficulty

Post 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.

Post Reply