SlideShare a Scribd company logo
1 of 37
CAN Network Development
Program @IoTShow.in
by
Prof. Nalini C. Iyer
Prof. Venkatesh Mane.
Prof. Vishal Pattenshetty
 Introduction to CAN.
 What is CAN and Why CAN ?
 CAN protocol overview
 CAN physical layer
 CAN data link layer
 Cortex-M3 programming
 Project on CAN communication
 Hands-on Exercises on Real World System
 Analysis of CAN data using BUSMASTER and CAN data
base creation
What is communication ?
Communication is nothing but exchange of
information or data.
Why there is need for communication in a
vehicle?
To reduce the cost.
To reduce size.
To reduce the complexity.
To improve the performance.
What are the different types of communications?
Serial Communication
Parallel Communication
Advantages and Disadvantages of Both
Comparison of different protocols
• In "multi-drop" communication, one device
communicates with multiple receivers.
Example: RS-422.
• Where in "multi-point" communication,
multiple devices communicates with
multiple receivers. Example: RS-485
What is CAN ?
Controller Area Network
It is a serial bus system used to communicate between several embedded 8-bit and
16-bit
It was originally designed for use in the automotive industry but is used today in
many other systems (e.g. home appliances and industrial machines).
It is asynchronous serial transmission protocol.
 Highest Baud Rate is 1Mbit.
 CAN uses a message oriented transmission protocol.
 There are no defined addresses, just defined messages.
 Non-destructive arbitration system by CSMA with collision detection.
 Multi-master / Broadcasting concept
 Sophisticated error detection & handling system
 Wired And logic
 CSMA/CD
 Non destructive
 NRZ format
 Bit stuffing
 Fault confinement
 2 wire
 Prioritization of messages
 Differential voltage
 Transceivers
 Recessive and dominant bits
 Event triggered protocols
 CAN version 2.0A and 2.0B
 ISO-OSI compliant
 Plug in-Plug out protocol
 Serial asynchronous
 Maximum of 8 bytes in a frame
 automatic retransmission
Why CAN ?
 Mature Standard
 CAN protocol more than 16 years
 Numerous CAN products and tools on the market
 Simple Transmission Medium
 Twisted pair of wires is the standard, but also just one
wire will work
 Other links works, too: Opto - or radio links
 Excellent Error Handling
 CRC error detection mechanism
 Fault Confinement
 Built-in feature to prevent faulty node to block system
 Most used protocol in industrial and automotive world
CAN Controller
CAN Transceiver
CAN Protocol
There 4 types of frames
Data Frame
Remote frame
Overload frame
Error Frame
CAN Protocol
DATA Frame
• SOF – Start of Frame
• Identifier – Tells the content of message and priority
• RTR – Remote Transmission Request
• IDE – Identifier extension (distinguishes between CAN standard,11 bit
identifier, and CAN extended, 29 bit identifier.)
• DLC – Data Length Code
• Data – holds up to 8 bytes of data
• CRC – “Cyclic Redundant Check” sum
• ACK – Acknowledge
• EOF – End of Frame
• IFS – Intermission Frame Space. Minimum number of bits separating
consecutive messages.
Standard frame and extended frame
• Messages are
distinguished by message
identifiers.
• The identifier is unique to
the network and defines
the content & priority of
the message.
CAN Protocol
CAN Protocol
• When several messages access
the bus at the same time, the
one with the higher priority
“wins”.
• The identifier with the lowest
binary number has the highest
priority.
• The priority are specified
during system design and
cannot be changed
dynamically.
CAN Protocol
• Access conflicts on the bus
are resolved by a “wired
and” mechanism, where the
dominate state overwrites
the recessive state.
• All “losers” automatically
become receivers and they
won’t try to send another
message until the bus
becomes available again.
CAN Protocol
• If one or more errors are detected, the transmission is
aborted. This prevents all other stations or nodes from
accepting the message.
• Re-transmission is automatic. If errors continue, then the
station or node may switch itself off to prevent the bus
from being tied up.
• Error detection is done on two levels:
– Message level
– Bit level
CAN Protocol
• Message Level
– CRC = Cyclic Redundant Check sum
– Frame Check = compares message to fixed format and frame
size
– ACK errors = if transmitter does not receive an ACK signal
from the receivers
• Bit level
– Monitoring = The transmitter monitors the bus signal as it
sends the message and compares the bit sent to the bit
received.
– Bit Stuffing = After five consecutive equal bits, the
transmitter inserts a stuff bit with a compliment value into
the bit stream. The receivers remove this stuff bit.
CAN Protocol
 Error Frame: sent after a violation frame format
 Overload Frame: prevents data overflow from a slower CAN
