Quantcast
Channel: Seeedstudio Forum
Viewing all articles
Browse latest Browse all 6612

CAN Bus Shield Revision... Looking for Ideas

$
0
0
ramaekers.pieter wrote:Hello Cory,
Yeah I have something,... making it possible to change the SPI SS/CS pin to another pin [...]

I do have the intention of adding support for that to the library.

ramaekers.pieter wrote:I am trying this right now, but I wired my CAN-shield from pin 10 on the shield to another pin as SS/CS on the UNO. I am trying it for days now, but cant get it to work, not sure what I am doing wrong, changed the "#define SPICS 10" in the file "mcp_can_dfs.h" into another port number but it is not working. When I change it back to 10 it works. Bit confused here. Got any experience with this?

Thanks.

Right now, it is possible but you will need to set the new SS pin mode and state before initiating the CAN or SPI libraries in the code as well as changing the compiler define parameter in the header file.

eg.
Code:pinMode(9, OUTPUT);
digitalWrite(9, HIGH);   // Define IO state to a known level to make sure the MCP2515 is unselected before initiating both SPI and CAN.
CAN.begin(SOME_BAUD_RATE);


Statistics : Posted by cory.j.fowler • on Wed Oct 02, 2013 3:13 pm • Replies 3 • Views 329

Viewing all articles
Browse latest Browse all 6612

Trending Articles