SlideShare una empresa de Scribd logo
1 de 94
CAN Bus
CAN : Controller Area Network
Bus :A channel of communication
between two or more electronic
devices
where
messages in the form of electrical
waveforms can travel in both
directions
What is a CAN Bus?
A channel of communication between two or
more microcontrollers
Where
messages in the form of electrical
waveforms can travel in both direction
Which
obey a highly sophisticated set of rules called
the
CAN Bus Protocol
CAN Bus Application
•Automotive
•Farming
•Aeroplanes
•Medical equipment and devices
•Passenger and Cargo Trains
•Lifts and escalators
•Factory automation
•Industrial machine control
•Maritime electronics
•Non-industrial control and equipment
Why we need CAN Bus in a
vehicle electrical network?
Without a CAN Bus
(point to point communication)
Wiring harnesses currently in use
(complicated, messy & confusing)
With a CAN Bus
History of CAN
•CAN was first developed by Robert Bosch GmbH, Germany in
1986 when they were requested to develop a communication
system between three ECUs (electronic control units) in
vehicles designed by Mercedes.
•They found that point to point communications was no longer
suitable in this situation. The need for a multi-master
communication system became imperative.
•The first CAN silicon was then fabricated in 1987 by Intel
CAN is message based Not address based.
What this means is Messages are NOT transmitted from
one node to another node based on the address of a
CAN Node,
instead a CAN node will broadcast it’s message to all
nodes on the bus, and it is up to the receiving node to
determine it should act on that message.
Single or multiple nodes may act on the same data.
Advantages of a CAN Bus
•Organized and sophisticated compared to current
point to point communication
•Reduction in weight and cost of wirinng
looms/harnesses
•Can handle multiple controllers simultaneously
• Any CAN node on the BUS can detect errors in the
message, and force the message to be destroyed and
retransmitted… this feature helps to ensure that the
message a node does receive contains valid data
•Can be used in various applications
A CAN Bus system works by
sending and receiving messages
from node X to node Y
A sensor or actuator connected to
a microcontroller and any other
device (for ex: ADC) that helps to
turn this assembly into a fully
functional stand-alone unit is called
a NODE
What is a NODE?
There are 2 types of Nodes
•Transmitter
•A node originating a message is called a
transmitter of that message
•Receiver
•A node receiving a message that it is not
transmitting itself is called a receiver of a message
Nodes send and receive messages by obeying a
highly sophisticated protocol (set of rules) called
the CAN Bus protocol
How many CAN Bus protocols are there?
There are two CAN Bus protocols
•CAN BUS 2.0 A
CAN 2.0 A is used with smaller, less complicated
systems (Standard)
•CAN BUS 2.0 B
CAN 2.0 B is used with larger, more complicated
systems (Extended)
Physical Layer of the CAN Bus
•It consists of a pair of twisted wires
that are shielded to reduce electromagnetic interference
caused due to noise
•One wire carries the CAN High signal
•The other wire carries the CAN Low signal
•The difference between these signals results in a
dominant (0) or recessive bit (1)
Shielded Twisted Pair Wires
Differential voltages CAN_H & CAN_L
Physical Layer
•If the difference between the CAN High voltage and CAN Low
voltage is less than 0.5 volts, the resulting bit is recessive (1).
•If the difference between the CAN High and CAN Low voltage is
greater than 0.9 volts and less than 3.5 volts, the resulting bit is
dominant (0).
CAN Bus Systems are present in harsh, noisy
environments where mechanical and electrical
disturbances induce unwanted voltages into the
wires thereby corrupting the signal and making it
unworthy
To prevent this from happening CAN uses the
differential voltage system to figure out whether
the BIT is Dominant (0) or Recessive (1)
The heart & soul of the CAN Bus
protocol deals with a
FRAME
into which the MESSAGE to be Transmitted or
Received on the CAN Bus is encoded
There are 2 types of Frames
•A Frame that contains a request for data
is called the REMOTE TRANSMISSION
REQUEST FRAME
•A Frame that contains the requested data
is called the DATA FRAME
The DATA FRAME is composed of 7 different bit fields :
DATA FRAME
The RTR Frame
Remote Transmission Request
The Remote Transmission Request Frame is composed of 6
different bit fields :
•A Frame consists of a large number of bits in the
form of (0’s and 1’s)
The bits present in a frame are of two types:
Dominant bit
&
Recessive bit
•Dominant bit represents 0 & Recessive bit
represents 1
•The Dominant bit has a higher priority than the
Recessive bit
We shall now discuss each of the 7 parts that make up a FRAME
SOF – Start of Frame
•The SOF consists of a single bit
•This is the MSB i.e. Most Significant bit present in
the FRAME
•This bit is dominant (0) always
Arbitration Field
•The arbitration field is the
most important field for the programmer or system
designer
•It is also called as the Identifier field as the
INDENTITY of the entire frame travelling on the bus is
figured out by decoding this field
What is Arbitration?
•The settling of a dispute between two or more individuals by a
third person chosen by them
•In CAN, this translates into the settling of a collision between two
or more frames sent onto the bus simultaneously (by two or more
nodes) with the help of the CAN protocol (third person)
What is an IDENTITY?
•The unique, individual characteristics by which a person or thing is
recognized or known such as
 Genes
 PAN card number
 Telephone number
