Multiple SPI devices on Mega

I've been searching for a few weeks and trying to figure out exactly how I wire two SPI devices to a MEGA.

I have an Ethernet module https://robotdyn.com/ethernet-module-w5500-3-3v-5v.html

and an RFID read RFID-RC522 https://robotdyn.com/ethernet-module-w5500-3-3v-5v.html

My programming is working as expect with the RFID reader alone, now I'm just trying to incorporate some reporting to the internet and need to get ethernet going.

Unfortunately, I haven't found some guidance that I can fully understand. Any help or point into the right direction is greatly appreciated.

You must not be looking too hard for guidance. How to Connect Multiple SPI devices to an Arduino Microcontroller

I really don't understand why people on forums have to be this way....

I did my due diligence and couldn't find anything that sufficiently offered enough guidance or explanation.

The page you linked to does though, and I thank you for that, but unfortunately, it never appeared in any of my searches.

rwslippey:
I really don't understand why people on forums have to be this way....

I did my due diligence and couldn't find anything that sufficiently offered enough guidance or explanation.

The page you linked to does though, and I thank you for that, but unfortunately, it never appeared in any of my searches.

I don't know what search words you used, but all I did was Google 'Arduino multiple SPI' and that link was FIRST one that I got.

.

Multiple devices on a SPI bus is always a major problem. You may assume that it never works. Maybe, if the modules allow it, there is a small chance that it will work.

The MISO signal (Master In, Slave Out) is the data from the SPI Slave device to the Master (the Arduino). They are all tied together.

When the SlaveSelect is not active for a SPI device, then it should release the MISO signal. When it keeps its MISO signal 'high' or 'low' (instead of floating) then an other device can not use the SPI bus.
As far as I know, most modules for Arduino do not release the MISO signal. That means that only that module can be connected to the Arduino SPI bus and nothing else.

An other problem is 3.3V devices connected to a 5V board. The Arduino Mega 2560 is a 5V board, so you need level shifters for 3.3V chips on the SPI bus.

You have to read the schematics and read the datasheets of the chips to see if the MISO signal is released and if it is compatible with 5V.

If both modules release the MISO signal, then you can go on. You need two SlaveSelect pins. If you use libraries and they happen to use the same SlaveSelect pin, then you might need to change that.

One thing I have found that is very useful when working on a SPI or I2C thingy is to use an inexpensive logic analyzer to 'see' what is actually going on.

rwslippey,

I have to agree with you, as a newbie we don't always know the right way to word questions here or on Google. Not sure why some of the people we turn to for help and guidance have to be so rude. I hope you find the answers you are looking for.

EMT

it's fifty percent, this is a DIY forum for can do people. if someone points a finger in the right direction they figure you got more help than you deserve

the other 50 percent, it's Internet Tough Guys and Keyboard Commandos whose BS is tolerated here.