CAN
An inter-device communication bus being used on this year's robot.
Note: This page is obsolete, as Moxom's Master now only uses CAN for motor control, and the Black Jaguar motor controllers provide an RS-232->CAN bridge.
USB-CAN Interface
The computer will talk on the CAN bus through a USB-CAN bridge. A simple ASCII based protocol will be used for sending and receiving CAN messages. Currently, the bridge firmware only supports extended CAN frames, since that's what we're planning on using. Each CAN frame has an ASCII representation, which is adapted from the CANUSB Manual Tiiiiiiiil(dd){0,8}?\r The T indicates an extended CAN frame. The series of is represents the identifier portion of the CAN frame. Each i is a hex nibble, and 8 such nibbles are required. The l is the length, or the data length code (DLC), which is a digit between 0 and 8, corresponding to the number of data bytes in this frame. The ds are the data bytes for the CAN frame. There MUST be exactly l*2 ds present for a valid CAN frame. Some example, valid, nonsense frames follow: T012345670\r, T0abcdef01ff\r, T0abcdef08deadbeefcafebabe\r
CAN ICs
- MCP2515 SPI CAN Controller
- MCP2551 CAN Transceiver
- MCP25020 Digital CAN Expander
- MCP25050 Mixed Signal CAN Expander
Other Links
Suggested Reading
- Microchip AN713 Introduction to CAN
- Microchip AN816 Example CAN system using CAN-NET protocol
- Programming Specifications for the CAN IO-Expanders

