Columnists

Ease into the flexible CAN bus

By Bonnie Baker -- EDN, 10/27/2005

When you need to select a network protocol, there are more choices than you may want. CAN (controller- area network) is one choice if you have a wired network. CANs have been around for more than 15 years. Historically, this bus targeted the automotive industry, because the bus provides predictable, error-free communications. Recent falling prices of CAN-system technologies make CANs commodity items. The CAN has expanded beyond automotive applications, migrating into systems such as industrial networks, medical equipment, railway signaling, and building-service controls. These applications use the CAN not only for its lower prices, but also because the communication you can accomplish through this network is robust, with a bit rate as high as 1 Mbps.

A CAN features a multimaster system that broadcasts transmissions to all system nodes. In this type of network, each node filters unwanted messages. A classic client/server network, such as Ethernet, relies on network addressing to deliver data to a single node. With multiple nodes in an Ethernet network, a star configuration implements centralized control (Figure 1). Although you need fewer microcontrollers to perform the varied tasks in an Ethernet system, the microcontrollers are usually more complex, with higher pin counts.

In contrast, every node in a CAN system receives the same data at the same time. By default, CAN is message-based, rather than address-based. The system integrates multiple nodes that use distributed control. With this topology, you can easily add or remove a node with minimal software impact. The CAN does require intelligence on each node, but you can tailor the level of intelligence to the task at that node. Consequently, these individual controllers are simpler, with lower pin counts. In addition, the reliability of the distributed-intelligence system is higher, with fewer wires.

Ethernet also differs from CAN in that Ethernet uses collision detection at the end of each transmission. CAN, on the other hand, uses collision recovery. When a collision occurs between two or more CAN nodes that transmit at the same time, the nodes with the lower priority messages detect the collision. The lower priority nodes then switch to a receiver and wait for the next bus idle to again attempt transmission. The winning transmitter continues sending its message as if nothing happened. Therefore, response time to collision correction is faster, because the correction occurs at the beginning of the message transmission. This structure prevents the destruction of higher priority messages.

The CAN specification, which Robert Bosch GmbH wrote, is standardized by ISO (International Organization for Standardization, ISO 11898) and SAE (Society of Automotive Engineers). This serial-communications protocol supports distributed real-time control with a sophisticated level of security. CAN's time-proven performance guarantees predictable, error-free communications for safety-conscious application. Through arbitration, CAN prioritizes messages with predictable latency times. The configuration is flexible at the hardware and data-link layers, at which designers modify transmission details. They do this modification while keeping system-wide data consistency.

  References

  1. Dammeyer, John, "Wireless CAN yard-lamp control," Circuit Cellar, August 2003, pg 12.
  2. Richards, Pat, "A physical-layer discussion," AN228, Microchip Technology.
  3. Warner, Will, "Making the CAN bus a 'can-do' bus," EDN, Aug 21, 2003, pg 36.
  4. Robert Bosch GmbH, CAN Specification 2.0, September 1991, www.algonet.se/~staffann/developer/can2spec.pdf.

Author Information

Bonnie Baker is the author of A Baker's Dozen: Real Analog Solutions for Digital Designers. You can reach her at bonnie.baker@microchip.com.

 




ADVERTISEMENT

ADVERTISEMENT

Related Content

 

By This Author


ADVERTISEMENT

Knowledge Center



Technology Quick Links

EDN Marketplace


©1997-2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites

ADVERTISEMENT
You will be redirected to your destination in few seconds.