This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.


M21+ SPI Issues

Keith Davis

Hi, I have a rather complex project in development and we are using a couple of MDUINO 21+ Industrial shields. 

The problem we have come across is when trying use the internal SD card reader with other SPI based peripherals. Namely, we have an LCD display using CS pin 18, and 2 K Type Thermocouple amplifiers using CS pins 19 and 0. Note: these pins have been specified as being able to be used as CS or SS pins, so we shouldn't have an issue ??.

We need to read a data file using the internal SD card on the PLC - this works when we remove the Thermocouple amplifiers but only sometimes. When they are configured they work fine, but the SD card does not. 

We have been through the documentation and videos and this should work - it all does if we just use a MEGA 2560 , so why not using the PLC. We have even tried to connect an external SD card shield but cannot get it to work using the PLC. 

If we can't get this to work reliably then I'm not sure what use this PLC is ??  

Anyone found similar issues - or have suggestions ??

I would post code but we are at over 3000 lines so it's pretty big. This should be a generic enough question and I'm hoping someone has a light bulb fix..


1 Respuesta
Mejor respuesta

Dear Keith,

To be able to work with pins 18 and 19, switches RX1 and TX1 found behind the PLC must be turned OFF.

With this, the pins are enabled and ready to use.

Best regards