Bachelor + Master Publishing
765 Bachelorarbeiten, 508 Masterarbeiten, 10.071 Diplomarbeiten

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
Über dieses Buch
  • Art: MA-Thesis / Master
  • Autor: Yu Zhu
  • Abgabedatum: April 2010
  • Umfang: 88 Seiten
  • Dateigröße: 4,5 MB
  • Note: 1,3
  • Institution / Hochschule: Technische Universität Berlin Deutschland
  • Bibliografie: ca. 13
  • ISBN (eBook): 978-3-8366-4869-1
  • Sprache: Englisch
  • Prämierung:
  • Arbeit zitieren: Zhu, Yu April 2010: Implementation of a CAN Bus based Measurement System on an FPGA Development Kit, Hamburg: Diplomica Verlag
  • Schlagworte: FPGA, CAN-Bus, UART, LabVIEW, Microcontroller

MA-Thesis / Master von Yu Zhu

Abstract:

The Controller Area Network (CAN) is a serial field bus protocol which was originally used in road vehicles. Most people still use Microcontrollers (MCU) to control the CAN bus. The development of Field-programmable Gate Array (FPGA) is very advanced, and compared to the MCU the FPGA has many advantages. For this reason, this thesis uses an Altera FPGA development kit to design a CAN bus based measurement system.

During the work, four Direct Digital Synthesizers (DDS) were simulated for four wave channels in the FPGA. All signals of the channels were transmitted from the FPGA to a CAN bus. Between the CAN bus and FPGA an Atmel CAN MCU, which contains both serial and CAN ports, was used as the third party. Whereby the data output from the FPGA were first transmitted to the serial port of the CAN MCU and then shifted to the CAN port of the CAN MCU. The CAN bus device (NI CAN USB-8473) which was used in this thesis, has a CAN port to connect to the CAN port of the CAN MCU, and a USB 2.0 port to connect to a PC. Finally, the data of the CAN bus was monitored on the PC with the LabVIEW platform. With this platform the data could also be transmitted to the CAN bus and then to the FPGA to change the tuning word of DDS. In order to achieve the speed limit of the complete measurement system, the communication rates of FPGA, CAN bus and CAN MCU were programmed to be the maximum.

Table of Contents:

1 Introduction 4
1.1 Background 4
1.2 Objective 4
1.3 Outline 6
2 CAN Introduction 7
2.1 Background 7
2.2 Architecture Layers 8
2.2.1 Physical Layer 8
2.2.2 Data Link Layer 10
2.2.3 Higher Layer 10
2.3 Frame Structure 11
2.3.1 Data Frame 11
2.3.2 Remote Frame 14
2.3.3 Error Frame 15
2.3.4 Overload Frame 16
2.3.5 Interframe Space 16
2.4 Frame Coding 17
2.5 Error Detecting and Handling 18
2.6 Fault Confinement 19
3 CAN and MCU Serial Port Effective Data Study 22
3.1 CAN Effective Data Study 22
3.2 MCU Serial Port Study 25
3.2.1 General 8051 MCU 25
3.2.2 Using Timer 2 27
3.2.3 X2 Mode 28
3.3 CAN vs. MCU Serial Port 29
4 Experiment Components and Setup 32
4.1 Stratix III FPGA Development Kit 32
4.2 CAN MCU AT89C51CC03 35
4.3 5-3.3 V Voltage Level Transistor 38
4.4 NI CAN USB-8473 40
4.5 PC with NI CAN Driver 42
4.6 Setup 42
5 Software Development 43
5.1 FPGA with Quartus II 43
5.1.1 DDS Design 43
5.1.2 PLL Application 45
5.1.3 UART Reception 49
5.1.4 UART Transmission 51
5.2 MCU with Keil C51 53
5.2.1 Serial Port Programming 53
5.2.2 CAN Programming 54
5.2.3 Interrupt Management 60
5.2.4 In-System Programming with FLIP 61
5.3 NI CAN BUS with LabVIEW 63
6 Experiments and Results 69
6.1 Problem Diagnosis 69
6.2 Final Results 72
7 Conclusion 75
References 76
Appendix A: Microcontroller Source Code 77
Appendix B: Figures 80
Appendix C: Tables 82
Appendix D: Symbols 83
Appendix E: Abbreviations and Acronyms 84

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).

Arbeit zitieren:
Zhu, Yu April 2010: Implementation of a CAN Bus based Measurement System on an FPGA Development Kit, Hamburg: Diplomica Verlag

Schlagworte:
FPGA, CAN-Bus, UART, LabVIEW, Microcontroller

Entdecken Sie mehr zum Thema

FPGA Design
FPGA Design Diplomarbeit von Thomas Strutzmann | März 2003 | Note 1,0
diplom.de
Bachelor + Master Publishing

Hermannstal 119 k
22119 Hamburg

Fon: +49 (0) 40 655992-0
Fax: +49 (0) 40 655992-22

Service-Telefon

Rufen Sie uns an:
+49 (0) 40 655992-0

Mo-Fr
09.00-16.00 Uhr

diplom.de in den Medien

Folgen Sie uns bei Twitter & werden Sie diplom.de-Fan bei Facebook!
Schreibtipps unserer Lektoren, Neuigkeiten aus dem Verlagsalltag und das Expertenwissen unserer Autoren als Tweet & Post!
Wir freuen uns auf Sie!

diplom.de BACHELOR + MASTER PUBLISHING

Bachelorarbeiten, Masterarbeiten, Diplomarbeiten, Magisterarbeiten, Dissertationen und andere Abschlussarbeiten aus allen Fachbereichen und Hochschulen können Sie bei uns als eBook sofort per Download beziehen oder sich auf CD oder als Buch zusenden lassen. Seit mehr als 15 Jahren ist diplom.de der seriöse, professionelle und erfolgreiche Partner für die Veröffentlichung wissenschaftlicher Abschlussarbeiten.

© Diplomica Verlag GmbH 1996-2011, AG Hamburg HRB 80293 - GF Björn Bedey, USt-IdNr.: DE214910002 - Verkehrsnummer: 12285 - Impressum
Index der Arbeiten - Index der Autoren