MCP2515Stand-alone CAN controller with SPI
Add classical CAN messaging to an SPI-equipped controller.
MCP2515 is a stand-alone classical CAN 2.0B controller accessed through SPI. It handles frame formatting, arbitration, error detection and message buffering, while the host prepares messages and services received data. An external transceiver is required to drive CANH and CANL. Three transmit buffers and two receive buffers separate bus activity from host transfers. Six acceptance filters and two masks can reduce unnecessary host work. Standard 11-bit identifiers and extended 29-bit identifiers are supported, with up to eight data bytes per frame; CAN FD is not supported. The example combines a 5 V controller, a 20 MHz external oscillator and an MCP2562 transceiver. A reviewed timing setup produces 125 kbit/s. Wiring alone does not start communication: firmware must reset and configure the controller, select Normal mode and communicate with another correctly configured node.

