Multi Arduino SPI Communication Guidance

Hey,

I am putting together an Arduino project and wanted to get some guidance on the feasibility of the project.

There will be 3 stages in the project: Grandmother, mother, daughter.

Grandmother: This will be an Arduino Uno with Ethernet shield. A PC will communicate with the Arduino using an Ethernet cable. It appears the EthernetUDP or Telnet Client samples will work for this. For example: http://forum.arduino.cc/index.php?topic=209602.0 Actually using C# to communicate to the Arduino via Ethernet is exactly what I'm looking to do.

The grandmother will also need to communicate to 4 motherboards via SPI. I believe on the Ethernet shield the SS pin is hardwired to pin 10 so I will need to use the manual SPI method using the shiftout and shiftin methods. http://arduino.cc/en/Reference/shiftOut

Mother: This will be an Arduino Mega. It will need to act as both an SPI master (from daughter) and SPI slave (from grandmother). I've seen this post on how to setup an Arduino as SPI slave. http://www.gammon.com.au/forum/?id=10892&reply=1#reply1 It seems like it should be possible to integrate master and slave into one. The mother will need to communicate with multiple daughters via SPI. Each daughter will have multiple SPI devices as well. The Mega has enough I/O ports while the Uno does not.

I have already implemented a partial solution for the mother where I have a Mega communicating with a single Daughter, which includes multiple SPI devices.

Daughter: The daughter board is a board with 2 SPI devices on it that will send/receive information but does not contain any Arduino.

I am hoping to communicate from the PC to a single device (grandmother) and based on the input from the PC the grandmother will communicate to any other the daughter boards through the mother board. It would be possible to just straight communicate to each motherboard via Ethernet if that would significantly simplify the task.

Any other thoughts on how to implement this project?

Thanks,

The grandmother will also need to communicate to 4 motherboards via SPI. I believe on the Ethernet shield the SS pin is hardwired to pin 10 so I will need to use the manual SPI method using the shiftout and shiftin methods.

Wrong any pin can be used as SS. Look at the lib. You do not need different MOSI/MISO/CLK pins these are common to all devices on the bus.

A single you can deal with 10s of SPI slaves.

Mark

holmes4: Wrong any pin can be used as SS. Look at the lib. You do not need different MOSI/MISO/CLK pins these are common to all devices on the bus.

A single you can deal with 10s of SPI slaves.

Mark

Great, that makes it easier. Thanks.

Just make sure that D10 is set to an output when you want to be the SPI master.