CAN bus (MCP2515)
CAN bus (MCP2515): CAN controller, SPI. In Argynix Lab it is fully simulated: wire it to an Arduino, ESP32, STM32 or Raspberry Pi Pico in your browser and run your code against it.
An MCP2515 with its TJA1050 transceiver, as mcp_can, arduino-mcp2515 and the CAN library drive it over SPI: its instructions and registers, the modes (normal, loopback, listen-only, configuration), three transmit and two receive buffers, masks and filters, and INT. Modules whose CANH and CANL share wires are one bus, on one board or between boards: a frame goes at the bit rate the sketch sets, is received by the others set to that rate, and needs one in normal mode to acknowledge it (alone on the pair, it is sent again and again). A node in normal mode at another rate sends error frames over every frame: the sender goes bus-off, and comes back by itself after 128 × 11 recessive bits. Set the crystal as on your module (8 MHz on the common blue one): a sketch that names another runs at another bit rate.

Pins
- INT (LOW: a frame or an event)
- SCK
- SI (MOSI)
- SO (MISO)
- CS (chip select)
- GND
- VCC
- CANH (the pair)
- CANL (the pair)
Examples with the CAN bus (MCP2515)

ESP32 TWAI and Uno MCP2515 on CAN
The ESP32’s own CAN controller (TWAI, driver/twai.h) through an SN65HVD230 transceiver, and an Uno with an MCP2515, on one pair at 500 kbit/s. The ESP32 sends its knob; the Uno dims its LED to it and answers how many it has had.

Two Unos on a CAN bus
Each Uno has an MCP2515 CAN module (mcp_can); their CANH and CANL are one pair. Board 1 sends a count and its knob every half second; board 2 prints each frame and lights its LED when the knob is past half way.







