Controller Area Network (CAN)

July 7, 2009 at 12:00 am Leave a comment

Controller Area Network (CAN)

[What is the endianness of CAN ? ]
“CAN we talk? : Distributed systems require protocols for communication between devices. CAN and SPI are two of the most common.” article by Niall Murphy 2003-05-14

… a text-based protocol. This is how most of the Internet works; HTTP and SMTP are both built on text protocols. This approach allows the protocol to remain architecture agnostic. Text is less efficient than a protocol where each byte is given a meaning, but the upside is a protocol thats easy for a human to read and debug.

The biggest difference between CAN and SPI is that the CAN protocol defines packets. In SPI (and serial interfaces in general), only the transmission of a byte is fully defined. Given a mechanism for byte transfer, software can provide a packet layer, but no standard size or type exists for a serial packet. Since packet transfer is standardized for CAN, its usually implemented in hardware. Implementing packets, including checksums and backoff-and-retry mechanisms, in hardware hides a whole family of low-level design issues from the software engineer.

There are a number of higher layer protocols that have been layered on top of the basic CAN specifications . These include SAE J1939, DeviceNet, and CANOpen. …
points to the Linux CAN-bus driver project
Open DeviceNet Vendor Association, Inc. (DeviceNet is a more detailed specification for CAN)
information from “Hard real-time connectivity: Its in the CAN” article by Bruce Boyes in _Computer Design_ 1998-01, p. 88
“CAN is a robust network designed for hard real-time distributed control systems in harsh environments. Its an open standard (and the subject of ISO 11898)…” … “CAN is a peer-to-peer network … packets with a maximum payload of 8 bytes … … adept at passing around simple commands or small amounts of data quickly… … not well-suited to moving around large files …” “can go up to 1 Mbit/s, CAN systems most commonly operate at 250 Kbit/s or 125 Kbit/s, because lower baud rates are more resistant to brief bursts of noise.” ” fiber-optic cable also is common. …” “The ISO 11898 document specifies a 120 Ohm nominal impedance using terminated twisted-pair media. … line length versus baud rate … … 40 m, 1 000 Kbits/s … 1 000 m, 50 Kbits/s …”
“low cost and relative simplicity” “Kevin Parkinson … typically uses optically isolated chip-to-bus electronics using RS485 type drivers.”
“Emphasis on content” “When data is transmitted by a CAN node, no other nodes are /addressed/; rather, the /content/ of the message (pressure, voltage, temperature, etc.) is designated by the identifier, which is unique throughout the network. The identifier also prioritizes the message. With care, this prioritizing guarantees the most important messages are transmitted with the least delay. … Arbitration is nondestructive. In the case of an overloaded network, the highest-priority messages still get through. … Latency … is also very low. … CAN hardware also provides message acknowledgment and automatic re-transmission in the event of an error.”
“CAN data bits are either “dominant” or “recessive”. … A frame always begins with a dominant-level SOF (start-of-frame) bit. A dominant bit always “wins” over a recessive bit being transmitted at the same time. … If 2 nodes start transmitting concurrently, each node performs bit-wise arbitration to resolve the conflict. … A transmitter stops sending if it sends a recessive bit, but monitors a dominant bit. That guarantees a lower-priority CAN device immediately stops transmitting, while the higher-priority device continues unimpeded. The lower-priority device waits for the next bus idle time and tries again. … 2 nodes [should] never send the same [arbitration field] followed by different data …”
“… ACK … indicates sucessful message … reception by at least one receiver … the hardware ACK is an important component of CANs real-time capability.”

“For example, a vehicle wheel-speed sensor should transmit its data properly and let other nodes, if any, handle the data as they wish.”
“The RTR bit permits any node to request data from another node.”
“receiving nodes which detect a problem … transmit… in the end of frame space. The sender monitors the error flag, which triggers an automatic retransmission by the sending node.”
“Honeywells Smart Distributed System (SDS) … DeviceNet (initiated by Allen-Bradley) … … DeviceNet and SDS also include specifications for rugged cable and connectors.”
“The CAN in Automation (CiA) group (Erlangen, Germany) promotes the CAL”
“CAN specification 2.0B describes the extended message frame with a 29-bit ID.”
Siemens (SAE81C91), Motorola (MC68376), Intel (i82527), Philips (SJA1000), National Semiconductor (COP87L84BC). offer CAN controllers and/or microprocessors with CAN 2.0B capability.
CAN extended message format (bit field width is not to scale)
| Arbitration field | Control Field | Data field | CRC field | Response field
Arbitration field:
| SOF | 11 bit identifier | SSR | IDE | 18 bit identifier | RTR |
Control field:
| R1 | R0 | DLC |
Data field:
| Data: 0 to 8 bytes |
CRC field:
| 15 bit CRC |

