Site Information

 Loading... Please wait...

SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino - Microchip MCP2515 CAN Bus Controller

Posted by Wilfried Voss on

This post is part of a series about SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino.

SAE J1939 ECU Programming & Vehicle Bus Simulation with Arduino

Microchip Technology’s MCP2515 is a stand-alone Controller Area Network (CAN Bus) controller that implements the CAN specification, version 2.0B. It is capable of transmitting and receiving both standard and extended data and remote frames. The MCP2515 has two acceptance masks and six acceptance filters that are used to filter out unwanted messages, thereby reducing the host MCUs overhead. The MCP2515 interfaces with microcontrollers (MCUs) via an industry standard Serial Peripheral Interface (SPI).

The features include two receive buffers with prioritized message storage, six 29-bit filters, two 29-bit masks, and three transmit buffers with prioritization and abort features. (Source: Microchip Datasheet)

Note: CAN specification 2.0B refers to the capability of using standard CAN frames with 11-bit message identifier plus the extended format with a 29-bit message ID (as required for J1939).

To download the full MCP2515 data sheet log on to:

Both CAN shields as described in the following chapters also utilize the Microchip MCP2551 CAN transceiver, which converts the internal TTL signals to a differential voltage as demanded by the CAN standard.

To download the full MCP2551 data sheet log on to:

Note: While the MCP2515 provides message filters and masks, their programming presented a challenge to a point of virtual uselessness (the original code delivered by Microchip is useless per default). The MCP2515 driver code as used in this book’s Arduino projects does refer to message filtering, but the author of the code does not guarantee proper functionality. For that reason, all message filtering in the introduced Arduino projects is accomplished per software.

A Comprehensible Guide to J1939

SAE J1939 has become the accepted industry standard and the vehicle network technology of choice for off-highway machines in applications such as construction, material handling, and forestry machines. J1939 is a higher-layer protocol based on Controller Area Network (CAN). It provides serial data communications between microprocessor systems (also called Electronic Control Units - ECU) in any kind of heavy duty vehicles. The messages exchanged between these units can be data such as vehicle road speed, torque control message from the transmission to the engine, oil temperature, and many more.

A Comprehensible Guide to J1939 is the first work on J1939 besides the SAE J1939 standards collection. It provides profound information on the J1939 message format and network management combined with a high level of readability.