Establishing SPI between XIAO nrf52840 and Arduino nano

Hi user_rk,
I assume you need a bi-directional level converter, what level converter did you use?

1 Like

Just upgrade to newer hardware boss…

It is bi-directional

do you have a common ground?

user_rk,
We need a few more details to help.

  1. the model number of the level shifter or the link to the product
  2. the connection between Arduino_nano <–> the level shifter <–> XIAO, including power supply 5V, 3.3V and GND.

edit
Level shifter using FETs and resistors is for I2C and cannot be used for SPI. For example, I think TXS0108E can be used for SPI.

Post pictures of the setup

Hi,

I am attaching the link from which I have purchased the product. Please taka a look.

user_rk,
I have this level shifter, but it can be used for I2C but not for SPI. If you want to use it for SPI, you need to set the clock frequency to 400 kHz or lower.

1 Like

Could you let me know how can I do that?

Hi there,
This was a good thread I have referred to in the past.

HTH
GL :slight_smile: PJ
:v:

I am unable to post pictures on this platform. Could you kindly suggest an alternative?

picture posting is limited to level 1 users… so please use the forum more… and the system will upgrade you to user level 1 and you will be able to post then… its a spam thing… so we dont have to be looking at booty posts all day, not that we wouldnt want to do that…

user_kr,
If you post your XIAO and nano sketches with the correct </>, we can try to be more specific.
Please post your </> sketches first.

Click here to get the slash quote

Arduino Nano -- Level Converter -- Seeed nRF52840

 (SCK)D13 --- HV1 LV1 --- D8(SCK)
(MISO)D12 --- HV2 LV2 --- D9(MISO)
(MOSI)D11 --- HV3 LV3 --- D10(MOSI)
  (SS)D10 --- HV4 LV4 --- D7(SS)
       5V --- HV5 LV5 --- 3V3
      GND --- GND GND --- GND

you have to have MISO connect to MOSI… Master In Slave Out Master Out Slave In

user_rk,
Please show us your sketch with </> so that we can try it out.

The SPI.h used in the nRF52840 sketch is a library for master. I have looked for one for slaves but cannot find it.

How can I have MISO connect to MOSI? Master Out Slave In meaning the output of the master is the input to the slave right?
Similarly with MOSI.

So we have to find something that instructs the nrf52840 to work as the slave?