Arbitration & Identity
The bits present in the ARBITRATION field can be
arranged intelligently by
the programmer so that each FRAME is easily
distinguished by the unique sequence of bits
present in this field
This unique sequence of bits constitute an
IDENTITY
Arbitration field
-Contd
•CAN Bus 2.0 A (Standard), has an arbitration
field that is 11 bits long which can
have 2048 different combinations
•This means - that with a 11 bit long identifier there can
be 2048 unique frames
•These 2048 unique frames can then be sent onto the bus
and each of these frames can then be easily identified by
all the nodes present on the bus
How do we get 2048 unique combinations
from 11 bits?
•Since we follow the Binary format consisting of 0 and 1,
11 bits can give us 2048 combinations as follows
2^11 = 2*2*2*2*2*2*2*2*2*2*2
= 2048
Arbitration field
-Contd
• CAN Bus 2.0 B (Extended), has an arbitration field that is 29 bits
long which can have over 5 million different combinations
• This means with a 29 bit long identifier there can be over 5 million
unique frames
• These 5 million unique frames can then be sent onto the bus and
each of these frames can then be easily identified by all the nodes
present on the bus
Both standard and extended data frames can coexist on the same
CAN BUS. The standard 11 bit data frame will always have priority
over the same extended 29 bit frame
Our discussion from this point onwards
shall consist only of CAN Bus 2.0 A, as
the 2048 unique identifiers it provides
to send and receive 2048 unique
frames is more than sufficient for most
applications present in the world today
•The last bit present in the arbitration field is an RTR bit
•In the DATA frame the RTR bit is always dominant (0)
•In the Remote frame the RTR bit is always recessive (1)
Control Field
•It consists of 6 bits
•The first bit is an IDE bit i.e.
Identifier Extension bit
•This bit is used if CAN Bus 2.0 B with the extended identifier format
consisting of 29 bits is desired to be used
•The second bit r0 has been reserved for future use and its status is
of no use to us
Control field
- contd
•The last 4 bits represent the number of bytes that are
present in the next field i.e. the Data field
•There can be a minimum of 0 bytes to a maximum of 8
bytes that can be sent as data in a frame
Data Field
CRC Field
Cyclic Redundancy Check
•This field is used to calculate the bit errors present within a CAN
frame
•This operation is done automatically by the CAN Transmitter.
•There are a total of 16 bits present in this field
•Of this, the value of the bits in the first 15 fields are automatically
calculated
•The last bit is called the CRC Delimiter and is always recessive (1)
Acknowledgement Field
•The acknowledgement field is 2 bits long
•It consists of the ACK slot and the ACK Delimiter
Acknowledgement Field
•The ACK Delimiter as is the case with all Delimiter’s
found in a frame is always recessive (1)
•The node that transmits a frame, transmits the ACK slot
as recessive (1)
•The node that receives a frame successfully, reports this
to the transmitter by sending a dominant bit in the ACK
slot (0)
End of Frame
•The EOF consists of 7 bits
•All these bits are recessive (1)
Intermission
•The Intermission field consists of 3 bits
•All these bits are recessive (1), ALWAYS
•An intermission field is present in between consecutive
DATA frames and RTR frames
Bus Idle
•When the bus is idle, it is in a recessive
state
•Thus there will be an infinite series of
recessive (1) bits that will be found on the
bus in this state
Broadcasting a frame onto the Bus
&
Receiving a frame from the Bus
To broadcast a Frame onto the Bus we
need a node that sends a Frame onto the
Bus
i.e. a Transmitter
&
we need a node that receives a Frame
from the Bus i.e. a Receiver
Transmitter
(Node)
Receiver
(Node)
The transmitter consists of 3 different
blocks
•Local Intelligence
•Frame
•Filter
The receiver consists of 3 different blocks
•Local Intelligence
•Frame
•Filter
Frame
Local Intelligence
Filter
Local Intelligence
Frame Filter
What job does the Local Intelligence block
and Filter block do ?
Local Intelligence consists of the sensor or
actuator and the microcontroller functioning
intelligently
by
sending FRAMES onto the bus
or
receiving FRAMES from the bus
as and when
instructed to do so
Filter
In a CAN Bus system a FRAME is allowed to go
through the FILTER onto the local intelligence
ONLY IF
the identity of the FRAME present in the Identifier
field (also known as the arbitration field) matches
the uniquely coded bits present in the FILTER
Broadcasting & Receiving a Frame
Frame
Local Intelligence
Filter Frame
Local Intelligence
FilterFrame
Local Intelligence
Filter
Each Filter is now checking the IDENTIFIER bits of the Frame
and is deciding whether to let the frame in or keep it out
NODE A NODE B NODE C
FRAME Arbitration
•Let us assume that three nodes broadcast their
respective frames onto the bus simultaneously
•Of these 3 frames, finally only 1 frame with the highest
priority can travel across the bus
•The remaining 2 frames will have to wait for the highest
priority frame to reach its destination
•After it has reached its destination, the remaining 2
nodes can then begin transmitting their frames on the bus
•These 3 nodes will have 3 unique identifiers
respectively
•These unique identifiers will be present in the
arbitration field of the FRAME
•In a previous slide it was mentioned that the Dominant
bit (0) has a higher priority than the recessive bit (1)
•This bit priority predetermined by the CAN Protocol will
decide which frame wins the arbitration battle being
fought on the bus
Let us make up 3 unique identifiers for
each node
•Node A Identifier – 11001110001
•Node B Identifier – 11001011011
•Node C Identifier – 11001011001
(Notice that they are 11 bits long)
Node A loses the arbitration battle to Node B
& Node C at the 5th bit present in the arbitration field
as the 5th bit present in Node A is recessive (1)
whereas the 5th bit present in Node B & Node C is
dominant (0)
As the dominant bit (0) has a higher priority than the
recessive bit (1),
Node A is forced into LISTEN ONLY mode and Node B &
Node C continue the arbitration battle on the bus
which is finally won by Node C
CAN Synchronization
&
Bit Timing
•Several different nodes on a bus have their
own individual internal clocks running at a
frequency that MUST be common across
the bus
•Let us say that our system has 3 nodes
•Each of these 3 nodes has a clock with a
frequency of 16 Mhz
•Even though each node has a clock that operates at
the same 16 Mhz frequency, it is practically impossible
that these 5 clocks run in perfect synchronicity with
each other
•There is bound to be a certain tolerance limit in which
the clock operates, for example from 15.99 Mhz to
16.01 Mhz
•This deviation of +/- 0.2 Mhz is caused due to
practical reasons such as variations in
temperature
material properties of the quartz crystal
manufacturing defects
To take care of these deviations in
operating frequencies and to ensure that
all the nodes on the bus are in perfect
synchronicity with each other
we move on to the next topic
i.e.
Bit Timing
What is a BIT
&
What is BIT TIME???
Bit 0
Bit 1
Bit Time Duration
also known as
BIT TIME
•Bit Time is defined as the time taken
by each bit to represent itself
•Higher frequencies result in smaller
bit time
•Lower frequencies result in longer bit
time
A Bit Time is divided into 4 non-overlapping time
segments
Bit Time Duration
also known as
BIT TIME
Synchronization
segment
Propagation
segment
Phase
Segment 1
Phase
Segment 2
1 2 3 4
•Each time segment is further divided Into a
number of smaller units called Time Quanta
•A Time Quanta is the smallest unit of time
present in a BIT
The total number of Time
Quanta that are present in a BIT
must
be greater than 8 Time Quanta
and
less than or equal to 25 Time
Quanta
•Bit Timing on its own does 95% of the work
required to synchronize the frames sent by the
various nodes present in a bus
•But 95% is not good enough
•Synchronization between frames sent by the
various nodes must reach as close to the 100%
mark as possible for proper transmission and
reception
This is done with the
help of
Bit Stuffing
What is Bit Stuffing ???
The CAN Protocol intelligently inserts
(stuffs) a bit (s) of opposite polarity into a
FRAME,
If a continuous series of bits of the same
polarity exceed 5 in number
Bit Stuffing
•For example, if a frame consists of 8 consecutive
dominant (0) bits, the CAN protocol will force the
transmitter to STUFF a recessive (1) bit after the 5th
consecutive dominant bit automatically
1
0
2 3 4 5 6 7 8
9 10 11
12
13
1
0
2 3 4 5 7 8
9 10 11
12
13
6
1
0
2 3 4 5 6 7 8
9 10 11
12
13
S
Bit sequence to be
transmitted
Stuffed Bit
sequence
De-stuffed
Bit sequence
Transmitter
Receiver
Bit Stuffing
•Similarly, if a frame consists of 12 consecutive recessive
bits, the CAN protocol will force the transmitter to STUFF
a dominant (0) bit after every 5th consecutive recessive
(1) bit automatically
1 2 3 4 9 10
11 12
5 6 7 8
0
13
14
150
1 2 3 4 5
S
9 106 7 8
S
11 12
13
14
15Bit sequence to
be transmitted
Stuffed Bit
sequence
Transmitter
De-stuffed
Bit sequence
Receiver 1 2 3 4 9 105 6 7 8
0
11 12
13
14
15
•The Node transmitting a FRAME will
automatically stuff bits if required
•The Node receiving the FRAME will automatically
de-stuff the bits thereby returning the FRAME into
it’s original form
Because CAN follows NZR
i.e. Non Return to Zero coding
as against Manchester coding
All these things mentioned above
help to achieve synchronicity
between nodes because of which one
can transmit and receive frames
successfully
So now we know how FRAMES are sent and
received on the CAN Bus synchronously
by intelligently manipulating the width of each
bit (BIT TIME) with the help of small packets of
time called TIME QUANTA
and
with the help of BIT STUFFING
Error Handling
• All nodes listen to any message being
transmitted onto the bus
• The transmitting node too listens to its own
message while transmitting it onto the bus
CAN Error Types
•Bit error
•Stuff error
•Form error
•CRC error
•Acknowledgement error
Bit error
•A Node that is transmitting a FRAME listens to it’s own FRAME
on the Bus
•For example if a Node sends a sequence 01100110011 but on
the bus it sees
01100100011, a bit error has occurred
•An error frame is then sent onto the bus and the FRAME with
the Bit error is ignored by all nodes
Stuff error
•If a FRAME consists of the following bits 0110000000011100110
•Then according to the bit stuffing rule there should a recessive
bit (1) inserted after the 5th dominant (0) bit
•So the FRAME should be transformed into
01100000100011100110 from 0110000000011100110
•BIT STUFFING is done automatically by the Transmitter.
•But for some reason if it does not happen, a STUFF ERROR
occurs
•An error frame is then sent onto the bus and the FRAME with
the STUFF ERROR is ignored by all nodes
Form error
•The CRC Delimiter, ACK Delimiter and EOF consist of recessive bits
(1) ALWAYS
•If a dominant bit (0) is detected in any of these, a FORM ERROR has
taken place
•An Error frame is then sent onto the bus and the FRAME with the
FORM ERROR is ignored by all nodes
CRC error
Cyclic Redundancy Check error
•The CRC value is 15 bits long
•This value is automatically calculated by the transmitting and
receiving nodes
•If the CRC value of the FRAME calculated by the transmitting node
is different from the CRC value of the FRAME calculated by the
receiving node a CRC error has occurred
•An error frame is then sent onto the bus and the FRAME with the
CRC ERROR is ignored by all nodes
Acknowledgement error
•A transmitting node keeps the value of the ACK slot recessive (1)
•A receiving node on successful reception of a message changes
the value of the ACK slot to dominant (0)
•If it fails to do this an acknowledgement error has occurred
•An error frame is then sent onto the bus and the FRAME with the
acknowledgement
error is ignored by all nodes
Thank You
How to Decode CAN Messages
from Binary Format ??
Decoding CAN Messages
CAN Message comprises of :
•Message Name
•Message Type
•Identifier(ID)
•Data Length Code
•N no. of different signals can be stored through the data
field.
•These signals are stored within the 8 bytes of Data Field.
Each Signal comprises of :
•Signal Name
•Unit Assigned
•Conversion Formula
•Symbolic Value
Decoding the CAN signal
•Byte 0 and Byte 1 has the Engine Speed/rpm
•Byte 2 has engine temperature in 7 bits and
the last bit is idle
Byte 0
Byte 1
Byte 2
MSB
LSB
Idle
Bit
Calculating Engine Speed/rpm
Byte 0
Byte 1
MSB
LSB
According to the Conversion Formula
1*[ 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 ] = 511 rmp
Calculating Engine Temperature/ °C
Byte 2Idle
Bit
According to the Conversion Formula
2*[ 22 + 25 ] – 50 = 22°C
Thank You

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Can bus
Can busCan bus
Can bus
 
