You are on page 1of 16

CAN –

CONTROLLER
COMMUNICATIO
AREA NETWORK N PROTOCOLS
CAN – CONTROLLER AREA NETWORK

Developed by Robert Bosch in around 1986.

Serial half-duplex and asynchronous type of communication


protocol.
Standard designed to allow the microcontroller and other
devices to communicate with each other without any host
computer.

Broadcast type of bus.

Message-based protocol.
 The CAN is a two-
wired
communication
protocol as the CAN
network is connected
through the two-
wired bus.
 The wires are twisted
pair having 120Ω
characteristics
impedance connected
at each end.
WHY CAN?

 It is an ideal protocol when distributed control of a complex


system is required.

 It reduces heavy wiring and thus costs and weight.

 The cost of the chips is low, and implementing CAN is relatively


easy because of the clean design of the protocol.

 Highly flexible as a node can be inserted or removed without


affecting the network.
Typical electrical wiring in a passenger The heavy cable is replaced with lightweight 2-wire CAN
car in today’s cars and trucks
Today, applications for CAN are dominated by the automotive and
motor vehicle world, but they are not limited to that. CAN is found
across virtually every industry. You can find the CAN protocol being
used in:

 Every kind of vehicle: motorcycles, automobiles, trucks...


 Heavy-duty fleet telematics
CAN BUS
APPLICATIO  Airplanes

NS  Elevators
 Manufacturing plants of all kinds
 Ships
 Medical equipment
 Predictive maintenance systems
 Washing machines, dryers, and other household appliances.
Devices on a CAN bus are called “nodes.”

Each node consists of a CPU, CAN controller, and a transceiver, which


adapts the signal levels of both data sent and received by the node.

HOW DOES All nodes can send and receive data, but not at the same time.
CAN
WORK? Nodes cannot send data directly to each other.

Instead, they send their data onto the network, where it is available to any
node to which it has been addressed.

All the nodes are synchronized so that they all sample data on the network
simultaneously. However, data is not transmitted with clock (time) data,
so CAN is not truly a synchronous bus, such as EtherCAT, for example.
With CAN, all data are sent in frames, and there are four types:
 Data frames transfer data to one or many receiver nodes
 Remote frames ask for data from other nodes
 Error frames report errors
 Overload frames report overload conditions

There are two variants of the message length: standard and extended.
.
The difference is the additional 18-bit identifier in the arbitration field
Data frames: “Hello everyone, here’s some data
labeled X, hope you like it!”

Remote frames: “Hello everyone, can


somebody please produce the data labeled X?”
CAN
FRAMES Error frames: (everyone, aloud) “OH DEAR,
LET’S TRY AGAIN”

Overload frames: “I’m a very busy little 82526,


could you please wait for a moment?”
FIELD BITS DESCRIPTION

SOF 1 The single dominant Start Of Frame. This bit marks the start of a message. It synchronizes the nodes after an idle period.

Identifier 11 The CAN 11-bit identifier data field sets the message priority. Lower values mean higher priorities.

Remote Transmission Request. This bit is dominant when information is requested by another node. All nodes will receive the
RTR 1
request, but the identifier determines the desired node.

IDE 1 The Identifier Extension bit indicates that a standard CAN identifier (not an extended one) is being transmitted.
R0 1 Reserved for future use.
DLC 4 The Data Length Code contains the number of bytes in the transmission.
Data 0 - 64 The actual data being transmitted.

The 16-bit (15 bits plus delimiter) cyclic redundancy check (CRC) contains the checksum (number of bits transmitted) of the
CRC 16
preceding application data for transmitting error detection.

When a node successfully receives a message, is ACKnowledges it by overwriting this overwrites this bit with a dominant bit.
ACK 2 On the other hand, if a node finds an error in a message, it allows this bit to remain recessive and ignores the message. ACK
slot and ACK delimiter are each one bit long.

EOF 7 End Of Frame is a 7-bit field that denotes the end of every CAN frame (message).

Inter Frame Space (IFS) is the time that the controller needs to move a frame (message) into position in the buffer area. Note
IFS 3+ that IFS contains a minimum of three consecutive recessive (1) bits. After three recessive bits have passed, when a dominant
bit is detected, it becomes the SOF bit of the next frame.
Data transmission in CAN network
The host processor decides what the
received messages mean and what
CPU - messages it wants to transmit.
microprocessor,
or host
processor Sensors, actuators and control devices
can be connected to the host processor.

Receiving: the CAN controller stores the


received serial bit until an entire message is
available.
Node CAN
controller
Sending: the host processor sends the transmit
message(s) to a CAN controller, which transmits
the bits serially onto the bus when the bus is
free.

Receiving: it converts the data stream from


CAN bus levels to levels that the CAN
controller uses.
Transceiver
Transmitting: it converts the data stream from
the CAN controller to CAN bus levels.
CAN
Communication
Principle
•The CAN protocol defines five different
ways of detecting errors. Two of these works
at the bit level, and the other three at the
ERROR message level.
DETECTION •Bit Monitoring.
MECHANISM •Bit Stuffing.
S •Frame Check.
•Acknowledgement Check.
•Cyclic Redundancy Check.
QUERIES &
SUGGESTIONS

You might also like