Most likely you know a bit about the Controller Area Network, also called CAN or CAN bus, developed for communications between equipment in vehicles. The CAN has spread into embedded systems, too, but unlike chip-to-chip I2C or SPI connections, CAN communications may occur between cards and systems over a bus that can extend from 10s to 100s of meters. (The ISO-11519 and ISO-11898 standards covers CAN protocols and physical-layer specifications.)
You can use three versions of the CAN: A low-speed CAN operates at up to 125 kbps, and CAN 2.0A and CAN 2.0B operate between 125 kbps and 1 Mbps. The first two standards provide for a 9-bit arbitration field, and the CAN 2.0B standard includes a 29-bit arbitration field. The longer field allows for more identifiers within a network. Think of the arbitration field as not only an address but as a priority assignment. A device with the lowest arbitration-field value has the highest priority due to the signaling technique the bus uses.
Many microcontrollers (MCUs) come with built-in CAN ports, each of which provides transmit and receive buffers, a CAN-protocol "engine," and serial inputs and outputs. The engine helps manage the flow of bits onto and off of the bus. Unlike communication links such as I2C and SPI, the CAN needs a balanced differential connection between each node on the bus. (If your MCU has only an SPI port, look at Microchip's MCP2515 SPI-to-CAN controller chip.)
A 120? resistor across each end of the bus provides the proper termination. You also can use two 60? resistors in series at each end, with a capacitor from the connection between the resistors and ground. This "split" termination helps reduce EMI/RFI emissions.
Companies such as Texas Instruments, Microchip Technology, AMI Semiconductor, and NXP offer several types of CAN transceiver ICs. These devices convert standard logic levels to and from the differential-bus signals.
Because the transceivers must work in a variety of electrical environments, they protect inputs and outputs from overvoltages and from the effects of local EMI/RFI. The CANH and CANL pins in the AMI Semiconductor AMIS-30660 transceiver, for example, can withstand the continuous application of ±45V. So, if a power supply, battery, or other power source inadvertently shorts to one of the bus lines, the chip can withstand the excess voltage.
Transceiver ICs also provide capabilities such as a transmitter time-out, transmitter disable, thermal protection, controlled power-up, and low-power standby modes. The transmitter time-out circuit, for example, prevents a transceiver IC from holding the bus in a continuous logic-0 (dominant) state, which would keep other devices from using the bus. If an MCU's CAN output sends the transmitter a continuous logic 0 that exceeds a preset time, the timer turns off the transceiver's differential drivers, which returns the bus to its logic-1 (recessive) state. Then other devices can use the bus. A short to ground or a defective MCU could force the MCU's CAN output pin to a constant ground or logic 0. When the transceiver IC receives a logic 1 from the MCU's CAN output, it re-enables the differential drivers.
Because people will plug CAN-based devices into a powered bus, transceivers must provide for a graceful "hot-swap" startup that will not disturb communications already underway. So, hot-swap transceivers power up in a way that keeps their differential drivers from offering a low-impedance path to ground. Most new CAN transceivers offer the hot-swap and transmitter-time-out capabilities.
In some cases, engineers may want to electrically isolate the CAN bus from equipment to prevent ground loops from causing problems. In such cases, they isolate the CAN controller from the transceiver, rather than trying to isolate the transceiver from the CAN bus.
Although the CAN is over 20 years old, it continues to find many new uses in non-vehicle equipment. If you would like to know more about the CAN, send a short email to email@example.com.
For further reading (note: external links open in new windows)
"Improved CAN Network Security with TI's SN65HVD1050 Transceiver," Texas Instruments. www.ti.com/litv/pdf/slyt249.
Kliger, Ronn and Sean Clark, "iCoupler Isolation in CAN Bus Applications," AN-770, Analog Devices. www.analog.com/UploadedFiles/Application_Notes/396914861238030599415561924AN770_0.pdf.
Richards, Pat, "A CAN Physical Layer Discussion," AN228, Microchip Technology. ww1.microchip.com/downloads/en/AppNotes/00228a.pdf.