Can Bus communication Protocol
Can Bus communication ProtocolCan Bus communication Protocol
Can Bus communication Protocol
 
Controller area network
Controller area networkController area network
Controller area network
 
LIN protocol description
LIN protocol descriptionLIN protocol description
LIN protocol description
 
Controller Area Network (CAN) Protocol || Automotive Electronics || Hariharan K
Controller Area Network (CAN) Protocol || Automotive Electronics || Hariharan KController Area Network (CAN) Protocol || Automotive Electronics || Hariharan K
Controller Area Network (CAN) Protocol || Automotive Electronics || Hariharan K
 
CAN- controlled area network
CAN- controlled area networkCAN- controlled area network
CAN- controlled area network
 
Ca npp t
Ca npp tCa npp t
Ca npp t
 
CAN Bus
CAN BusCAN Bus
CAN Bus
 
CAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolCAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus Protocol
 
Lin bus
Lin busLin bus
Lin bus
 
Canbus
CanbusCanbus
Canbus
 
Local Interconnect Network
Local Interconnect NetworkLocal Interconnect Network
Local Interconnect Network
 
Controller area network protocol
Controller area network protocolController area network protocol
Controller area network protocol
 
Controller area network -ppt
Controller area network -pptController area network -ppt
Controller area network -ppt
 
