Which are the necessary pins for the Sparkfun CAN-BUS shield?

I wanna test the Sparkfun CAN-BUS shield (CAN-BUS Shield Hookup Guide - SparkFun Learn) but I don't want to solder everything. I've found this source code SparkFun_CAN-Bus_Arduino_Library/defaults.h at master · sparkfun/SparkFun_CAN-Bus_Arduino_Library · GitHub that specifies pins 2,3,4,5, but I think they're AVR pins, not arduino ones. So, which pins are them in arduino UNO?

The other pins I must solder are RX/TX, 5V and GND, right?

I've found this source code SparkFun_CAN-Bus_Arduino_Library/src/defaults.h at master · sparkfun/SparkFun_CAN-Bus_Arduino_Library · GitHub that specifies pins 2,3,4,5, but I think they're AVR pins, not arduino ones. So, which pins are them in arduino UNO?

That's not AVR pins but port bits (that's why there is a letter in front of the number).

The Sparkfun CAN bus shield connects to pins 9, 10, 11, 12 and 13 of the Arduino (so it's not compatible with the Mega2560 for example), while pin 9 is the CS for the SD card interface, pin 10 is the CS for the MCP2515 and pins 11, 12 and 13 are the SPI bus lines (MISO, MOSI, SCKL).

The other pins I must solder are RX/TX, 5V and GND, right?

To use the CAN bus you don't need the RX/TX connection, that's for the optional GPS module only.

oh yes, I meant TX/RX for serial listening on the test module :slight_smile:

thank you!

pylon:
That's not AVR pins but port bits (that's why there is a letter in front of the number).

The Sparkfun CAN bus shield connects to pins 9, 10, 11, 12 and 13 of the Arduino (so it's not compatible with the Mega2560 for example), while pin 9 is the CS for the SD card interface, pin 10 is the CS for the MCP2515 and pins 11, 12 and 13 are the SPI bus lines (MISO, MOSI, SCKL).

To use the CAN bus you don't need the RX/TX connection, that's for the optional GPS module only.

I soldered 9,10,11,12,13, GND, 5V, 3V, but I'm getting

CAN Read - Testing receival of CAN Bus message
Can't init CAN

Are you sure those are the pins?

CAN INT is connected to D2 but you didn't ask for that connection nor did you ask if these are all connections needed to run the shield.

If you need only the CAN part of the shield you have to connect D2, D10, D11, D12, D13, 5V, GND and RESET.

Thanks, it worked!

I also just found the schematic. I understand what's MISO, MOSI, SCK, but what's CAN_CS and CAN_INT?

I also just found the schematic. I understand what's MISO, MOSI, SCK, but what's CAN_CS and CAN_INT?

CAN_CS is the chip select for the MCP2515. On an SPI bus every chip needs a separate CS line to address that particular chip. If the chip select line is not LOW, the chip will ignore the bus lines and put them into high impedance state.

CAN_INT is specific to the MCP2515 and signal that data was received (maybe also other notifications). If you want to know more about it, consult the datasheet of the MCP2515.

hello @JustWannaLearn i am using the the same sparkfun can shield and arduino uno and i want to test the canbus but i am struggling with connecting the correct pins. i connected pin 9,10,11,12,13 on the uno board to pins # 9,10,11,12,13 on the CAN-SHIELD and i also connected the GND and the 5V. but still giving me

Can't init CAN