The Design of Data Acquisition Module on Ethernet Based on OpenTCP

Author
ChenJian
Advisor
ChenWanZhong
School
Jilin University
Major
Signal and Information Processing
Classification
TP274.2 Data collection and processing systems
Degree
Master's thesis
Year
2009
Downloads
182
Citations
2

Request the full text

Abstract

The data acquisition board based on interior bus and the acquisition terminal based on exterior communication bus are often used in the industrial production and intellectualized system research area to gather all kinds of data. These acquisition methods transmit data in a short distance, so it is hard to use them to interconect the acquisition equipments in different scene and transmit data in a long distance. With development of the ethernet technology and embedded technical,more and more research focus on the embedded ethernet technology. The method is inserting the Ethernet protocol in acquisition chip and transimiting the data on Ethernet, so the transmission could be father. The data acquisition and processing system based on Ethernet build on the existing Ethernet network, and it could work together with any application platforms based on Ethernet. Compared with the traditional data acquisition technology based on bus, it has many advantages such as extensible, flexible, long distence trasmission and high speend.The paper use Freescale’s 16-bits MCU MC9S12NE64 and OpenTCP Ethernet protocol to design a single-chip data acquisition module and realize a Ethernet data acquisition terminal. At first, the paper used MC9S12NE64 to carry out a TCP server. Then used the ATD module and SCI module of MC9S12NE64 to gather data. Finally, the data acquisition terminal gathered could be transmited on Ethernet through the OpenTCP protocol embedded in MC9S12NE64.MC9S12NE64 is a 16-bit microcontroller, with third-party TCP/IP protocol stack match, and then use Metrowerks CodeWarrior development tools of the rapid design, may realize the low cost terminal node Ethernet solution. It has high integration, simple structure and high flexibility. The software can be configured characteristics and realize large amounts of data acquisition and high-speed data transmission directly to the specific application of efficient support. The paper made a single-chip TCP server with embedding the modified OpenTCP in MC9S12NE64. Compared with the multi-chip design it has many advantages such as small size, simple structure, high integration and reliability.Currently,there are different types of popular network protocol, although each has its own advantages, but only TCP/IP allows full connectivity with the Internet, it is more focused on the Internet data transmission between equipments. The TCP/IP protocol stack, run on General computer is too complicated and demand large system resources. Embedded systems are generally in order to meet a specific demand, and network support requirements are relatively low. Any agreement on the need to add the corresponding module, without the use of complete TCP/IP protocol, we shall, in accordance with the needs, reduct the TCP/IP protocol appropriately.The paper, comparing several embedded protocol stack, choose OpenTCP protocol stack. OpenTCP protocol is free so it could reduce the cost of the research. The code of the OpenTCP is open, so researchers can modify it based on their need. As the CPU processing power and storage capacity of MC9S12NE64 is limited, the paper made some changes on OpenTCP protocol with characteristics of processors MC9S12NE64. This paper cutted down the unuseful protocols, such as HTTP and TFTP, of OpenTCP and hold the useful protocols such as TCP server, ICMP ping, ARP and IP. With the cutting of the protocol, the code reduced more than a half and the time used to processing OpenTCP is also reduced.The Ethernet parameter should be embedded into Ethernet data acquisition terminal before Ethernet connection. The popular method to embed the Ethernet parameter is setting the Ethernet parameter in programme. But it is hard to modify the Ethernet parameter because it needs the developer to modify the Ethernet parameter in programme and download the programme into the data acquisition terminal again. The paper found a way to modify the Ethernet parameter conveniently. To save the Ethernet parameter in an EEPROM connected to MC9S12NE64. The Ethernet parameter is loaded form the EEPROM and used for Ethernet connection when acquisition terminal is turned on. When Ethernet parameter is needed to be modified, using the SCI interface to link the data acquisition terminal to a computer. So user can use computer to modify the Ethernet parameter in EEPROM depend on a parameter modify communication protocol defined by the paper. The paper defined a parameter modify communication protocol for the communication security between computer an acquisition terminal. This method of parameter modification makes the work to modify the Ethernet parameter easyer. Modifying the Ethernet parameter through SCI communication is more convenient than modify the Ethernet parameter through programme, because it just need to operate on the parameter modification interface on coputer rather than to understand the code. The existing Ethernet data acquisition terminals are generally used for Ethernet-serial port communication. The Ethernet data acquisition terminal of the paper can gather three kinds of data, they are serial port datda, analog data, I/O port state. The paper defined a data acquisition protocol, which is used for communication between data acquisition terminal and control terminal, based on Ethernet protocol.The data acquisition protocol defines two work mode, once acquisition and series acquisition, and port selection mode. The paper is not simply patch up the data acquisition and Ethernet but carry out a bidirectional and more functional data acquisition system.The paper proposes a data acquisition terminal on Ethernet based on MCPS12NE64 and OpenTCP protocol. Not only the system realizes the data acquisition and Ethernet transmission but also actualize the parameter modification and three kinds of data acquisition. The data acquisition terminal can gather analog data, I/O state data and series port data through SCI module, ATD module and I/O port of MC9S12NE64. The data acquisition terminal has been embedded OpenTCP protocol and realized Ethernet function based on the EPHY and EMAC module of MC9S12NE64. The paper defined data acquisition protocol and parameter modification protocol to make data acquisition terminal achieving the data acquisition and parameter modification function.

Table of contents