Overload Frames are not really used
TEC and REC counters allows to prevent from faulty nodes
 CAN Node Error States:
 Error Active: Normal state, node can send all frames (error frames
included)
 Error passive: Node can send all frames excluding error frames
 Bus off: Node is isolated from bus
 Internal Counters: TEC & REC
 TEC: Transmit Error Counter
 REC: Receive Error Counter
CAN Protocol
Node 1 Node 2 Node 3 Bus
D D D D
D D r D
D r D D
D r r D
r D D D
r D r D
r r D D
r r r r
‘1’ Recessive (r)
‘0’ Dominant (D)
Two logic states on the CAN bus
Bus in dominant state
Wired-AND Function
Bus in recessive state
or idle
µController CAN
Controller
CAN
Transceiver
CANBus
CAN_H
CAN_LRXD
TXD
CAN_L
CAN_H
CAN Physical Layers
CAN - High - Speed ( ISO 11898 ) :
node 1 node 30
120
Ohm
120
Ohm
CAN_H
CAN_L
V o lta g e
tim e
2 ,5 V
3 ,5 V
1 ,5 V
C A N _ H
C A N _ L
re c e s s iv e d o m in a n t re c e s s ic v e
C A N h ig h -s p e e d , n o m in a l b u s le v e ls
Controller for CAN
Features of Cortex-M3 board
It is based on the NXP LPC1768, with a 32-bit ARM Cortex-M3 core running at 96MHz. It includes
512KB FLASH, 32KB RAM
Cortex-M3 exercises
• Blink LED
• Build two bit counter
• Control LED based on switch
• Control the speed of the Motor based on
speed.
CAN transceivers
CAN project
• Build CAN networks to transmit counter
from one node to other.
• Interior lighting control over CAN bus
• Sending multiple bytes over CAN network
What is Ticker?
• Use the Ticker interface to set up a
recurring interrupt; it calls a function
repeatedly and at a specified rate.
CANMessage structure
CAN Signal Analysis
CANalyzer and BUSMASTER
CANalyzer/CANoe
• CAN BUS analysis at signal
• CAN bus analysis at message level
• Send/Receive CAN data
• Simulate CAN node
• Simulate CAN network
• Test Automation using CAPL scripting
Setting the baud-rate
• Can1.freequency(250000);
Sending multiple bytes

More Related Content

What's hot

Can bus m.n.r
Can bus m.n.rCan bus m.n.r
Can bus m.n.rMNR85
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?Sameh El-Ashry
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog Ramdas Mozhikunnath
 
Controller area network -ppt
Controller area network -pptController area network -ppt
Controller area network -pptvelichetiphani
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertionsHARINATH REDDY
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolAnkur Soni
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Challenges in Using UVM at SoC Level
Challenges in Using UVM at SoC LevelChallenges in Using UVM at SoC Level
Challenges in Using UVM at SoC LevelDVClub
 
Introduction about APB Protocol
Introduction about APB ProtocolIntroduction about APB Protocol
Introduction about APB ProtocolPushpa Yakkala
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0Azad Mishra
 
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...IRJET- Design and Verification of APB Protocol by using System Verilog and Un...
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...IRJET Journal
 

What's hot (20)

CAN Bus
CAN BusCAN Bus
CAN Bus
 
Hdlc
HdlcHdlc
Hdlc
 
Can bus m.n.r
Can bus m.n.rCan bus m.n.r
Can bus m.n.r
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Controller area network -ppt
Controller area network -pptController area network -ppt
Controller area network -ppt
 
Communication protocols - Embedded Systems
Communication protocols - Embedded SystemsCommunication protocols - Embedded Systems
Communication protocols - Embedded Systems
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertions
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
Challenges in Using UVM at SoC Level
Challenges in Using UVM at SoC LevelChallenges in Using UVM at SoC Level
Challenges in Using UVM at SoC Level
 
AMBA Ahb 2.0
AMBA Ahb 2.0AMBA Ahb 2.0
AMBA Ahb 2.0
 
I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
UVM TUTORIAL;
UVM TUTORIAL;UVM TUTORIAL;
UVM TUTORIAL;
 
Introduction about APB Protocol
Introduction about APB ProtocolIntroduction about APB Protocol
Introduction about APB Protocol
 