Can Transport Protocol : UDS
Can Transport Protocol : UDS Can Transport Protocol : UDS
Can Transport Protocol : UDS
 
CAN (Controller Area Network)
CAN (Controller Area Network)CAN (Controller Area Network)
CAN (Controller Area Network)
 
CAN BUS.ppt
CAN BUS.pptCAN BUS.ppt
CAN BUS.ppt
 
A SEMINAR REPORT ON CAN BUS PROTOCOL
A SEMINAR REPORT ON CAN BUS PROTOCOLA SEMINAR REPORT ON CAN BUS PROTOCOL
A SEMINAR REPORT ON CAN BUS PROTOCOL
 
UDS PPT
UDS PPTUDS PPT
UDS PPT
 
What is AUTOSAR Communiation Stack
What is AUTOSAR Communiation StackWhat is AUTOSAR Communiation Stack
What is AUTOSAR Communiation Stack
 

Similar a Can bus

Similar a Can bus (20)

Role of CAN BUS in automotives
Role of CAN BUS in automotivesRole of CAN BUS in automotives
Role of CAN BUS in automotives
 
UNIT 2b.pptx
UNIT 2b.pptxUNIT 2b.pptx
UNIT 2b.pptx
 
7.MODBus and CANBus.pptx
7.MODBus and CANBus.pptx7.MODBus and CANBus.pptx
7.MODBus and CANBus.pptx
 
Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3
 
