Standards/ISO11898-CAN
(Created page with "{{TOC right}} CAN is a multi-master serial bus. All nodes on the network have to be synchronized to sample or transmit the same bit of a message at the same time. The logical...") |
|||
Line 1: | Line 1: | ||
{{TOC right}} | {{TOC right}} | ||
− | CAN is a multi-master serial bus. All nodes on the network have to be synchronized to sample or transmit the same bit of a message at the same time. The logical levels are achieved by a pull-up structure. Therefore the idle state of the bus is a logical '1'. Any node transmitting a logical '0' will pull the bus to another level. | + | CAN is a multi-master serial bus. All nodes on the network have to be synchronized to sample or transmit the same bit of a message at the same time. The logical levels are achieved by a pull-up structure. Therefore the idle state of the bus is a logical '1'. Any node transmitting a logical '0' will pull the bus to another level (Ground). In CAN lingo these two levels are called ''recessive'' ('1') and ''dominant'' ('0'). |
+ | |||
+ | Arbitration is achieved by using this bus condition. All nodes start by transmitting their UID and sample the bus at the same time. As soon as they discover that there is a bit on the bus on another level than they are transmitting, they stop the transmission. Finally only the node with the lowest ID will be left an can transmitt it's message undisturbed. | ||
+ | |||
+ | CAN usually uses four wires: CAN-Low, CAN-High, Ground and Power. | ||
+ | |||
+ | = Frames = | ||
+ | |||
+ | There exists a ''Base'' and an ''Extended'' Frame format. | ||
+ | |||
+ | {|class="wikitable" | ||
+ | |+ CAN Base Frame Format | ||
+ | !Field !!Description !!Length<br/>[bits] | ||
+ | |- | ||
+ | |SOF ||Start Of Frame ||1 | ||
+ | |- | ||
+ | |ID ||Bus unique IDentifier used for arbitration ||11 | ||
+ | |- | ||
+ | |RTR ||Remote Transmission Request ||1 | ||
+ | |- | ||
+ | |IDE ||IDentifier Extension ||1 | ||
+ | |- | ||
+ | |R0 ||Reserved ||1 | ||
+ | |- | ||
+ | |DLC ||Data Length Code (0-8) ||4 | ||
+ | |- | ||
+ | |DATA ||0-8 bytes according to DLC ||0-64 | ||
+ | |- | ||
+ | |CRC ||Cyclic Redundancy Check ||15 | ||
+ | |- | ||
+ | |CRCdel ||CRC delimiter (always recessive) ||1 | ||
+ | |- | ||
+ | |ACKslot||TX sends recessive, RX acknowledges with dominant ||1 | ||
+ | |- | ||
+ | |ACKdel ||always recessive ||1 | ||
+ | |- | ||
+ | |EOF ||End Of Frame (always recessive) ||7 | ||
+ | |} | ||
+ | |||
+ | With this format, different frames can be sent. | ||
+ | |||
+ | ; Data Frame | ||
+ | : The RTR bit is dominant. | ||
+ | |||
+ | ; Remote Frame | ||
+ | :The RTR bit is recessive, DLC = 0 and therefore no DATA field. The requested data frame with the same ID follows. | ||
+ | |||
+ | ; Error Frame | ||
+ | :Error on the bus. | ||
+ | |||
+ | ; Overload Frame | ||
+ | :Request a delay of the next data or remote frame. | ||
+ | |||
+ | The use of any other frame than ''Data Frames'' is not recommended. | ||
− | |||
− | |||
== References == | == References == | ||
# [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=33422 ISO 11898-1:2003 standards] | # [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=33422 ISO 11898-1:2003 standards] | ||
+ | # [http://www.esd-electronics-usa.com/CAN-Remote-Frames.html] | ||
[[Category:Standards]] | [[Category:Standards]] |
Revision as of 19:36, 20 November 2014
|
CAN is a multi-master serial bus. All nodes on the network have to be synchronized to sample or transmit the same bit of a message at the same time. The logical levels are achieved by a pull-up structure. Therefore the idle state of the bus is a logical '1'. Any node transmitting a logical '0' will pull the bus to another level (Ground). In CAN lingo these two levels are called recessive ('1') and dominant ('0').
Arbitration is achieved by using this bus condition. All nodes start by transmitting their UID and sample the bus at the same time. As soon as they discover that there is a bit on the bus on another level than they are transmitting, they stop the transmission. Finally only the node with the lowest ID will be left an can transmitt it's message undisturbed.
CAN usually uses four wires: CAN-Low, CAN-High, Ground and Power.
Frames
There exists a Base and an Extended Frame format.
Field | Description | Length [bits] |
---|---|---|
SOF | Start Of Frame | 1 |
ID | Bus unique IDentifier used for arbitration | 11 |
RTR | Remote Transmission Request | 1 |
IDE | IDentifier Extension | 1 |
R0 | Reserved | 1 |
DLC | Data Length Code (0-8) | 4 |
DATA | 0-8 bytes according to DLC | 0-64 |
CRC | Cyclic Redundancy Check | 15 |
CRCdel | CRC delimiter (always recessive) | 1 |
ACKslot | TX sends recessive, RX acknowledges with dominant | 1 |
ACKdel | always recessive | 1 |
EOF | End Of Frame (always recessive) | 7 |
With this format, different frames can be sent.
- Data Frame
- The RTR bit is dominant.
- Remote Frame
- The RTR bit is recessive, DLC = 0 and therefore no DATA field. The requested data frame with the same ID follows.
- Error Frame
- Error on the bus.
- Overload Frame
- Request a delay of the next data or remote frame.
The use of any other frame than Data Frames is not recommended.