I2C
I2CI2C
I2C
 
UART
UARTUART
UART
 
Lin bus
Lin busLin bus
Lin bus
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...IRJET- Design and Verification of APB Protocol by using System Verilog and Un...
IRJET- Design and Verification of APB Protocol by using System Verilog and Un...
 

Similar to CAN Network Development Program Overview

Similar to CAN Network Development Program Overview (20)

Canbus
CanbusCanbus
Canbus
 
Role of CAN BUS in automotives
Role of CAN BUS in automotivesRole of CAN BUS in automotives
Role of CAN BUS in automotives
 
CAN BUS.ppt
CAN BUS.pptCAN BUS.ppt
CAN BUS.ppt
 
CAN BUS.pptx
CAN BUS.pptxCAN BUS.pptx
CAN BUS.pptx
 
Control Area Network
Control Area NetworkControl Area Network
Control Area Network
 
CAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolCAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus Protocol
 
CAN Bus
CAN BusCAN Bus
CAN Bus
 
CONNECTED vehicle ECU.pptx
CONNECTED vehicle ECU.pptxCONNECTED vehicle ECU.pptx
CONNECTED vehicle ECU.pptx
 
Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)
 
Can Protocol Based Health Monitoring
Can Protocol Based Health MonitoringCan Protocol Based Health Monitoring
Can Protocol Based Health Monitoring
 
Controller area network
Controller area networkController area network
Controller area network
 
Ca npp t
Ca npp tCa npp t
Ca npp t
 
Can overview
Can overviewCan overview
Can overview
 
UNIT 2b.pptx
UNIT 2b.pptxUNIT 2b.pptx
UNIT 2b.pptx
 
can bus theory solution
can bus theory solutioncan bus theory solution
can bus theory solution
 
CAN- controlled area network
CAN- controlled area networkCAN- controlled area network
CAN- controlled area network
 
Shubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcanShubham chakravarty ppt_wcan
Shubham chakravarty ppt_wcan
 
Lasseq f can
Lasseq f canLasseq f can
Lasseq f can
 
Can Protocol For Automobiles
Can Protocol For AutomobilesCan Protocol For Automobiles
Can Protocol For Automobiles
 
final_of_can_bus_ (1).ppt
final_of_can_bus_ (1).pptfinal_of_can_bus_ (1).ppt
final_of_can_bus_ (1).ppt
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