Response field:
| ACK field | EOF 7 bits | INT 3 bits | bus idle (or another node starts transmitting)
SOF: Start of Frame, a single dominant bit
SRR: Substitute Remote Request
IDE: identifier extension bit is recessive for extended format
ID Fields: a total of 29 ID bits for extended frmat
RTR: remote transmit request, dominant for data frames, recessive for remote frames.
R1, R0 are reserved, dominant bits.
DLC: a 4 bit data length code indicates the number of bytes in the data field.
DATA: 0 to 8 bytes. A remote frame contains zero bytes.
CRC: a 15 bit CRC and a recessive CRC delimiter bit. (Covers what ? just the data ?
The entire packet before the CRC ? )
ACK: acknoledgement is a single dominant bit followed by a recessive delimiter bit
EOF: End of Frame: seven recessive bits end a frame
INT: intermission is 3 bits between remote and data frames

For an extended frame, this is a total of 64 to 128 bits (depending on data size). With 8 bytes of data, overhead (non-data bits) is therefore 1/2.

  • –>

  • The Smart Distributed System is a CAN-based network … a single 4-wire cable.
  • Ive hear that the Society of Automotive Engineers (SAE) has standardized a kind of CAN bus (?) for automotive systems.
  • ChipDir has several good CAN links. [FIXME: more local ChipDir mirror]
  • Dr. Ken Tindell mirror: “Currently heavily involved in the definition and construction of tools and software to support hard real-time communications between embedded systems connected via CAN bus.”
  • CAN in Automation (CiA)
  • CAN in Automation (CiA)
  • Advertisements

    Like this:

    Entry filed under: Communications.

    A-301 High Voltage Amplifier/ Piezo Driver and Modulator2

    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s

    Trackback this post  |  Subscribe to the comments via RSS Feed


    من محتويات الموقع

    كثرت إصدارات الماسنجر وتبعثرت بتشاتها وبرامجها .. فالبعض يبحث عن جديد الماسنجر .. والبحض يبحث عن ماسنجر 7.5 .. ماسنجر هوتميل والبعض يبحث عن ماسنجر 7 نحن نوجهك إلى تحميل برنامج ماسنجر بلس مسنجر 9 برنامج الماسنجر الجديد هوتميل تسعة ... برنامج ماسنجر هوتميل بلس لاصدار ماسنجر لايف 9 ماسنجر,ماسنجر بلص,تحميل الماسنجر,ماسنجر 8,صور ماسنجر,اصدارات الماسنجر و ما قبله من اصدارات.. تحميل مسنجر مسنجر بلس مسنجر 9 مسنجر ياهو مسنجر لايف تنزيل مسنجر messenger اقلاع سوفت messenger + msn + hotmail download msn messenger hotmail msn web messenger hotmail msn messenger without hotmail msn messenger und hotmail telecharger msn messenger hotmail msn hotmail messenger mac Internet turbo 2009 ,جديد البرامج و الإنترنات , ,Download parameg FOR MOBILE TORRENT ,كشف الملفات التالفه في الويندوز ,فضل برنامج للصور المتحركة عربي ,فتح محطات ART الفضائية ,Firefox ,برامج تشغيل الملفات ,تحميل أقوى مشغل ملفات flv ,تحميل برنامج مجانا internet download manager ,Fotos+do+sound+forge ,NLite ,كول اديت ,Free arc لفك الضغط ,تنزيل ساعة على سطح مكتب الكمبيوتر ,برنامج تحويل الفيديو يوتيوب الى 3gp ,تنزيل برنامج لفتح الاناشيد ,Fotos+do+sound+forge ,برامج كمبيوتر للفيروسات ,Six free mp3 ,تحويل pdf الي word ,نوع الفيديو للبرو جولد ,تحميل برنامج Passware Kit Enterprise ليش نسخة Demo ,Ares+tube ,Image banner maker ,Kmp 2007 ,تنزيل برنامج لتشغيل اناشيد mp3 ,برنامج مشاهدة القنوات الفضائية ,موقع تحميل الانتي فايروس 2010 ,تنزيل المتصفحات الجديدة ,Download free Revo Uninstaller ,تشغيل كاميرا nokia pc suite ,Zib password remova l برنامج ,تحميل برامج تشغيل الفيديو ,تحميل برنامج عن طريق الجوال لمشاهده التلفزيون ,افلام يوتيوب للهاتف المحمول مجانا ,تسريع الانترنت ,Ares+tube ,برامج حماية من الفيروسات مجانية ,Antivir free download ,برامج نت ,كيفية التعامل مع الملفات المضغوطة ,كول اديت ,Kis key ,برنامج الالة الحاسبة ,برنامج تغيير الأصوات للكمبيوتر من برامج نت ,برامج مشغلات الفيدبو كمبيوتر ,برنامج youtube لنوكيا 73

    Last Comments

    actispast on Realtek AC97 Audio Driver…
    Singles baden wuertt… on تحميل ماسنجر للجوال برنامج وين…
    Truppypef on Realtek AC97 Audio Driver…
    Truppypef on Realtek AC97 Audio Driver…
    Truppypef on Realtek AC97 Audio Driver…

    %d bloggers like this: