I’ve used the Arduino Due for many of my CAN Bus prototyping projects because it meets two practical requirements: low cost and ease of programming. I can write and upload sketches in the familiar Arduino IDE, and the Due’s two built-in CAN controllers let me work with two independent networks without adding a separate controller for each channel. To connect either channel to a physical CAN bus, I add a transceiver.
Note: The Arduino Due’s internal CAN controllers do not support CAN FD, only Classical CAN. I will address Arduino CAN FD programming in a separate post.
Why I Chose the Arduino Due
The Due was Arduino’s first board based on a 32-bit ARM microcontroller. Its Atmel SAM3X8E uses a Cortex-M3 core running at 84 MHz and provides 96 KB of SRAM and 512 KB of flash. The microcontroller also supports direct memory access (DMA), which can handle certain data transfers while the CPU does other work. The board provides 54 digital I/O pins, including 12 PWM-capable outputs, along with 12 analog inputs, two analog outputs, four hardware serial ports, two I²C interfaces, and an SPI header.
The Arduino IDE is available for Windows, macOS, and Linux. If you’ve programmed an Uno or a Mega 2560, the basic workflow will feel familiar. You can often carry over application logic, though libraries that depend on AVR-specific registers or peripherals may need changes. The Due also uses 3.3 V logic, an important consideration when reusing hardware designed for 5 V Arduino boards.
For most prototypes, I use serial output to report what the sketch is doing. That works well for checking whether a CAN channel initialized, whether a frame arrived, or what the software did with it. If I need breakpoints or single-stepping, the Due’s JTAG header provides a way to use an external debugger. The working sketches I provide in this series give you a starting point for your own experiments and modifications.
The Two USB Ports
The Programming port is the one I use to upload sketches and view diagnostic messages. It connects to an ATmega16U2, which acts as a USB-to-serial bridge to the SAM3X8E. In a sketch, Serial sends and receives data through this connection.
The Native USB port connects directly to the SAM3X8E. A sketch can use it as a virtual serial port through SerialUSB. With suitable software, the Due can also act as a USB peripheral, such as a keyboard or mouse, or as a USB host for compatible devices.
Connecting the Due to a CAN Bus
The SAM3X8E contains two independent Classical CAN controllers. Each controller handles tasks such as frame transmission and reception, arbitration, and error detection. The transceiver handles the electrical side, converting the controller’s 3.3 V logic signals into the differential signals carried on CAN_H and CAN_L and converting received bus signals back into logic levels.
The first channel uses the pins labeled CANRX0 and CANTX0 on the board. The second channel shares two pins with other functions. Its receive signal, CANRX1, is on DAC0, and its transmit signal, CANTX1, is on digital pin 53. Using the second CAN channel therefore commits both pins to that interface.
This arrangement is similar to the Due’s hardware serial ports. The board exposes logic-level UART signals, and an external transceiver provides the electrical interface required for RS-232, RS-422, or RS-485. For CAN, you need one transceiver with a 3.3 V-compatible logic interface for each channel you intend to use.
Many CAN shields for the Uno and Mega 2560 include both an MCP2515 CAN controller and a transceiver. On the Due, a transceiver-only interface lets you use the controllers already inside the microcontroller. The standard Arduino Due core leaves CAN programming to a separate library. The open-source due_can library supports both channels and uses can_common as a dependency.
A Breakout Board for the Workbench
A CAN transceiver breakout board is a low-cost way to get one channel running on the workbench. Depending on the module, you can make the connections with jumper wires or use a breadboard. Before wiring it up, check the supply and logic-level requirements and see whether the module has a built-in termination resistor. A linear CAN bus should have a 120-ohm termination at each physical end. Enable the module’s termination only if it occupies one of those ends.
The same CAN library and frame-handling code apply whether you use a breakout board or a dedicated transceiver interface. If the hardware exposes an enable or standby pin, your sketch may also need to configure that pin.
A More Permanent Dual-CAN Setup
For a prototype I intend to keep assembled, Copperhill Technologies’ JCOM.CAN.DUE-X provides a more permanent solution than a breakout board and jumper wires. It brings both CAN transceivers, bus connectors, and jumper-selectable termination onto one board. The assembly can also accommodate a compatible 3.3 V Arduino shield, provided the shield’s pin assignments do not conflict with those used by the CAN interface.
The JCOM.CAN.DUE-X accepts a 7 to 36 VDC supply and powers the entire assembly, including the Arduino Due. It also has two software-controlled LEDs, one for each CAN port, that your sketch can use to indicate traffic.
With the Due, the interface board, and the appropriate cable, you have the hardware for a dual-channel Classical CAN development setup. For OBD-II diagnostics or SAE J1939 work, the cable provides the physical connection and your software handles the protocol. The same setup can serve as a bench monitor, a test node, or a starting point for a gateway between two CAN networks.
CAN Shield Resources:
Arduino Due: Dual CAN Port Test Sketch With LED CAN Traffic Indicators...
Dual CAN Bus Interface For Arduino Due: Controlling the LEDs...
App Note: ARM Cortex M3 Development Boards Require External CAN Bus Transceiver...
SAE J1939 GPS Application With Arduino Due Delivers PGN 65267 (Vehicle Position)...
SAE J1939 250k/500k Baudrate Converter with Arduino Due - Source Code Included...






