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

3-wire SPI interface

I am trying to connect an accelerometer to my board. Unfortunately I only have enough GPIO's available to configure for a 3-wire SPI interface. However I can't find any information on how to configure the nRF51822 for a 3-wire SPI interface, or how it should be wired. Can anyone help?

Thanks guys

Parents
  • Rather depends what you mean. You only need 3 GPIOs to implement SPI; MISO, MOSI and SCLK, as the nrf51 doesn't support chip select.

    If you only have 2 GPIOs available and only need transmission in one direction, you can just connect clock + whichever of the two data lines you need and leave the other one unconfigured in the register.

    If however you are talking about the 1/2 duplex version of SPI which uses one data line (SISO) and one clock line for bi-directional comms, you can't do it with the nrf51822 SPI.

Reply
  • Rather depends what you mean. You only need 3 GPIOs to implement SPI; MISO, MOSI and SCLK, as the nrf51 doesn't support chip select.

    If you only have 2 GPIOs available and only need transmission in one direction, you can just connect clock + whichever of the two data lines you need and leave the other one unconfigured in the register.

    If however you are talking about the 1/2 duplex version of SPI which uses one data line (SISO) and one clock line for bi-directional comms, you can't do it with the nrf51822 SPI.

Children
Related