Вы находитесь на странице: 1из 5

CAN BUS: Controller Area Network(CAN) is a kind of a vehicle bus.

In automobiles,this bus permits microcontrollers and devices to communicate wtih each other without complex wiring system. An automobile system without CAN is shown figure 1,

Figure 1 A system with CAN in figure 2,

figure 2

General CAN feautres are[1]: *Serial Communication way(sync) *Maximum Signal frequency used is 1 Mbit/sec *Typical maximum data rate achievable is 40KBytes/sec *Length is typically 40M at 1Mbit/sec up to 10KM at 5Kbits/sec *efficiently supports distrubuted real-time control *very high level of security *network realibity and transmission efficiency(error mechanisms and message priority) *multi-master capabilities for sensors and actuators

How CAN Works? CAN is a standard multi-master serial bus.Working of CAN depands on messaging system.A message consist of an ID which represents the priority of the message,and up to 8 bits.Nodes send these messages to the bus.So; Each node requires a 1)Host processor a)deciding what is received message means and which is wanted to send b)sensor,actuators and other control devices can be connected to the host 2)CAN Controller a)receiving b)sending 3)Transceiver a)receiving b)transmitting to communicate by all nodes. it is shown in figure 3,

Figure 3 *Resistors are 120 ohms

Data Transmission: For instance we have two node having decimally 11 bit message 15 and 14 , Binary Decimal 00000010000 16 00000001110 14 Let they want to transmit the signal to the bus at the same time.Priority is determined numerically smaller value.In the system,zero is dominant and one is resesive.This is the AND gate crieteria.While the first six bit ,there is no winner but the seventh bit in 14 is zero dominant to one in 16 so that it is the winner(14).It sends the message on the bus serially. Frames: CAN Buses have two different format frames one of them is CAN 2.0A is mentioned above,the other one CAN 2.0B is called also extended frame because of having 29 ID bits.We can define more messages on this module when we compare to base frame (CAN 2.0A). CAN has four frame types: Data frame: a frame containing node data for transmission Remote frame: a frame requesting the transmission of a specific identifier Error frame: a frame transmitted by any node detecting an error Overload frame: a frame to inject a delay between data and/or remote frame [2]

Data frame: Base Format CAN2.0A has 11 bits ID Extend Format CAN2.0B has 29 bits ID Available feauters below tables at different formats Base Frame formats:

Extend Frame Format:

Combining A and B identifier we get the 29 bits. Data fields remain same 8 byte in both format. Remote Frame: Sometimes node wants to data from the source with the bus,it is worked by remote frame and it is also a request. The differences are between Data frame and Request(remote) frame: a)RTR bit is dominant in Data frame b)in remote frame there is no Data field Error Frame: Having two different fields: a)Error Flags (6-12 bits dominant/resesive) b)Error Delimitter(8 resesive bits) Active Error Flag six dominant bits-transmitted by a node detecting on the bus means ''error active'' Passive Error Flag six recessive bits- transmitted by a node detecting an active error on the bus means ''error passive'' Overload Frame We have two type of overload frame 1)The internal conditions of a receiver, which requires a delay of the next data frame or remote frame. 2)Detection of a dominant bit during intermission.

Error checking: CAN is a very reliable system with multiple error checks Stuffing error: a transmitting node inserts a high after five consecutive low bits (and a low after five consecutive high). A receiving node that detects violation will flag a bit stuffing error. Bit error:A transmitting node always reads back the message as it is sending. If it detects a different bit value on the bus than the one it sent, and the bit is not part of the arbitration field or in the acknowledgement field, an error is detected. Checksum error : each receiving node checks CAN messages for checksum errors. Frame error :There are certain predefined bit values that must be transmitted at certain points within any CAN Message Frame. If a receiver detects an invalid bit in one of these positions a Form Error (sometimes also known as a Format Error) will be flagged. Acknowledgement Error:If a transmitter determines that a message has not been ACKnowledged then an ACK Error is flagged.[3]

Safety In order to achieve the utmost safety of data transfer, powerful measures for error detection, signaling and self-checking are implemented in every CAN node. When transmitting data, many measuring algorithms including Cyclic Redundancy Check, Message Frame Check and Bit Stuffing have been taken. One of Negative side of CAN Bus: Patent is belong to Robert Bosch means every manufacture pays fee. References [1][3]http://www.computer-solutions.co.uk/info/Embedded_tutorials/can_tutorial.htm [2]http://en.wikipedia.org/wiki/Controller_Area_Network (lost of info also)

Вам также может понравиться