Can network development using arm cortex m3
Can network development using arm cortex m3Can network development using arm cortex m3
Can network development using arm cortex m3
 
CAN.ppt
CAN.pptCAN.ppt
CAN.ppt
 
Frame relay
Frame relayFrame relay
Frame relay
 
IJSTEV2I12120
IJSTEV2I12120IJSTEV2I12120
IJSTEV2I12120
 
Group#04-PPT-IA&P.pptx
Group#04-PPT-IA&P.pptxGroup#04-PPT-IA&P.pptx
Group#04-PPT-IA&P.pptx
 
Computer Networks IEEE 802.3 standard-2021.pptx
Computer Networks IEEE 802.3 standard-2021.pptxComputer Networks IEEE 802.3 standard-2021.pptx
Computer Networks IEEE 802.3 standard-2021.pptx
 
ABIS-interface
ABIS-interfaceABIS-interface
ABIS-interface
 
CONNECTED vehicle ECU.pptx
CONNECTED vehicle ECU.pptxCONNECTED vehicle ECU.pptx
CONNECTED vehicle ECU.pptx
 
Shubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcanShubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcan
 
can bus theory solution
can bus theory solutioncan bus theory solution
can bus theory solution
 
Computer Network
Computer NetworkComputer Network
Computer Network
 
wireless lan presentation.ppt
wireless lan presentation.pptwireless lan presentation.ppt
wireless lan presentation.ppt
 
Automotive Networks : A Review
Automotive Networks : A ReviewAutomotive Networks : A Review
Automotive Networks : A Review
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
Computer networks unit ii
Computer networks    unit iiComputer networks    unit ii
Computer networks unit ii
 
11.chapters
11.chapters11.chapters
11.chapters
 

Último

UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 

Último (20)

UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 

