CAN and FPGA Communication Engineering: Implementation of a CAN Bus based Measurement System on an FPGA Development Kit
Implementation of a CAN Bus based Measurement System on an FPGA Development Kit
Yu Zhu(Author)
Diplomica Verlag
1st Edition
Published in November 2010
93 pages
978-3-8366-4925-4 (ISBN)
System requirements
for PDF without DRM
E-Book Single Licence
You are acquiring a single user licence for this eBook, which you might not transfer. [L]
Available for download
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
The Controller Area Network (CAN), invented by Bosch in 1983, is a serial field bus protocol which was originally used in road vehicles and now is widely applied in other industrial fields. Since its birth automotive electronic engineers have been use Microcontrollers (MCU) to control the CAN bus. Today, as the Field-programmable Gate Array (FPGA) has become very advance, this book introduces a new method which uses an FPGA and a MCU jointly instead of a single MCU is to design a CAN bus measurement system. Furthermore the designed system should be able to work at the fastest possible speed.
Chapter 1 of this book is the introduction which includes the background, objective and outline of this book.
Chapter 2 describes the CAN protocol development history and fundamentals such as application field, architecture layers, different frame structures, frame coding, error handling and fault confinement which are extracted from the CAN Specification 2.0 and ISO 11898. It helps reader to understand the CAN.
Chapter 3 studies the effective data transmission rate and ratio of the CAN bus and the MCU serial UART port. Then it compares their values and draws a conclusion. This chapter is the most important theory research of this book.
Chapter 4 describes the devices used in the experiments of the book. There are five major devices applied: an Altera FPGA, a 5-3.3 V level translator, an Atmel CAN MCU, a NI CAN USB and a PC with LabVIEW environment.
Chapter 5 demonstrates the software development procedure for the whole system including FPGA with Quartus II, MCU with Keil C51, and NI CAN BUS with LabVIEW.
Chapter 6 describes the testing experiments of the measurement system. It analyses a common error ignored during the MCU programming and shows how to solve it. After the reprogramming, three tests and their results are illustrated.
Chapter 7 presents the final conclusion of this book which is that the measurement system designed here maximally utilizes the CAN effective data transmission rate and ratio and could be applied in control systems of electric vehicles.
More details
Edition
1., Aufl.
Language
English
Place of publication
Hamburg
Germany
Illustrations
53
PDF-Format
PDF-Format
File size
4,12 MB
ISBN-13
978-3-8366-4925-4 (9783836649254)
Schweitzer Classification
Other editions
Additional editions

E-Book
10/2012
1st Edition
Diplomica Verlag
€29.99
Available for download