CAN Network Development Program Overview

  • 1. CAN Network Development Program @IoTShow.in by Prof. Nalini C. Iyer Prof. Venkatesh Mane. Prof. Vishal Pattenshetty
  • 2.  Introduction to CAN.  What is CAN and Why CAN ?  CAN protocol overview  CAN physical layer  CAN data link layer  Cortex-M3 programming  Project on CAN communication  Hands-on Exercises on Real World System  Analysis of CAN data using BUSMASTER and CAN data base creation
  • 3. What is communication ? Communication is nothing but exchange of information or data. Why there is need for communication in a vehicle? To reduce the cost. To reduce size. To reduce the complexity. To improve the performance.
  • 4. What are the different types of communications? Serial Communication Parallel Communication Advantages and Disadvantages of Both
  • 6. • In "multi-drop" communication, one device communicates with multiple receivers. Example: RS-422. • Where in "multi-point" communication, multiple devices communicates with multiple receivers. Example: RS-485
  • 7. What is CAN ? Controller Area Network It is a serial bus system used to communicate between several embedded 8-bit and 16-bit It was originally designed for use in the automotive industry but is used today in many other systems (e.g. home appliances and industrial machines). It is asynchronous serial transmission protocol.  Highest Baud Rate is 1Mbit.  CAN uses a message oriented transmission protocol.  There are no defined addresses, just defined messages.  Non-destructive arbitration system by CSMA with collision detection.  Multi-master / Broadcasting concept  Sophisticated error detection & handling system
  • 8.  Wired And logic  CSMA/CD  Non destructive  NRZ format  Bit stuffing  Fault confinement  2 wire  Prioritization of messages
  • 9.  Differential voltage  Transceivers  Recessive and dominant bits  Event triggered protocols  CAN version 2.0A and 2.0B  ISO-OSI compliant  Plug in-Plug out protocol  Serial asynchronous  Maximum of 8 bytes in a frame  automatic retransmission
  • 10. Why CAN ?  Mature Standard  CAN protocol more than 16 years  Numerous CAN products and tools on the market  Simple Transmission Medium  Twisted pair of wires is the standard, but also just one wire will work  Other links works, too: Opto - or radio links  Excellent Error Handling  CRC error detection mechanism  Fault Confinement  Built-in feature to prevent faulty node to block system  Most used protocol in industrial and automotive world
  • 12. CAN Protocol There 4 types of frames Data Frame Remote frame Overload frame Error Frame
  • 13. CAN Protocol DATA Frame • SOF – Start of Frame • Identifier – Tells the content of message and priority • RTR – Remote Transmission Request • IDE – Identifier extension (distinguishes between CAN standard,11 bit identifier, and CAN extended, 29 bit identifier.) • DLC – Data Length Code • Data – holds up to 8 bytes of data • CRC – “Cyclic Redundant Check” sum • ACK – Acknowledge • EOF – End of Frame • IFS – Intermission Frame Space. Minimum number of bits separating consecutive messages.
  • 14. Standard frame and extended frame
  • 15. • Messages are distinguished by message identifiers. • The identifier is unique to the network and defines the content & priority of the message. CAN Protocol
  • 16. CAN Protocol • When several messages access the bus at the same time, the one with the higher priority “wins”. • The identifier with the lowest binary number has the highest priority. • The priority are specified during system design and cannot be changed dynamically.
  • 17. CAN Protocol • Access conflicts on the bus are resolved by a “wired and” mechanism, where the dominate state overwrites the recessive state. • All “losers” automatically become receivers and they won’t try to send another message until the bus becomes available again.
  • 18. CAN Protocol • If one or more errors are detected, the transmission is aborted. This prevents all other stations or nodes from accepting the message. • Re-transmission is automatic. If errors continue, then the station or node may switch itself off to prevent the bus from being tied up. • Error detection is done on two levels: – Message level – Bit level
  • 19. CAN Protocol • Message Level – CRC = Cyclic Redundant Check sum – Frame Check = compares message to fixed format and frame size – ACK errors = if transmitter does not receive an ACK signal from the receivers • Bit level – Monitoring = The transmitter monitors the bus signal as it sends the message and compares the bit sent to the bit received. – Bit Stuffing = After five consecutive equal bits, the transmitter inserts a stuff bit with a compliment value into the bit stream. The receivers remove this stuff bit.
  • 20. CAN Protocol  Error Frame: sent after a violation frame format  Overload Frame: prevents data overflow from a slower CAN Overload Frames are not really used
  • 21. TEC and REC counters allows to prevent from faulty nodes  CAN Node Error States:  Error Active: Normal state, node can send all frames (error frames included)  Error passive: Node can send all frames excluding error frames  Bus off: Node is isolated from bus  Internal Counters: TEC & REC  TEC: Transmit Error Counter  REC: Receive Error Counter
  • 22. CAN Protocol Node 1 Node 2 Node 3 Bus D D D D D D r D D r D D D r r D r D D D r D r D r r D D r r r r ‘1’ Recessive (r) ‘0’ Dominant (D) Two logic states on the CAN bus Bus in dominant state Wired-AND Function Bus in recessive state or idle
  • 24. CAN Physical Layers CAN - High - Speed ( ISO 11898 ) : node 1 node 30 120 Ohm 120 Ohm CAN_H CAN_L V o lta g e tim e 2 ,5 V 3 ,5 V 1 ,5 V C A N _ H C A N _ L re c e s s iv e d o m in a n t re c e s s ic v e C A N h ig h -s p e e d , n o m in a l b u s le v e ls
  • 26. Features of Cortex-M3 board It is based on the NXP LPC1768, with a 32-bit ARM Cortex-M3 core running at 96MHz. It includes 512KB FLASH, 32KB RAM
  • 27. Cortex-M3 exercises • Blink LED • Build two bit counter • Control LED based on switch • Control the speed of the Motor based on speed.
  • 29. CAN project • Build CAN networks to transmit counter from one node to other. • Interior lighting control over CAN bus • Sending multiple bytes over CAN network
  • 30. What is Ticker? • Use the Ticker interface to set up a recurring interrupt; it calls a function repeatedly and at a specified rate.
  • 34. CANalyzer/CANoe • CAN BUS analysis at signal • CAN bus analysis at message level • Send/Receive CAN data • Simulate CAN node • Simulate CAN network • Test Automation using CAPL scripting
  • 35.
  • 36. Setting the baud-rate • Can1.freequency(250000);