Revised: January 15th, 2014
I’ve recently revised a schematic of the MCP2515 (CAN) Shield.
My updates to it are:
- 3v3 or 5v I/O voltages for the MCP2515. I have sourced a transceiver chip that has a Vio pin to set the TX and RX IO voltage level (CAN specifies a 5 volt level for the bus, so VCC on the transceiver has to be 5VDC, there is no way around this.)
- SPI via the ISP header with solder jumpers to change to the Digital IO SPI
- Split termination of the CAN bus via two solder jumper or switch. (Split termination improves CMRR)
- Option to choose pinout of the DE9 via three solder jumpers with no default option (I hate cutting traces)
- Four position terminal block for custom power and CAN bus connection
- R3 compatibility
- Physical jumper or switch to move MCP2515 CS and INT lines to another pin.
- Space for DC-DC converter (10-30VDC to ~7.5VDC connected to VIN)
Can anyone think of anything else I may have missed that doesn’t make the board application specific?
Things I plan on adding to the MCP2515_lib library:
- Support for multiple MCP2515 transceivers
- Support for other Arduino boards
- Support to handle interrupts correctly
- Support for error handling
- Support for different board crystals (The library supports 16MHz, but you have to edit the header files to get 20MHz which is easier said than done. I made an Excel spreadsheet to calculate the constants. I’ll add that speadsheet to my MCP2515_lib repository on my Github soon.
Right now, a lot of the functionality of the MCP2515 is hard-coded using compiler define parameters in the header files. Most of the hard coded stuff doesn’t need to change, but there is room to grow.
I am also interested in writing a CAN library that supports other transceiver ICs but thats still a ways off. The Arduino Due has a CAN MAC but no PHY. If someone wants to send me a Due, I can make a start on implementing it and the MCP2515 into a combined library or something.