Site Information

 Loading... Please wait...

SAE J1939 C Library - Including Source Code - for CAN-Enabled PICmicro Microcontrollers

Posted by Industry News on

A Comprehensible Guide to J1939

SAE J1939 is a series of SAE recommended practices that have been developed to provide a standard architecture by which various electronic systems on a vehicle can communicate. It was developed by the Truck and Bus Control and Communications Network Subcommittee of the Truck and Bus Electrical and Electronics Committee, but its application is not restricted to truck and bus applications. SAE J1939 has been implemented in a broad range of vehicles and transportation systems.

SAE J1939 implements a communication protocol over a CAN Bus network. The CAN Bus network spans two or more interconnected Electronic Control Units (ECUs). As per the SAE J1939-11 specification, the ECUs are connected using linear shielded twisted pair wiring, with a data rate of 250 or 500 Kbits/second.

Microchip’s CAN-enabled PICmicro devices provide a robust, adaptable and low-cost means of implementing the SAE J1939 protocol on a wide variety of electronic vehicle components. The J1939 C library handles the majority of network management aspects of SAE J1939, allowing the user to focus on the primary application. The library provides support for all SAE J1939 address configurations and is easily configurable through Microchip’s Application Maestro™ utility.

For details about the PIC18 family of microcontrollers, refer to one of the CAN-enabled PICmicro microcontroller data sheets, such as the “PIC18FXX8 Data Sheet” (DS41159), the “PIC18F6585/8585/6680/8680 Data Sheet” (DS30491), the “PIC18F2585/2680/4585/4680 Data Sheet” (DS39625) and the “PICmicro® 18C MCU Family Reference Manual” (DS39500).

For details about the SAE J1939 specification, refer to the various SAE J1939 specifications, or visit

SAE J1939 ECU Simulator Board With USB Port

SAE J1939 ECU Simulator Board With USB Port

The  jCOM.J1939.USB gateway board is a high-performance, low-latency vehicle network adapter for SAE J1939 applications. It allows any host device with a USB COM port to monitor SAE J1939 data traffic and communicate with the SAE J1939 vehicle network.

The board supports the full SAE J1939 protocol according to J1939/81 Network Management (Address Claiming) and J1939/21 Transport Protocol (TP). It is also supported by an extensive programming interface for Windows and Linux/Ubuntu applications, including full C/C++/C# source code for short time-to-market developments.

The strength of the board lies in the fact that the entire SAE J1939 protocol, including all timing requirements, is stored on-chip, thus taking the burden off the main system. The board uses a USB COM port to communicate with the main system, i.e. all data transfer is handled through a standard COM port access. 

The communication protocol between the board and the main system is well documented and thus allows a porting to any computer system with a USB connection. Working source code libraries exist for Windows (C# under Visual Studio 2012/2013), Linux and its derivatives (C++ using Code::Blocks), and Raspberry Pi (C using the standard gcc compiler).

More Information...