

ExamplesĮxample implementation of CanHacker (lawicel) protocol based device: įor more information, please refer to wiki page. UlData represents the content of the mask of filter. false means it's a mask or filter for a standard frame. RXF num represents one of six acceptance filters registers from MCP2515::RXF0 to MCP2515::RXF5Įxt represents the status of the frame. MASK mask represents one of two mask MCP2515::MASK0 or MCP2515::MASK1 MCP2515::ERROR setFilter( const RXF num, const bool ext, const uint32_t ulData) MCP2515::ERROR setFilterMask( const MASK mask, const bool ext, const uint32_t ulData) The available modes are listed as follows: To create connection with MCP2515 provide pin number where SPI CS is connected (10 by default), baudrate and mode

MCP2551 High-speed CAN Transceiver - pictured above, however "not recommended for new designs".MCP2515 Stand-Alone CAN Controller with SPI Interface.

If you want to make your own CAN board for under $10, you can achieve that with something like this: The following code samples uses the CAN-BUS Shield, wired up as shown: Two receive buffers with prioritized message storage.Standard (11 bit) and extended (29 bit) data and remote frames.With an OBD-II converter cable added on and the OBD-II library imported, you are ready to build an onboard diagnostic device or data logger. This CAN-BUS Shield gives your Arduino/Seeeduino CAN-BUS capibility.

It is commonly found on modern machine tools and as an automotive diagnostic bus. CAN-BUS is a common industrial bus because of its long travel distance, medium communication speed and high reliability.
