Go Down

Topic: [EasyCAT/CAN-bus]How do I solve pin assignment conflict? (Read 227 times) previous topic - next topic

Soichiro_Sam

Hello everyone. I'm Sam. I am trying to use EasyCAT shield and CAN-bus shield on the Arduino UNO.

EasyCAT: https://www.bausano.net/en/hardware/ethercat-e-arduino/easycat.html
CAN-bus: http://wiki.seeedstudio.com/CAN-BUS_Shield_V1.2/

EasyCAT is mounted on the CAN-bus shield, and CAN-bus shield is mounted on the Arduino.

However,  when I try to run EasyCAT example program, it fails to initialize. I guess this is because pin assignment is conflicting between two shields.

Does anyone have hints? Any help will be appreciated.

ieee488


Soichiro_Sam

Thank you very much for the reply. Yes I confirmed the each shield works if it's mounted individually.

ieee488

Look at the libraries you are using for each shield; that should give you a clue.


.

Soichiro_Sam

Thank you again. I read through the documents they have.

Pin assignments for CAN-bus Shield: https://raw.githubusercontent.com/SeeedDocument/CAN_BUS_Shield/master/image/PINMAP.png

This shows that CAN-bus shield uses D9 pin as CS. This conflicts the default setting of EasyCAT since EasyCAT shield also uses D9 as CS if default.

Then, I looked up the EasyCAT's documentation and it says:

The constructor allow us to choose the pin used for the EasyCAT SPI chip select. Without any parameter pin 9 will be used
We can choose between: 8, 9, 10, A5, 6, 7
On the EasyCAT board the SPI chip select is selected through a bank of jumpers
(The EasyCAT board REV_A allows only pins 8, 9, 10 through 0 ohm resistors)



Having this, I changed the EasyCAT's CS pin to D8.


However, I am still having a problem (even a sample program doesn't run.)

ieee488

On the EasyCAT board the SPI chip select is selected through a bank of jumpers

Soichiro_Sam

ohhhhhh I didn't pay attention to this sentence. I thought this one was something ignorable.

I configured the chip object on the board and it worked!!! Thank you sooo much.

ieee488

ohhhhhh I didn't pay attention to this sentence. I thought this one was something ignorable.

I configured the chip object on the board and it worked!!! Thank you sooo much.
Very good news!

Go Up