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 [...]
Zusammenfassung
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:1Introduction41.1Background41.2Objective41.3Outline62CAN Introduction72.1Background72.2Architecture Layers82.2.1Physical Layer82.2.2Data Link Layer102.2.3Higher Layer102.3Frame Structure112.3.1Data Frame112.3.2Remote Frame142.3.3Error Frame152.3.4Overload Frame162.3.5Interframe Space162.4Frame Coding172.5Error Detecting and Handling182.6Fault Confinement193CAN and MCU Serial Port Effective Data Study223.1CAN Effective Data Study223.2MCU Serial Port Study253.2.1General 8051 MCU253.2.2Using Timer 2273.2.3X2 Mode283.3CAN vs. MCU Serial Port294Experiment Components and Setup324.1Stratix III FPGA Development Kit324.2CAN MCU AT89C51CC03354.35-3.3 V Voltage Level Transistor384.4NI CAN USB-8473404.5PC with NI CAN Driver424.6Setup425Software Development435.1FPGA with Quartus II435.1.1DDS Design435.1.2PLL Application455.1.3UART Reception495.1.4UART Transmission515.2MCU with Keil C51535.2.1Serial Port Programming535.2.2CAN []