SPI/I2C connection help

I am using a Mega and connecting various modules which I have managed to get working all individually and am now trying to connect them all up.

I know there are various connection rules (address calls etc.) for SPI and I2c but my first problem is pin name confusion!!

The Mega has dedicated SPI pins on;

50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).

I am using a MFRC 522 RFID module and it has pin names of;

sda, sclk, mosi, miso, rst. It looks like one pin more than the mega and i'm not sure what SDA and RST are for or how they connect to Mega?

Also I have a ssd1351 oled which has pins;

sclk, mosi, dc, cs, rst so different again!

I am also using a RTC module (I2C) and that has dedicated SDA and SCl pins of 20 and 21 in the library so I dont think I will have issues with that.

If I can get the pin connections straight first for both modules into the mega then I can work out how to address the display and RFID on the bus. Both display and RFID can run from 3.3v so I shouldnt need level shifters?

the MFRC522 supports both I2C and SPI - see the MFRC522 datasheet

for the SSD1351 have a look at section 8.1.3 of SSD1351.pdf

Horace

Thanks but they dont seem to help much with my pin naming questions? In fact some different names are used!

Really I just need to know for SPI on the devices I mention what pins are the same but have different names?

e.g.

MOSI looks like its common to all
MISO same as ??
SCK I assume is the same as SCLK
SS same as??
SDA same as??
RST same as??
DC same as??
CS same as?

Also if the mega uses;
50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).

what ping is missing to chain SPI modules together as it looks like I need 5 pins?

reading the data sheets it looks like mega pins
MISO (Master In Slave Out) - The Slave line for sending data to the master,
SSD1351 not used MFRC522 MISO
MOSI (Master Out Slave In) - The Master line for sending data to the peripherals,
SSD1351 SDIN - MFRC522 MOSI
SCK (Serial Clock) - The clock pulses which synchronize data transmission generated by the master
SSD1351 SCLK - MFRC522 SCK

MFRC522 requires chip select pin NSS see data sheet section 8.1.2
SSD1351 - CS# is chip select (active LOW) and D/C# selects write command or write data see 8.1.3

Horace gave the right answer. If a chip supports both I2C and SPI you must refer to the datasheet to determine the connections. There is no standard labeling for breakout boards when both I2C and SPI are supported. The datasheet will tell you. Look at table 3 in the MFRC522 datasheet that Horace pointed you to. It shows what the common pins are. You only need 4 pins for SPI.

As far as labeling convention, for SPI the same pin may be called cs (chip select), ss (slave select) or nss (negative slave select), etc. On the master you might find...
SCLK : SCK, CLK.
MOSI : SIMO, SDO, DO, DOUT, SO, MTSR.
MISO : SOMI, SDI, DI, DIN, SI, MRS
SS : nCS, CS, CSB, CSN, nSS, STE, SYNC.
To confuse further, DI (MISO) on the master might be connected to DO on the slave.

I2C is more conventional, always labeled SDA and SCL.

it is also worth while looking at timing digrams, such as Figure 8.5 of SSD1351.pdf, which show the signals on the pins

Thanks guys

So I think I am connecting the RFID and OLED SPI's together as in the attached.

with the MISO pin being the DC pin on the OLED and the SDA pin on the RFID being the equivalent CS/SS line on the OLED, one CS can go to pin 53 (hardware spi) on the mega and the other to another assigned pin.

50e5d529ce395f2f7a000000.png