Inhaltsangabe: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. Inhaltsverzeichnis:Table of Contents: 1Introduction4 1.1Background4 1.2Objective4 1.3Outline6 2CAN Introduction7 2.1Background7 2.2Architecture Layers8 2.2.1Physical Layer8 2.2.2Data Link Layer10 2.2.3Higher Layer10 2.3Frame Structure11 2.3.1Data Frame11 2.3.2Remote Frame14 2.3.3Error Frame15 2.3.4Overload Frame16 2.3.5Interframe Space16 2.4Frame Coding17 2.5Error Detecting and Handling18 2.6Fault Confinement19 3CAN and MCU Serial Port Effective Data Study22 3.1CAN Effective Data Study22 3.2MCU Serial Port Study25 3.2.1General 8051 MCU25 3.2.2Using Timer 227 3.2.3X2 Mode28 3.3CAN vs. MCU Serial Port29 4Experiment Components and Setup32 4.1Stratix III FPGA Development Kit32 4.2CAN MCU AT89C51CC0335 4.35-3.3 V Voltage Level Transistor38 4.4NI CAN USB-847340 4.5PC with NI CAN Driver42 4.6Setup42 5Software Development43 5.1FPGA with Quartus II43 5.1.1DDS Design43 5.1.2PLL Application45 5.1.3UART Reception49 5.1.4UART Transmission51 5.2MCU with Keil C5153 5.2.1Serial Port Programming53 5.2.2CAN Programming54 5.2.3Interrupt Management60 5.2.4In-System Programming with FLIP61 5.3NI CAN BUS with LabVIEW63 6Experiments and Results69 6.1Problem Diagnosis69 6.2Final Results72 7Conclusion75 References76 Appendix A: Microcontroller Source Code77 Appendix B: Figures80 Appendix C: Tables82 Appendix D: Symbols83 Appendix E: Abbreviations and Acronyms84 Textprobe: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  and ISO 11898 . 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 . 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 . 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).Fig.1.1 System workflow chart............................................................................................. .... 6 Fig. 2.1 CAN bit stream a101a. ... 8 Fig.2.2 CAN bus layout. ... 3.4 Common 8051 machine cycle structure...................................................................... 28 Fig.
|Title||:||Implementation of a CAN Bus based Measurement System on an FPGA Development Kit|
|Publisher||:||diplom.de - 2010-07-04|