Summary 4-8 Chapter 1 Introduction 8-12 1.1 Introduction 8 1.2 Background and Significance 8-9 1.3 development in the world 9-11 1.4 This research 11-12 Chapter 2 system design 12-18 2.1 design requirements 12-13 2.2 system to achieve functional 13-14 2.3 overall system implementation 14-16 2.4 Ethernet data acquisition modules of the application 16-17 2.5 Chapter Summary 17-18 Chapter 3 system development tools 18-28 3.1 embedded debugging method 18-19 3.2 MC9S12NE64 debugging method 19-20 3.3 TBDML circuit design 20-22 3.4 TBDML program download 22-26 3.4.1 TBDML communication interface program 23-24 3.4.2 TBDML download 24-25 3.4.3 PC USB driver installation 25-26 3.5 MC9S12NE64 microcontroller development environment 26-27 3.6 Summary 27-28 Chapter 4 Hardware Design 28-38 4.1 MC9S12NE64 microcontroller introduction 28-32 4.1.1 MC9S12NE64 internal structure 28-30 4.1.2 MC9S12NE64 microcontroller with Ethernet 30-32 4.2 data acquisition module hardware overall structure 32-33 4.3 data acquisition module circuit design 33-37 4.3.1 Power and crystal 33 4.3.2 serial interface 33-34 4.3.3 Ethernet interface circuit 34-35 4.3.4 EEPROM interface circuit 35 4.3.5 Other interface circuits 35-36 4.3.6 Data Acquisition Module physical map 36-37 4.4 Summary 37-38 Chapter 5 System protocol 38-48 5.1 system, network protocol 38-43 5.1.1 TCP / IP protocol Introduction 38-40 5.1.2 OpenTCP Protocol Introduction 40-41 5.1.3 OpenTCP cuts 41-43 5.2 System User Agreement 43-47 5.2.1 Parameter Setting agreement 43-45 5.2.2 Data acquisition agreement 45-47 5.3 Chapter Summary 47-48 Chapter 6 System Software Design 48-66 6.1 MC9S12NE64 the main processes 48-50 6.2 Embedded Ethernet driver implements 50-53 6.2.1 Initialization 50-51 6.2.2 Ethernet bottom drive 51-53 6.3 Ethernet protocol to simplify and achieve 53-60 6.3.1 ARP protocol 54-56 6.3.2 IP protocol 56-57 6.3.3 ICMP protocol 57 6.3.4 TCP protocol 57-60 6.4 user protocol 60-64 6.4.1 Parameter Setting Software Implementation 61-63 6.4.2 data acquisition software 63-64 6.5 Chapter Summary 64-66 Chapter 7 Ethernet data acquisition module function test 66-74 7.1 Ethernet connection test 66 7.2 Acquisition Module Ethernet performance test 66-69 7.3 parameter setting test 69-71 7.4 data acquisition function test 71-73 7.5 Chapter Summary 73-74 Chapter 8 Summary and Outlook 74-76 8.1 Full Summary 74 8.2 Prospects 74-76 References 76-80 master's research work during 80-81 Thanks 81-82 Summary 82-84 Abstract 84-86

Related dissertations

  1. The Development of the Gateway in Networked Digital Home
    ZhuKongBin ·Jilin University ·2008 ·Master's thesis
  2. The Design of Marine Embedded Serial Device Server
  3. The Design of the Computer Room Monitoring System Based on Embedded Web Server
    ChenZuo ·Central China Normal University ·2011 ·Master's thesis
  4. Universal Serial-Internet Switche Based on MC9S12NE64
  5. Design and Implementation of Embedded Web Server Based on MC9S12NE64
    WangWenChao ·Northeastern University ·2008 ·Master's thesis
  6. Research on the Reform of Taxation Information Management Mechanism in China
    ZhangYiXiang ·Huaqiao University ·2013 ·Master's thesis
  7. The Ningbo Public Transit Circuit Capacity Model and Practical Research
    XuBin ·Ningbo University ·2013 ·Master's thesis
  8. Optical Fiber Perimeter Alarm System Based on DSP and FPGA
  9. Design and Implementation of Alarming Management System about Fireproof and Burglar
  10. Research on Mechanical Vibration Testing System
    YaoFeiZhao ·Dalian Polytechnic University ·2008 ·Master's thesis
  11. Study on Embedded Data Acquisition System Application
    ZhangDong ·Dalian Polytechnic University ·2009 ·Master's thesis
  12. The Data Acquisition and Monitoring System of Gas-liquid Two-phase Flow Based on Data Acquisition Card and Kingview
    LiJian ·China University of Petroleum Hua Dong. ·2012 ·Master's thesis
  13. Development of ATE Signals On-line Monitoring Equipment
    QianKeWei ·Harbin Institute of Technology ·2012 ·Master's thesis
  14. The Design of Hybrid Electric Bus Data Acquisition and Test System
    LiHuiXian ·Hunan University ·2012 ·Master's thesis
  15. The Reliable Data Transmission System in the Maternal and Child Health Information Platform
    YangLei ·Guangxi University ·2012 ·Master's thesis
  16. Electromagnetic Tomography System for Biological Electrical Impedance Imaging
    LiXiaoKe ·Tianjin University ·2012 ·Master's thesis
  17. Research and Implementation of Meteorological Monitoring System Based on ARM9
  18. Design and Implementation of High Speed Data Recorder Based on FPGA
  19. Web Data Acquisition and Display System Based on Data-segment Technology of MDSplus
  20. Design of the High-speed Data Acquisition System Based on USB Interface
    LiuYu ·Harbin Engineering University ·2013 ·Master's thesis