2. Introduction
Standard to establish Network among microcontrollers
Broadcast type of bus
No way to send a message to a specific node
High speed applications with short messages
3. Comparing W ith Other
Buses
Bus Transfer Type Transfer Rate Max. Length (m) No. Of Nodes
(b/s)
RS232 Point to point 20k 15 1
RS485 Network 35k 1200 32
I2C Master-Slave 100k 1 128
SPI Master-Slave 110k 1 any
CAN Network 1M 40 2032
USB Master-Slave 480M 5 126
4. CAN in general………
Multi-master Network
2-wire
Half-duplex
High-speed (1Mbps)
Error Confinement and Error Detection
Distance up to 6 mS
5. Histor y
Introduced by Robert Bosch in 1986
Developed for automotive applications
Standardized in 1993 as ISO11898-1
CAN Standards
1. CAN 2.0A
2. CAN 2.0B
6. CAN Standar ds
1. CAN 2.0A
Standard CAN (ISO 11898)
11-bit Identifier
1 Mbps
2. CAN 2.0B
Extended CAN (ISO 11519)
29-bit Identifier
125 kbps
7. Reasons for Using
CAN
Robustness & Reliability
Low Connect Cost
Low Cost Components
Availability of CAN based Products
8. Applications
In Industry
To interconnect Machines, Process Control Units and
Production Sub-system
In Building Automation
To manage Heating, Lighting, Air ventilation and doors
Parameter Setting and control of equipment in
agriculture
9. Layer ed Str uctur e
Application
Layer Message Filtering,
Message and
Object Status Handling
Fault Confinement, Layer
Error Detection,
Signaling,
Message Validation, Transfer
Acknowledgement, Layer
Arbitration,
Framing,
Transfer Rate Physical
and Layer
Timing
Transmission Medium,
Signal Level and
CAN
bit representation
Network
10. Networ k Components
Cables
Physical Layer Connectors
Transceivers
Part A
CAN Controller Part B Passive
Part B
Software
11. Cables
Twisted Pair Cables are used to get higher speeds. The Bit
rate of the data transformation is high for short distance
and low for long distance.
Bus Length Bit Rate
40 Meters 1 Mbps
100 Meters 500 kbps
200 Meters 250 kbps
500 Meters 125 kbps
6 meters 10 kbps
12. Connector s
Pin Number Name Specification
1 - Reserved
2 CAN_L CAN_L bus line (dominant low)
3 CAN_GND CAN Ground
4 - Reserved
5 CAN SHLD Optional CAN Shield
6 GND Optional CAN Ground
7 CAN_H CAN_H bus line (dominant high)
8 - Reserved
9 CAN_V+ Optional Power
ll Mini type
r ma
N o ed
y Us
Pin Number Name
1 Drain
2 V+
3 V-
4 CAN_H
5 CAN_L
13. CAN Contr oller s
Part A
→ 11-bit Identifier
→ Above 2000 devices in the Network
Part B Passive
→ 11-bit Identifier
→ Tolerated 29-bit Identifier, but ignored
Part B
→ 29-bit Identifier
→ Above 5 million devices in the Network
14. Wor king Principle
Uses CSMA/CD+AMP (Arbitration on Message Priority).
Data messages transmitted from any node
Using identifier all nodes will check whether the message is intended
for it or not
The identifier determines the priority of the message
Low bits are always dominant
16. Data Fr ame
(Messa ge Frame)
For 2.0A
Start Of Frame:
Logic 0 indicates the beginning of a message frame.
Arbitration Field:
11-bit identifier. Determines the priority of the
message.
Control Field:
6-bits. 2-bits are reserved for future use. 4-bit Data
Length Code (DLC) indicates the number of bytes in the data
field.
17. Data Field:
0 to 8 Bytes of data
CRC Field:
15-bits Cyclic Redundancy Check Code and 1-bit
delimiter
Acknowledgement Field:
2-bits. Slot bit (1) overwritten by dominant bit from
other nodes and delimiter bit (1).
End Of Frame Field:
7-bits (1111111). Indicates the End of the data
frame.
Following the End Of Field is the Intermission field
consisting of 3-bits (111) denotes the bus is recognized to be
18. For 2.0B
SRR (Substitute Remote Request)
IDE (Identifier Extension)
The max. no. of user in 2.0A is 2032
The max. no. of user in 2.0B is above 5 million
19. Remote Fr ame
The intended purpose of this frame is to ask for the
transmission of the corresponding data frame. It is also used
implement a type of request-response type of bus traffic
management.
20. Er ror Fr ame
Consists of error flag (6-bits) and error delimiter (8-bits).
Transmitted when a node detects a fault and will cause all
other nodes to detect a fault
21. Over load Frame
This frame is mentioned just for completeness of the
transaction.
22. Er ror Detection and
Confinement
Error is detected by the CAN Controller
Error Frame is transmitted
Message is cancelled at all nodes
Status of the CAN Controllers are updated
The message is retransmitted
25. Types Of Er r or s
Bit Error – The node always reads the message as it is sending. If it
find a different value on the bus than it send, it detects the bit error.
Bit Stuffing Error – If a receiving node found more than five
consecutive bits it detects the error.
Checksum Error
Frame Error – Invalid bit error
Acknowledgement Error
26. Er ror Modes
Error Active – Active Error Flag is send and the data are transmitted
and received usually
Error Passive – When Controller has frequent problems and Passive
Error Flag is sent
Bus Off – When controller has serious problems . No messages can
be transmitted or received
27. Er ror Process
Two Error Counters are allocated for controlling the error mode. The
error counters are transmit error count and receive error count
28. For more details
www.pantechsolutions.net
http://www.slideshare.net/pantechsolutions
http://www.scribd.net/pantechsolutions
http://www.youtube.net/pantechsolutions