This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI read and write

Dose this capture from the Nordic Specification means that to read bytes from SPI i need to send before. Each byte i send i get a byte!!! MLy case i have read only sensor that sends periodically. If it is mandatory to send in order to receive so i have to send 4 bytes to receive the 4 bytes i am looking for.11.PNG

Parents
  • Hi,

    SPI is typically implemented using shift registers, meaning that data is clocked out of the master shift register and into the slave register through the MOSI line, and similarly, out of the slave shift register and into the master register through the MISO line.

    In theory, you should be able to clock in the data through the MISO line without having the MOSI line connected. You are still required to "send" dummy data from the master, to make the clock run.

    This operation will depend on your sensor. Could you provide details on the device? Then I might be able to help you with your setup.

    Best regards,

    Jørgen

  • when the data is ready the RDY is reset. So I have to do check peiodically each 100ms

    No, you don't have to: that is one approach - but not the only approach.

    An alternative would be to use an interrupt ...

Reply Children
No Data
Related