CAN BUS shield Arduino compatible

Hi all,

I need to know whether the CAN BUS shield DEV-10039 is compatible with the Arduino Mega 2560

thank you

From the comments on the product page.

After banging my head against the wall trying to get this board to work with the Arduino Mega 2560, I finally figured it out. As was mentioned previously, you have to wire the SPI bus pins 10-13 of the shield to 50-53 of the Mega 2560 as follows:

Mega CAN bus shield

51 11 (SPI MOSI)

50 12 (SPI MISO)

52 13 (SPI SCK)

53 10 (SPI CS)

But, the final trick to get the SKPang software to work properly was to modify the port assignments in file “defaults.h” as follows:

// Atmega 168/328 pin mapping

//#define P_MOSI B,3 // pin 11
//#define P_MISO B,4 // pin 12
//#define P_SCK B,5 // pin 13
//#define MCP2515_CS B,2 // pin 10
//#define MCP2515_INT D,2 // pin 2
//#define LED2_HIGH B,0 // pin 8
//#define LED2_LOW B,0 // pin 8

// Pins remapped to Arduino Mega 2560
#define P_MOSI B,2 // pin 51
#define P_MISO B,3 // pin 50
#define P_SCK B,1 // pin 52
#define MCP2515_CS B,0 // pin 53
#define MCP2515_INT E,4 // pin 2
#define LED2_HIGH H,5 // pin 8
#define LED2_LOW H,5 // pin 8




I did some reading here: [http://www.arduino.cc/en/Reference/PortManipulation](http://www.arduino.cc/en/Reference/PortManipulation) It discusses the advantage of better speed of controlling I/O pins by writing directly to the ports, but the disadvantage is that it is not a portable design to other processor pin maps. Yup.



The 2 pin maps I found here, and corrected the mappings: [http://arduino.cc/en/Hacking/PinMapping168](http://arduino.cc/en/Hacking/PinMapping168) (this is what the shield was designed to run with) [http://arduino.cc/en/Hacking/PinMapping2560](http://arduino.cc/en/Hacking/PinMapping2560)



This works! Hallelujah!

This took less than 2 min to find. Another min and a half to actually post this.

I am trying to do something similar. I’m using the Seeedstudio can shield and trying to get it to work with the SKpang software because it has the ECU_request. I thought I would just need to change the MCP2515_CS to B,1 (pin 9) because that is the chip select that the board uses but it did not work. Is this worth trying or shield I just buy this shield as well?