January 11, 2011
Device drivers, network protocols of all types
EV motor controllers, many other projects
about 4 years ago
Make certain that you understand your requirements. From simplicity of the question, it is pretty clear that you don’t.
Do you need to avoid transmitting frames? Or do you need to not transmit anything e.g. ACK and error bits. What about overload frames? Error frames?
Do you want to receive frames which are correct except for the ACK bit? (Possible with some CAN controllers in passive monitoring mode.)
How many packets do you want to queue for the second CAN bus? What happens the queue overruns? (It is possible.)
You must understand the options to pick the right one. Make certain that everyone involved understands the implications, and that Quiet mode is different than Silent mode.
The schematics show a 16MHz crystal.
That is the most flexible clock rate for the MCP2515. The clock can be as low as 10MHz for 1Mbps CAN, but the receiver can do a much better sample with 16MHz.
Internally the chip divides the input clock by two to get a symmetrical internal clock, and then uses these time period to look for incoming signal edges. With only 5 time periods, the chip takes a single sample 3 ticks after the bit period start e.g. 60% into the bit period. With 8 time periods it can take three samples and use the majority count.
Higher clock rates allow finer-grained sampling, but this barely improves the error rate.
A MCP2515 controller is very easy to utilize with a prototype shield. I run my MCP2515 implementation off of a timer output set to “count to zero”. This gives a 8MHz clock and a 500Kbps maximum rate – the highest standard speed for automotive use, but less than the max 1Mbps rate used industrial and lab equipment.
If you are designing your own board, add in a jumper selectable 120 ohm terminator. With this board you could always solder it into the 4 pin header position, but that is inconvenient.
You probably also want to provide an option to use the interrupt output. My software uses polling mode for regular operation, but still needs the interrupt to allow the system to go into low-power sleep mode.
Finally, have you considered connecting to the ISP header? I think this gives the correct SPI pin wiring for most types of Arduino boards. The Chip Select and interrupt pin assignment will still vary, but those are easier to handle.
No public wish lists :(
Forgot your password?
No account? Register one!