Can bus

  • 1. CAN Bus CAN : Controller Area Network Bus :A channel of communication between two or more electronic devices where messages in the form of electrical waveforms can travel in both directions
  • 2. What is a CAN Bus? A channel of communication between two or more microcontrollers Where messages in the form of electrical waveforms can travel in both direction Which obey a highly sophisticated set of rules called the CAN Bus Protocol
  • 3. CAN Bus Application •Automotive •Farming •Aeroplanes •Medical equipment and devices •Passenger and Cargo Trains •Lifts and escalators •Factory automation •Industrial machine control •Maritime electronics •Non-industrial control and equipment
  • 4. Why we need CAN Bus in a vehicle electrical network?
  • 5. Without a CAN Bus (point to point communication)
  • 6. Wiring harnesses currently in use (complicated, messy & confusing)
  • 8. History of CAN •CAN was first developed by Robert Bosch GmbH, Germany in 1986 when they were requested to develop a communication system between three ECUs (electronic control units) in vehicles designed by Mercedes. •They found that point to point communications was no longer suitable in this situation. The need for a multi-master communication system became imperative. •The first CAN silicon was then fabricated in 1987 by Intel
  • 9. CAN is message based Not address based. What this means is Messages are NOT transmitted from one node to another node based on the address of a CAN Node, instead a CAN node will broadcast it’s message to all nodes on the bus, and it is up to the receiving node to determine it should act on that message. Single or multiple nodes may act on the same data.
  • 10. Advantages of a CAN Bus •Organized and sophisticated compared to current point to point communication •Reduction in weight and cost of wirinng looms/harnesses •Can handle multiple controllers simultaneously • Any CAN node on the BUS can detect errors in the message, and force the message to be destroyed and retransmitted… this feature helps to ensure that the message a node does receive contains valid data •Can be used in various applications
  • 11. A CAN Bus system works by sending and receiving messages from node X to node Y
  • 12. A sensor or actuator connected to a microcontroller and any other device (for ex: ADC) that helps to turn this assembly into a fully functional stand-alone unit is called a NODE What is a NODE?
  • 13. There are 2 types of Nodes •Transmitter •A node originating a message is called a transmitter of that message •Receiver •A node receiving a message that it is not transmitting itself is called a receiver of a message Nodes send and receive messages by obeying a highly sophisticated protocol (set of rules) called the CAN Bus protocol
  • 14. How many CAN Bus protocols are there? There are two CAN Bus protocols •CAN BUS 2.0 A CAN 2.0 A is used with smaller, less complicated systems (Standard) •CAN BUS 2.0 B CAN 2.0 B is used with larger, more complicated systems (Extended)
  • 15. Physical Layer of the CAN Bus •It consists of a pair of twisted wires that are shielded to reduce electromagnetic interference caused due to noise •One wire carries the CAN High signal •The other wire carries the CAN Low signal •The difference between these signals results in a dominant (0) or recessive bit (1)
  • 18. Physical Layer •If the difference between the CAN High voltage and CAN Low voltage is less than 0.5 volts, the resulting bit is recessive (1). •If the difference between the CAN High and CAN Low voltage is greater than 0.9 volts and less than 3.5 volts, the resulting bit is dominant (0).
  • 19. CAN Bus Systems are present in harsh, noisy environments where mechanical and electrical disturbances induce unwanted voltages into the wires thereby corrupting the signal and making it unworthy To prevent this from happening CAN uses the differential voltage system to figure out whether the BIT is Dominant (0) or Recessive (1)
  • 20. The heart & soul of the CAN Bus protocol deals with a FRAME into which the MESSAGE to be Transmitted or Received on the CAN Bus is encoded
  • 21. There are 2 types of Frames •A Frame that contains a request for data is called the REMOTE TRANSMISSION REQUEST FRAME •A Frame that contains the requested data is called the DATA FRAME
  • 22. The DATA FRAME is composed of 7 different bit fields : DATA FRAME
  • 23. The RTR Frame Remote Transmission Request The Remote Transmission Request Frame is composed of 6 different bit fields :
  • 24. •A Frame consists of a large number of bits in the form of (0’s and 1’s) The bits present in a frame are of two types: Dominant bit & Recessive bit •Dominant bit represents 0 & Recessive bit represents 1 •The Dominant bit has a higher priority than the Recessive bit
  • 25. We shall now discuss each of the 7 parts that make up a FRAME SOF – Start of Frame •The SOF consists of a single bit •This is the MSB i.e. Most Significant bit present in the FRAME •This bit is dominant (0) always
  • 26. Arbitration Field •The arbitration field is the most important field for the programmer or system designer •It is also called as the Identifier field as the INDENTITY of the entire frame travelling on the bus is figured out by decoding this field
  • 27. What is Arbitration? •The settling of a dispute between two or more individuals by a third person chosen by them •In CAN, this translates into the settling of a collision between two or more frames sent onto the bus simultaneously (by two or more nodes) with the help of the CAN protocol (third person) What is an IDENTITY? •The unique, individual characteristics by which a person or thing is recognized or known such as  Genes  PAN card number  Telephone number
  • 28. Arbitration & Identity The bits present in the ARBITRATION field can be arranged intelligently by the programmer so that each FRAME is easily distinguished by the unique sequence of bits present in this field This unique sequence of bits constitute an IDENTITY
  • 29. Arbitration field -Contd •CAN Bus 2.0 A (Standard), has an arbitration field that is 11 bits long which can have 2048 different combinations •This means - that with a 11 bit long identifier there can be 2048 unique frames •These 2048 unique frames can then be sent onto the bus and each of these frames can then be easily identified by all the nodes present on the bus
  • 30. How do we get 2048 unique combinations from 11 bits? •Since we follow the Binary format consisting of 0 and 1, 11 bits can give us 2048 combinations as follows 2^11 = 2*2*2*2*2*2*2*2*2*2*2 = 2048
  • 31. Arbitration field -Contd • CAN Bus 2.0 B (Extended), has an arbitration field that is 29 bits long which can have over 5 million different combinations • This means with a 29 bit long identifier there can be over 5 million unique frames • These 5 million unique frames can then be sent onto the bus and each of these frames can then be easily identified by all the nodes present on the bus Both standard and extended data frames can coexist on the same CAN BUS. The standard 11 bit data frame will always have priority over the same extended 29 bit frame
  • 32. Our discussion from this point onwards shall consist only of CAN Bus 2.0 A, as the 2048 unique identifiers it provides to send and receive 2048 unique frames is more than sufficient for most applications present in the world today
  • 33. •The last bit present in the arbitration field is an RTR bit •In the DATA frame the RTR bit is always dominant (0) •In the Remote frame the RTR bit is always recessive (1)
  • 34. Control Field •It consists of 6 bits •The first bit is an IDE bit i.e. Identifier Extension bit •This bit is used if CAN Bus 2.0 B with the extended identifier format consisting of 29 bits is desired to be used •The second bit r0 has been reserved for future use and its status is of no use to us
  • 35. Control field - contd •The last 4 bits represent the number of bytes that are present in the next field i.e. the Data field •There can be a minimum of 0 bytes to a maximum of 8 bytes that can be sent as data in a frame
  • 36.
  • 38. CRC Field Cyclic Redundancy Check •This field is used to calculate the bit errors present within a CAN frame •This operation is done automatically by the CAN Transmitter. •There are a total of 16 bits present in this field •Of this, the value of the bits in the first 15 fields are automatically calculated •The last bit is called the CRC Delimiter and is always recessive (1)
  • 39. Acknowledgement Field •The acknowledgement field is 2 bits long •It consists of the ACK slot and the ACK Delimiter
  • 40. Acknowledgement Field •The ACK Delimiter as is the case with all Delimiter’s found in a frame is always recessive (1) •The node that transmits a frame, transmits the ACK slot as recessive (1) •The node that receives a frame successfully, reports this to the transmitter by sending a dominant bit in the ACK slot (0)
  • 41. End of Frame •The EOF consists of 7 bits •All these bits are recessive (1)
  • 42. Intermission •The Intermission field consists of 3 bits •All these bits are recessive (1), ALWAYS •An intermission field is present in between consecutive DATA frames and RTR frames
  • 43. Bus Idle •When the bus is idle, it is in a recessive state •Thus there will be an infinite series of recessive (1) bits that will be found on the bus in this state
  • 44. Broadcasting a frame onto the Bus & Receiving a frame from the Bus
  • 45. To broadcast a Frame onto the Bus we need a node that sends a Frame onto the Bus i.e. a Transmitter & we need a node that receives a Frame from the Bus i.e. a Receiver
  • 46. Transmitter (Node) Receiver (Node) The transmitter consists of 3 different blocks •Local Intelligence •Frame •Filter The receiver consists of 3 different blocks •Local Intelligence •Frame •Filter Frame Local Intelligence Filter Local Intelligence Frame Filter
  • 47. What job does the Local Intelligence block and Filter block do ?
  • 48. Local Intelligence consists of the sensor or actuator and the microcontroller functioning intelligently by sending FRAMES onto the bus or receiving FRAMES from the bus as and when instructed to do so
  • 49. Filter In a CAN Bus system a FRAME is allowed to go through the FILTER onto the local intelligence ONLY IF the identity of the FRAME present in the Identifier field (also known as the arbitration field) matches the uniquely coded bits present in the FILTER
  • 50. Broadcasting & Receiving a Frame Frame Local Intelligence Filter Frame Local Intelligence FilterFrame Local Intelligence Filter Each Filter is now checking the IDENTIFIER bits of the Frame and is deciding whether to let the frame in or keep it out NODE A NODE B NODE C
  • 51. FRAME Arbitration •Let us assume that three nodes broadcast their respective frames onto the bus simultaneously •Of these 3 frames, finally only 1 frame with the highest priority can travel across the bus •The remaining 2 frames will have to wait for the highest priority frame to reach its destination •After it has reached its destination, the remaining 2 nodes can then begin transmitting their frames on the bus
  • 52. •These 3 nodes will have 3 unique identifiers respectively •These unique identifiers will be present in the arbitration field of the FRAME •In a previous slide it was mentioned that the Dominant bit (0) has a higher priority than the recessive bit (1) •This bit priority predetermined by the CAN Protocol will decide which frame wins the arbitration battle being fought on the bus
  • 53. Let us make up 3 unique identifiers for each node •Node A Identifier – 11001110001 •Node B Identifier – 11001011011 •Node C Identifier – 11001011001 (Notice that they are 11 bits long)
  • 54.
  • 55. Node A loses the arbitration battle to Node B & Node C at the 5th bit present in the arbitration field as the 5th bit present in Node A is recessive (1) whereas the 5th bit present in Node B & Node C is dominant (0) As the dominant bit (0) has a higher priority than the recessive bit (1), Node A is forced into LISTEN ONLY mode and Node B & Node C continue the arbitration battle on the bus which is finally won by Node C
  • 57. •Several different nodes on a bus have their own individual internal clocks running at a frequency that MUST be common across the bus •Let us say that our system has 3 nodes •Each of these 3 nodes has a clock with a frequency of 16 Mhz
  • 58. •Even though each node has a clock that operates at the same 16 Mhz frequency, it is practically impossible that these 5 clocks run in perfect synchronicity with each other •There is bound to be a certain tolerance limit in which the clock operates, for example from 15.99 Mhz to 16.01 Mhz •This deviation of +/- 0.2 Mhz is caused due to practical reasons such as variations in temperature material properties of the quartz crystal manufacturing defects
  • 59. To take care of these deviations in operating frequencies and to ensure that all the nodes on the bus are in perfect synchronicity with each other we move on to the next topic i.e. Bit Timing
  • 60. What is a BIT & What is BIT TIME???
  • 61. Bit 0 Bit 1 Bit Time Duration also known as BIT TIME
  • 62. •Bit Time is defined as the time taken by each bit to represent itself •Higher frequencies result in smaller bit time •Lower frequencies result in longer bit time
  • 63. A Bit Time is divided into 4 non-overlapping time segments Bit Time Duration also known as BIT TIME Synchronization segment Propagation segment Phase Segment 1 Phase Segment 2 1 2 3 4
  • 64. •Each time segment is further divided Into a number of smaller units called Time Quanta •A Time Quanta is the smallest unit of time present in a BIT
  • 65.
  • 66. The total number of Time Quanta that are present in a BIT must be greater than 8 Time Quanta and less than or equal to 25 Time Quanta
  • 67. •Bit Timing on its own does 95% of the work required to synchronize the frames sent by the various nodes present in a bus •But 95% is not good enough •Synchronization between frames sent by the various nodes must reach as close to the 100% mark as possible for proper transmission and reception
  • 68. This is done with the help of Bit Stuffing
  • 69. What is Bit Stuffing ??? The CAN Protocol intelligently inserts (stuffs) a bit (s) of opposite polarity into a FRAME, If a continuous series of bits of the same polarity exceed 5 in number
  • 70. Bit Stuffing •For example, if a frame consists of 8 consecutive dominant (0) bits, the CAN protocol will force the transmitter to STUFF a recessive (1) bit after the 5th consecutive dominant bit automatically 1 0 2 3 4 5 6 7 8 9 10 11 12 13 1 0 2 3 4 5 7 8 9 10 11 12 13 6 1 0 2 3 4 5 6 7 8 9 10 11 12 13 S Bit sequence to be transmitted Stuffed Bit sequence De-stuffed Bit sequence Transmitter Receiver
  • 71. Bit Stuffing •Similarly, if a frame consists of 12 consecutive recessive bits, the CAN protocol will force the transmitter to STUFF a dominant (0) bit after every 5th consecutive recessive (1) bit automatically 1 2 3 4 9 10 11 12 5 6 7 8 0 13 14 150 1 2 3 4 5 S 9 106 7 8 S 11 12 13 14 15Bit sequence to be transmitted Stuffed Bit sequence Transmitter De-stuffed Bit sequence Receiver 1 2 3 4 9 105 6 7 8 0 11 12 13 14 15
  • 72. •The Node transmitting a FRAME will automatically stuff bits if required •The Node receiving the FRAME will automatically de-stuff the bits thereby returning the FRAME into it’s original form
  • 73.
  • 74. Because CAN follows NZR i.e. Non Return to Zero coding as against Manchester coding
  • 75. All these things mentioned above help to achieve synchronicity between nodes because of which one can transmit and receive frames successfully
  • 76. So now we know how FRAMES are sent and received on the CAN Bus synchronously by intelligently manipulating the width of each bit (BIT TIME) with the help of small packets of time called TIME QUANTA and with the help of BIT STUFFING
  • 78. • All nodes listen to any message being transmitted onto the bus • The transmitting node too listens to its own message while transmitting it onto the bus
  • 79. CAN Error Types •Bit error •Stuff error •Form error •CRC error •Acknowledgement error
  • 80. Bit error •A Node that is transmitting a FRAME listens to it’s own FRAME on the Bus •For example if a Node sends a sequence 01100110011 but on the bus it sees 01100100011, a bit error has occurred •An error frame is then sent onto the bus and the FRAME with the Bit error is ignored by all nodes
  • 81. Stuff error •If a FRAME consists of the following bits 0110000000011100110 •Then according to the bit stuffing rule there should a recessive bit (1) inserted after the 5th dominant (0) bit •So the FRAME should be transformed into 01100000100011100110 from 0110000000011100110 •BIT STUFFING is done automatically by the Transmitter. •But for some reason if it does not happen, a STUFF ERROR occurs •An error frame is then sent onto the bus and the FRAME with the STUFF ERROR is ignored by all nodes
  • 82. Form error •The CRC Delimiter, ACK Delimiter and EOF consist of recessive bits (1) ALWAYS •If a dominant bit (0) is detected in any of these, a FORM ERROR has taken place •An Error frame is then sent onto the bus and the FRAME with the FORM ERROR is ignored by all nodes
  • 83. CRC error Cyclic Redundancy Check error •The CRC value is 15 bits long •This value is automatically calculated by the transmitting and receiving nodes •If the CRC value of the FRAME calculated by the transmitting node is different from the CRC value of the FRAME calculated by the receiving node a CRC error has occurred •An error frame is then sent onto the bus and the FRAME with the CRC ERROR is ignored by all nodes
  • 84. Acknowledgement error •A transmitting node keeps the value of the ACK slot recessive (1) •A receiving node on successful reception of a message changes the value of the ACK slot to dominant (0) •If it fails to do this an acknowledgement error has occurred •An error frame is then sent onto the bus and the FRAME with the acknowledgement error is ignored by all nodes
  • 86. How to Decode CAN Messages from Binary Format ??
  • 88. CAN Message comprises of : •Message Name •Message Type •Identifier(ID) •Data Length Code
  • 89. •N no. of different signals can be stored through the data field. •These signals are stored within the 8 bytes of Data Field. Each Signal comprises of : •Signal Name •Unit Assigned •Conversion Formula •Symbolic Value
  • 90. Decoding the CAN signal •Byte 0 and Byte 1 has the Engine Speed/rpm •Byte 2 has engine temperature in 7 bits and the last bit is idle
  • 91. Byte 0 Byte 1 Byte 2 MSB LSB Idle Bit
  • 92. Calculating Engine Speed/rpm Byte 0 Byte 1 MSB LSB According to the Conversion Formula 1*[ 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 ] = 511 rmp
  • 93. Calculating Engine Temperature/ °C Byte 2Idle Bit According to the Conversion Formula 2*[ 22 + 25 ] – 50 = 22°C