Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
can [2018/12/28 21:03] 69.120.156.156 |
can [2019/03/31 14:49] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Controller Area Network ====== | + | ====== Controller Area Network ====== |
===== Overview ===== | ===== Overview ===== | ||
Line 24: | Line 24: | ||
===== CAN Frame ===== | ===== CAN Frame ===== | ||
- | {{ : | + | There are 4 types of CAN Frames |
+ | * **Data Frame** - data transfer from one sending node to one or numerous receiving nodes | ||
+ | * **Remote Frame** - any node may request data from one source node. A remote frame is followed by the requested data. | ||
+ | * **Error Frame** - any node may signal an error condition at any time during a data or remote frame transmission | ||
+ | |||
+ | {{ :: | ||
The distance between frames is a minimum of 3 bit times. | The distance between frames is a minimum of 3 bit times. | ||
Line 34: | Line 39: | ||
The dominant level (TTL = 0V) always overrides a recessive level (TTL = 5V). This is important during bus arbitration. | The dominant level (TTL = 0V) always overrides a recessive level (TTL = 5V). This is important during bus arbitration. | ||
- | {{:img_1492.jpg?400|}} | + | {{ :can_open_collector.png? |
+ | |||
+ | A remote frame requests the transmission of a message by another node. This type of message is uncommon and CiA says to avoid its usage. | ||
+ | |||
+ | A lower message ID number represents a high message priority. | ||
+ | |||
+ | ==== Acknowledgement Field ==== | ||
+ | |||
+ | The acknowledgement field serves as a confirmation of a successful CRC check by the receiving nodes in the network. | ||
+ | |||
+ | ==== Error Checking ==== | ||
+ | |||
+ | CAN implements a robust and elegant error checking system that allows for: | ||
+ | * Retransmission of frames that did not pass a 15 bit [[CRC]] check by a receiving node | ||
+ | * Detection of bus fault by a transmitting node by monitoring the bus after every bit cycle and ensuring the bus level is equal to intended transmission bit | ||
+ | * Allows a node to determine whether or not it was the first error reporting node, which allows the determination and removal of a defective node. | ||
+ | |||
+ | ==== Transmission Times ==== | ||
+ | |||
+ | A CAN frame has a minimum of 47 bits (no bit stuffing and no data) and a maximum of 135 bits (max bit stuffing and 8 bytes of data) | ||
+ | |||
+ | Maximum number of messages with average bit stuffing at 1 MBit and 8 bytes is 8,771 per seconds and 17,543 per second with 1 data byte. | ||
+ | |||
+ | ==== Data Transfer Synchronization ==== | ||
+ | |||
+ | CAN uses Non-Return-to-Zero bit encoding. This provides highest transport capacity but requires bit stuffing. In CAN synchronization is done with the SOF bit, which marks the start of a frame, and by bit stuffing, by only allowing 5 consecutive bits of the same polarity. | ||
+ | |||
+ | |||
+ | ==== Wire Length ==== | ||
+ | |||
+ | The wire lengths are as follows: | ||
+ | |||
+ | {{ ::rtaimage.jpg?direct&400 |}} | ||
+ | |||
+ | ==== Implementation ==== | ||
+ | |||
+ | Here is a chip implementation: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ==== Notes ==== | ||
+ | |||
+ | ECAN is the " | ||
+ | |||