Great info…
I did pull another library and for lack of creativity renamed MCP to ANY. Then figured out that CAN can’t be used because it defaults to CAN0. Without hooking up hardware it all compiles with the dual built in CANs enabled.
Then the problems start.
The Pin Documentation is so brutal I can’t figure out what to use for a CS. The information is wrong in the documentation, I found that CS2, although in the documentation says its there… ITS NOT!.
Using SPI_CS2 which is what the documentation says to use just throws an error. I thought about using all the PINS from the XBEE so I could make a board to mount to the Macchina but all that documentation seems to be wrong as well. Or at least not trustworthy. The pins listed in the documentation don’t match the schematics properly. And the documentation under the XBEE pin-out are missing all the pins for the SPI.
I honestly don’t know how anyone new develops with this board… Hours of wasted time.
Sorry… Really stressed over how much time I wasted trying to get this working yet 5 minutes with a Due and I have an external CAN up and going.
This is what I have right now…
26 Pin Connector.
Pin 11 - SCK
Pin 12 - MISO
Pin 16 - MOSI
Pin 20 - +5V
Pin 23 - +3.3v (broke it out just in case the 2515 had to match MCU voltage… It doesn’t…)
Pin 26 - GND
I did try PIN 15 for CS which is shown in the documentation as USART2RX and SPI_CS2 but I have no idea how it’s called in the sketch since the listed names and other variations of don’t work.
Ultimately the XBEE would be a cool way to do it but getting a CS and proper pin names and locations are first.
So any idea where I can find a CS pin to use or what to call it in my sketch?