Yu Zhu
CAN and FPGA Communication Engineering: Implementation of a CAN Bus based Measurement System on an FPGA Development Kit
Implementation of a CAN Bus Based Measurement System on an FPGA Development Kit
Book
11/2010
1st Edition
Diplomica Verlag
€38.00
Shipment within 7-9 days
Person
Mr. Yu Zhu, born in Qidong, Jiangsu Province in China, is an expert of hardware/software development. In 2003 he came to Germany to learn the German language before studying Electrical and Computer Engineering. He graduated with a Bachelor's degree from the University of Duisburg-Essen and a Master's degree from the Technical University of Berlin (TU-Berlin). During his master's study he wrote his thesis about the CAN-bus based system development using the FPGA and Microcontroller. His thesis contributes to this book.
Content
1 - CAN and FPGA Communication Engineering [Seite 1]
2 - Preface [Seite 3]
3 - Contents [Seite 5]
4 - 1 Introduction [Seite 9]
4.1 - 1.1 Background [Seite 9]
4.2 - 1.2 Objective [Seite 9]
4.3 - 1.3 Outline [Seite 11]
5 - 2 CAN Introduction [Seite 12]
5.1 - 2.1 Background [Seite 12]
5.2 - 2.2 Architecture Layers [Seite 13]
5.2.1 - 2.2.1 Physical Layer [Seite 13]
5.2.2 - 2.2.2 Data Link Layer [Seite 15]
5.2.3 - 2.2.3 Higher Layer [Seite 15]
5.3 - 2.3 Frame Structure [Seite 16]
5.3.1 - 2.3.1 Data Frame [Seite 16]
5.3.2 - 2.3.2 Remote Frame [Seite 19]
5.3.3 - 2.3.3 Error Frame [Seite 20]
5.3.4 - 2.3.4 Overload Frame [Seite 21]
5.3.5 - 2.3.5 Interframe Space [Seite 21]
5.4 - 2.4 Frame Coding [Seite 22]
5.5 - 2.5 Error Detecting and Handling [Seite 23]
5.6 - 2.6 Fault Confinement [Seite 24]
6 - 3 CAN and MCU Serial Port Effective Data Study [Seite 27]
6.1 - 3.1 CAN Effective Data Study [Seite 27]
6.2 - 3.2 MCU Serial Port Study [Seite 30]
6.2.1 - 3.2.1 General 8051 MCU [Seite 30]
6.2.2 - 3.2.2 Using Timer 2 [Seite 32]
6.2.3 - 3.2.3 X2 Mode [Seite 33]
6.3 - 3.3 CAN vs. MCU Serial Port [Seite 34]
7 - 4 Experiment Components and Setup [Seite 37]
7.1 - 4.1 Stratix III FPGA Development Kit [Seite 37]
7.2 - 4.2 CAN MCU AT89C51CC03 [Seite 40]
7.3 - 4.3 5-3.3 V Voltage Level Transistor [Seite 43]
7.4 - 4.4 NI CAN USB-8473 [Seite 45]
7.5 - 4.5 PC with NI CAN Driver [Seite 47]
7.6 - 4.6 Setup [Seite 47]
8 - 5 Software Development [Seite 48]
8.1 - 5.1 FPGA with Quartus II [Seite 48]
8.1.1 - 5.1.1 DDS Design [Seite 48]
8.1.2 - 5.1.2 PLL Application [Seite 50]
8.1.3 - 5.1.3 UART Reception [Seite 53]
8.1.4 - 5.1.4 UART Transmission [Seite 56]
8.2 - 5.2 MCU with Keil C51 [Seite 58]
8.2.1 - 5.2.1 Serial Port Programming [Seite 58]
8.2.2 - 5.2.2 CAN Programming [Seite 59]
8.2.3 - 5.2.3 Interrupt Management [Seite 65]
8.2.4 - 5.2.4 In-System Programming with FLIP [Seite 66]
8.3 - 5.3 NI CAN BUS with LabVIEW [Seite 68]
9 - 6 Experiments and Results [Seite 74]
9.1 - 6.1 Problem Diagnosis [Seite 74]
9.2 - 6.2 Final Results [Seite 77]
10 - 7 Conclusion [Seite 80]
11 - References [Seite 81]
12 - Appendix [Seite 82]
2 - Preface [Seite 3]
3 - Contents [Seite 5]
4 - 1 Introduction [Seite 9]
4.1 - 1.1 Background [Seite 9]
4.2 - 1.2 Objective [Seite 9]
4.3 - 1.3 Outline [Seite 11]
5 - 2 CAN Introduction [Seite 12]
5.1 - 2.1 Background [Seite 12]
5.2 - 2.2 Architecture Layers [Seite 13]
5.2.1 - 2.2.1 Physical Layer [Seite 13]
5.2.2 - 2.2.2 Data Link Layer [Seite 15]
5.2.3 - 2.2.3 Higher Layer [Seite 15]
5.3 - 2.3 Frame Structure [Seite 16]
5.3.1 - 2.3.1 Data Frame [Seite 16]
5.3.2 - 2.3.2 Remote Frame [Seite 19]
5.3.3 - 2.3.3 Error Frame [Seite 20]
5.3.4 - 2.3.4 Overload Frame [Seite 21]
5.3.5 - 2.3.5 Interframe Space [Seite 21]
5.4 - 2.4 Frame Coding [Seite 22]
5.5 - 2.5 Error Detecting and Handling [Seite 23]
5.6 - 2.6 Fault Confinement [Seite 24]
6 - 3 CAN and MCU Serial Port Effective Data Study [Seite 27]
6.1 - 3.1 CAN Effective Data Study [Seite 27]
6.2 - 3.2 MCU Serial Port Study [Seite 30]
6.2.1 - 3.2.1 General 8051 MCU [Seite 30]
6.2.2 - 3.2.2 Using Timer 2 [Seite 32]
6.2.3 - 3.2.3 X2 Mode [Seite 33]
6.3 - 3.3 CAN vs. MCU Serial Port [Seite 34]
7 - 4 Experiment Components and Setup [Seite 37]
7.1 - 4.1 Stratix III FPGA Development Kit [Seite 37]
7.2 - 4.2 CAN MCU AT89C51CC03 [Seite 40]
7.3 - 4.3 5-3.3 V Voltage Level Transistor [Seite 43]
7.4 - 4.4 NI CAN USB-8473 [Seite 45]
7.5 - 4.5 PC with NI CAN Driver [Seite 47]
7.6 - 4.6 Setup [Seite 47]
8 - 5 Software Development [Seite 48]
8.1 - 5.1 FPGA with Quartus II [Seite 48]
8.1.1 - 5.1.1 DDS Design [Seite 48]
8.1.2 - 5.1.2 PLL Application [Seite 50]
8.1.3 - 5.1.3 UART Reception [Seite 53]
8.1.4 - 5.1.4 UART Transmission [Seite 56]
8.2 - 5.2 MCU with Keil C51 [Seite 58]
8.2.1 - 5.2.1 Serial Port Programming [Seite 58]
8.2.2 - 5.2.2 CAN Programming [Seite 59]
8.2.3 - 5.2.3 Interrupt Management [Seite 65]
8.2.4 - 5.2.4 In-System Programming with FLIP [Seite 66]
8.3 - 5.3 NI CAN BUS with LabVIEW [Seite 68]
9 - 6 Experiments and Results [Seite 74]
9.1 - 6.1 Problem Diagnosis [Seite 74]
9.2 - 6.2 Final Results [Seite 77]
10 - 7 Conclusion [Seite 80]
11 - References [Seite 81]
12 - Appendix [Seite 82]
Text Sample:
Chapter 2, CAN Introduction:
In order to communicate via CAN, it is necessary to know about the fundamentals of the protocol. This chapter will introduce the history of CAN and present the main content of the CAN protocol based on the CAN Specification 2.0 [1] and ISO 11898 [2].
Chapter 2.1,Background:
CAN is a serial field bus protocol which was originally used in road vehicles. Its development history can be traced back to the early 1980s. At that time, all automotive manufacturers were using point-to-point wiring systems to connect electronic devices in vehicles. As the application of electronics in vehicles rapidly increased, the wiring between different components became heavy, long, expensive and disorganized. This also made repairs very difficult. In order to solve these problems and also to enhance the safety and robust nature of automobiles, Bosch developed the CAN in 1983. In February of 1986 at the SAE (Society of Automotive Engineers) Congress, Bosch introduced CAN. This is considered the 'birth of CAN". Shortly after, in mid 1987, Intel and Philips released the first CAN controller chips, the '82526' and the '82C200' [3]. Since then more and more companies have begun to develop and produce CAN. Today there are more than 50 CAN protocol controller chips available from more than 15 manufacturers [4]. In order to standardize CAN, in 1991 Bosch published the CAN Specification 2.0. In 1993 the ISO (International Organization for Standardization) published complimentary standards for CAN protocol, ISO 11898, and over the next few years issued the revised versions ISO 11898-1, ISO 11898-2 /-3/-4/-5.
Today, due to its high performance, reliability and low cost, CAN is used not only in the automobile industry but also in many other fields including building automation (e.g. heating control, air conditioning, security, access and light control), domestic and food distribution (e.g. washing machines, dishwashers and vending machines), agriculture (e.g. harvesters, seeding, sowing machines and tractor control), medical apparatus, avionics and so on.
Chapter 2.2, Architecture Layers:
In the Open Systems Interconnection (OSI) reference model, the CAN Specification 2.0 and ISO 11898 jointly define the lowest two layers for the CAN: Physical Layer (7th) and Data Link Layer (6th) [1, 2].
Chapter 2.2.1, Physical Layer:
In the physical layer the CAN Specifications 2.0 defines how signals in the CAN bus are actually transmitted. It includes bit timing, bit encoding, and synchronization. The ISO 11898 supplements the definition for the PMA (Physical Medium Attachment) and MDI (Medium Dependent Interface).
According to the ISO 11898 the CAN network medium uses a twisted wire pair, one is referred to as 'CAN High" (CAN_H) which has a voltage value of 2.5 V to 4 V, and the other is 'CAN LOW" (CAN_L) which has a voltage value of 1 V to 2.5 V. The differential voltages on the CAN_H and CAN_L represent two signal states: recessive state (logic 1) and dominant state (logic 0). If the differential voltage is less than 0.5 V for receiver input or 1.5 V for transmitter output, then it is recessive, otherwise, it is dominant. Fig. 2.1 demonstrates a CAN bit stream: 1 (recessive), 0 (dominant), 1 (recessive).
Chapter 2, CAN Introduction:
In order to communicate via CAN, it is necessary to know about the fundamentals of the protocol. This chapter will introduce the history of CAN and present the main content of the CAN protocol based on the CAN Specification 2.0 [1] and ISO 11898 [2].
Chapter 2.1,Background:
CAN is a serial field bus protocol which was originally used in road vehicles. Its development history can be traced back to the early 1980s. At that time, all automotive manufacturers were using point-to-point wiring systems to connect electronic devices in vehicles. As the application of electronics in vehicles rapidly increased, the wiring between different components became heavy, long, expensive and disorganized. This also made repairs very difficult. In order to solve these problems and also to enhance the safety and robust nature of automobiles, Bosch developed the CAN in 1983. In February of 1986 at the SAE (Society of Automotive Engineers) Congress, Bosch introduced CAN. This is considered the 'birth of CAN". Shortly after, in mid 1987, Intel and Philips released the first CAN controller chips, the '82526' and the '82C200' [3]. Since then more and more companies have begun to develop and produce CAN. Today there are more than 50 CAN protocol controller chips available from more than 15 manufacturers [4]. In order to standardize CAN, in 1991 Bosch published the CAN Specification 2.0. In 1993 the ISO (International Organization for Standardization) published complimentary standards for CAN protocol, ISO 11898, and over the next few years issued the revised versions ISO 11898-1, ISO 11898-2 /-3/-4/-5.
Today, due to its high performance, reliability and low cost, CAN is used not only in the automobile industry but also in many other fields including building automation (e.g. heating control, air conditioning, security, access and light control), domestic and food distribution (e.g. washing machines, dishwashers and vending machines), agriculture (e.g. harvesters, seeding, sowing machines and tractor control), medical apparatus, avionics and so on.
Chapter 2.2, Architecture Layers:
In the Open Systems Interconnection (OSI) reference model, the CAN Specification 2.0 and ISO 11898 jointly define the lowest two layers for the CAN: Physical Layer (7th) and Data Link Layer (6th) [1, 2].
Chapter 2.2.1, Physical Layer:
In the physical layer the CAN Specifications 2.0 defines how signals in the CAN bus are actually transmitted. It includes bit timing, bit encoding, and synchronization. The ISO 11898 supplements the definition for the PMA (Physical Medium Attachment) and MDI (Medium Dependent Interface).
According to the ISO 11898 the CAN network medium uses a twisted wire pair, one is referred to as 'CAN High" (CAN_H) which has a voltage value of 2.5 V to 4 V, and the other is 'CAN LOW" (CAN_L) which has a voltage value of 1 V to 2.5 V. The differential voltages on the CAN_H and CAN_L represent two signal states: recessive state (logic 1) and dominant state (logic 0). If the differential voltage is less than 0.5 V for receiver input or 1.5 V for transmitter output, then it is recessive, otherwise, it is dominant. Fig. 2.1 demonstrates a CAN bit stream: 1 (recessive), 0 (dominant), 1 (recessive).
System requirements
File format: PDF
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use the free software Adobe Reader, Adobe Digital Editions, or any other PDF viewer of your choice (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or another reading app for eBooks, e.g., PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook does not use copy protection or Digital Rights Management.
For more information, see our eBook Help page.