LabWired The easy way to build hardware
SPI device

MCP2515 CAN

The MCP2515 CAN is an SPI device in the LabWired part catalog. Its catalog type is mcp2515. It connects to the MCU over SPI. The catalog gives a supply range of 2.7–5.5 V. It has 9 pins. A registered peripheral model runs in the engine: the firmware talks to it over the real bus and gets device-accurate responses.

From the catalog: SPI register shell; CAN wire frames not modelled.

Key facts

CategorySPI devices
Catalog typemcp2515
InterfaceSPI
Supply range2.7–5.5 V
Pins9
DatasheetMicrochip MCP2515 datasheet

What LabWired simulates

What is simulated

Simulated device model

How it was validated

Built from the datasheet. Implemented from the part’s register documentation and exercised by automated tests. Nothing physical was ever placed next to it.

MCP2515 CAN pinout

PinElectrical typeFunction
VCC Power input Supply
GND Power input Supply
CS Input SPI chip select (CS)
SCK Input SPI clock (SCK)
SI Input SPI data out of the MCU (MOSI)
SO Output SPI data into the MCU (MISO)
INT Output —
CANH Passive —
CANL Passive —

How to simulate the MCP2515 CAN in LabWired

  1. Open the Playground at app.labwired.com and place an MCU board.
  2. Add the MCP2515 CAN (catalog type mcp2515).
  3. Connect VCC and GND to the supply and ground of the board. Use a supply inside the catalog range of 2.7–5.5 V.
  4. Connect SCK, SI and SO to the SPI pins of the board.
  5. Connect CS to the chip-select pin of the board, or to a free GPIO.
  6. Connect INT, CANH and CANL as your circuit needs.
  7. Run the firmware. It selects the part and moves bytes over the simulated SPI bus as on hardware.

Related SPI devices

All SPI devices · All parts

Further reading

Modelled from Microchip MCP2515 datasheet.