Can I link 2 Nanos via SPI using just 2/3 wires?

I have 2 Nanos which I want to link together.
One is the master and only writes to the other, it never needs to read.

Is there a way to use the standard SPI libraries to link them using 2/3 wires?
(My understanding if the library expects 4 pins to be defined. Can I avoid this?)

I only have 2 (I could free up a 3rd one but would rather not) pins free.
Thanks

You will need 3 on the Master
Clock, Data (MOSI), Chip Select
and 3 on the Slave
Clock, Data (MOSI), Chip Select

(Yes, MOSI to MOSI)

Nick Gammon has a good page with examples here

CrossRoads:
You will need 3 on the Master
Clock, Data (MOSI), Chip Select
and 3 on the Slave
Clock, Data (MOSI), Chip Select

(Yes, MOSI to MOSI)

Nick Gammon has a good page with examples here
Gammon Forum : Electronics : Microprocessors : SPI - Serial Peripheral Interface - for Arduino

Thanks CrossRoads, That page was very handy, and I've got it working fine with 3 wires.

I am curious why I can't just tie the SS line on the receiver to ground.

If I disconnect it whilst it running, it keeps working just fine.
But if I reboot both boards, the link seems to fail and won't start

Can anyone explain why?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.