19-01-2012, 03:03 PM
Atmel Microcontrollers CAN Tutorial
[attachment=16286]
Mature Standard
CAN protocol more than 14 years
Numerous CAN products and tools on the market
Hardware implementation of the protocol
Combination of error handling and fault confinement with high
transmission speed
Simple Transmission Medium
Twisted pair of wires is the standard, but also just one wire will
work
Other links works, too: Opto-or radio links
Excellent Error Handling
CRC error detection mechanism
Fault Confinement
Built-in feature to prevent faulty node to block system
Bit Coding : NRZ (Non-Return-To-Zero code) does not ensure
enough edges for synchronization
Stuff Bits are inserted after 5 consecutive bits of the same level
Stuff Bits have the inverse level of the previous bit.
No deterministic encoding, frame length depends on
transmitted data
Cyclic Redundancy Check (CRC)
The CRC is calculated over the non-stuffed bit stream
starting with the SOF and ending with the Data field by
the transmitting node
The CRC is calculated again of the destuffedbit stream
by the receiving node
A comparison of the received CRC and the calculated
CRC is made by the receiver
In case of mismatch the erroneous data frame is
discarded . Instead of sending an acknowledge signal an
error frame is sent.
The CAN protocol defines only the ‘physical’ and a low
‘data page link layer’!
The HLP defines:
Start-up behavior
Definition of message identifiers for the different nodes
Flow control
transportation of messages > 8bytes
Definition of contents of Data Frames
Status reporting in the system
Features
Created by Allen-Bradley (Rockwell Automatisation
nowadays), now presented by the users group ODVA
(Open DeviceNetVendor Association)
Power and signal on the same network cable
Bus addressing by: Peer-to-Peer with multi-cast & Multi-
Master & Master-Slave
Supports only standard CAN
Applications
Communications page link for industrial automatisation: devices
like limit switches, photo-electric sensors, valve manifolds,
motor starters, process sensors, bar code readers,variable
frequency drives, panels...
Advantages
Low cost communication page link and vendor independent
Removal and replacement of devices from the network
under power