外文翻译嵌入式单片机网络测控系统的设计.doc

上传人:laozhun 文档编号:4148967 上传时间:2023-04-07 格式:DOC 页数:15 大小:657.50KB
返回 下载 相关 举报
外文翻译嵌入式单片机网络测控系统的设计.doc_第1页
第1页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计.doc_第2页
第2页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计.doc_第3页
第3页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计.doc_第4页
第4页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计.doc_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《外文翻译嵌入式单片机网络测控系统的设计.doc》由会员分享,可在线阅读,更多相关《外文翻译嵌入式单片机网络测控系统的设计.doc(15页珍藏版)》请在三一办公上搜索。

1、The Design of Embedded MCU Network Measure andControl SystemGAO Guanwang, WANG Yanpeng, SHA ZhanyouCollege of Information Science and Engineering,Hebei University of Science and Technology, ,Shijiazhuang Hebei, ChinaAbstractThis paper introduces a type of embedded MCU network measure and control sys

2、tem based on Ethernet, which adopts high speed MCU with kernel of 8052. Through controlling the special chip for Ethernet, the system realized the function of TCP/IP protocol. Since the system can be used as a independent system, any computer on the net can control the system or transmit order and d

3、ata to the system through standard TCP/IP protocol. Equipped the system by digital temperature sensor, it can be used to measure industry field temperature and transmit the results to computer through network, and then get temperature curve. And its measure and control range are all -10125,the accur

4、acy is, the resolution reaches 0.1. This system have many advantages such as simple structure,better universal, communicating through network, flexible usage, low cost etc. It can be adapted by various of intelligent sensor and has better extend ability. It can be used in the fields of remote data a

5、cquisition, remote measurement and control and so on.Keywords: Embedded MCU Network Measure and Control System; Ethernet; System parameter; Digital Temperature Sensor.1.IntroductionThe development history of the measure and control system experienced six phases in the following. (1)The traditional c

6、ontrol system consists of MCU, PC or IPC. (2) The measurement and control system based on PC bus. (3) Distributed Control System (DCS). (4) DCS system based on LAN. (5) HART bus which is developed by the 2-wire 4mA 20mA standard signal, and is a kind of fieldbus used between the intelligent field eq

7、uipment and automatic control equipment. (6) Since 90s of the 20th century, with the rapid development of the Internet, it becomes possible that more quickly, more convenient and more economical gaining and exchanging information. So measurement and control system can become the client of the global

8、 network. At present, the remote control system based on internet is driving the development of measurement and control technology, and has been applied in monitor fields of the nuclear power station, the oil transport pipeline, the power networks run and robot. The remote control system based on in

9、ternet has advantage of the quick information transfer, strong interactivity and low cost, while it can achieve data sharing.The existing network control equipment use mostly MODEM chip, with the PPP protocol dialing to the internet or special network by telephone network. Although this method can r

10、ealize the network control and data transmission, it depends on the telephone, make its use cost increase significantly. Additionally, transmission speed is no more than several hundreds kbps (usually only a few tens kbps or lower) because of the limit of telephone network, and it is not adequate fo

11、r the needs of large quantities of data transmission. Therefore, the network measurement and control technology based on Ethernet get more and more important. The ethernet is a widely used LAN standard, which can be defined by IEEE-802.3 standard, and it can support 10Mbps, 100Mbps, or 1000Mbps band

12、width, often with twisted-pair cable or fiber as the transmission medium. Its characteristic is the low price, mature technology, flexible application.2.Design Scheme of Edesign Plandesign Plandesign Plandesign Plandesign Planmbedded Microcontroller Network SystemIt is a type of embedded MCU measure

13、 and control system based on Ethernet network system, using a microprocessor with 8052 as kernel. It realized common ARP, IP, ICMP, TCP and UDP protocol part function of TCP/IP on Ethernet by controlling RTL8019AS which is a special Ethernet chip. It can be used as an independent system on Ethernet

14、network. Any computer on Ethernet can visit the system via the standard TCP/IP protocol, transport control commands or data among them. The system function has the following characteristics: (1) the simple structure; (2) with low cost, it is convenient to apply in many nodes; (3) strong adaptation c

15、an be used with various equipment; (4)it can communicate through the Internet. This system used serial interface for data acquisition, it can adapt all kinds of intelligent sensor and has strong ability of expansion, and can be widely used in remote data acquisition, remote control, etc. The circuit

16、 diagram and the system program flowchart of embedded microcontroller network system are respectively shown in figure 1, figure 2In order to realize the standard TCP/IP protocol with microcontroller, Winbond Company W78E58 MCU production is used as main control chip in the circuit design. The W78E58

17、 MCU can meet the following three conditions: the first, it is compatible with MCS - 51 series microcontroller, the second, the internal program memory is 32KB, and it is enough to write into a large program, the third, fast clock frequency can reach the 40MHz level.Figure 1. circuit block diagram o

18、f embedded C network systemThe W78E58 as the center, along with the direction of data transmission, it can constitute two main function modules: one is data acquisition channel, which is connected the W78E58 serial input/output port via MAX232 interface chip, the Two is finishing read and write oper

19、ations or control to Ethernet interface chip and 32KB external RAM (62256) via W78E58 P0 port and P2 port. So sensors (or controller) data or control signal come from the network was first Ethernet chip received, and then sent to the W78E58 MCU for data processing , then transport to 89C51 MCU from

20、the serial port, the 89C51 package the data into standard TCP/IP packets, then send to remote host. To adapt the network system to different sensors and web host, the syetem connected with a 2Kbit external Flash memory AT24C02 in addition, which was used to store the system parameters such as IP add

21、ress, port, serial port setting and so on.Figure 2. system program flow diagramThe two light-emitting diodes are connected to the two serial port data lines to indicate serial data status.3.Embedded Microcontroller Network System Circuit DesignNetwork sensor adopts the American DALLAS company DS1821

22、 1-wire programmable digital temperature sensor. MCU adopts Atmel company AT89C51 microcontroller, which is fully compatible with MCS - 51 series microcontroller. It has 4KB Flash program memory to store users program avoid extending external program memory. In order to adapt embedded microcontrolle

23、r network system, it receives control commands, data, and transmits the values of temperature and states through serial port. Serial port level transition chip uses MAXIM company MAX232 chip.The DS1821 has two operating modes: 1-Wire mode and thermostat mode. The 1-Wire mode is fit asdigital thermom

24、eter or temperature measuring system; in thermostat mode, user need to program toconstitute the temperature control system. Two working mode can transform each other. The AT89C51chip converts control commands and data received by serial port into 1-wire signal for DS1821 , thensend to DS1821, thus i

25、t accomplished control DS1821. The DS1821 return 1-wire signal of status value or temperature value. The AT89C51 recognise and convert these signal and send out from the serial port.The W78E58 microcontroller uses 22.1184 MHz crystal oscillator, as figure 3 shows. The power-up reset circuit composed

26、 by C1 and R3. The preset switch S1-1 is used to set entering setting status or normal working status when the system power up. The P1.5 (net label RESET) connects to RESET pin of network card, and accomplishes the reset funtion to the network card.Figure 3. W78E58 MCU circuit diagramThe RAM memory

27、62256 connects to MCU with typical circuit. The 74HC373 is used to latch the low 8 bits address bus. The 62256 address range is 0x0000 0x7FFF. The SDA and SCL pins on externalmemory AT24C02 connect to MCU P1.7 and P1.6 pins respectively. The W78E58 software simulate thetiming of I2C bus on P1.6, P1.

28、7 pins, thus it accomplished read and write operations of AT24C02. Thewrite protect pin connect to low-level, does not perform the write protect. While connecting A0, A1, A2pins to GND, read and write address is respectively 0xA1 and 0xA0. The serial interface chip MAX232pins of CPUTXD and CPURXD co

29、nnect to MCU pins of TXD and , RXD respectively.This system can use any ISA interface network card which is compatible with NE2000. The newnetwork card can be set with their own set program on computers in order to meet the basic requirementsof the embedded network system. The specific procedures ar

30、e as follows:(1) Enter into the ms-dos operating systems, run network card set program.(2) According to the table 1 set the network card.(3) Choose YES to exit the setting program and these settings take effect. Pull out this card from thecomputer, insert it into the system board.4.System Parameters

31、 Custom SettingsThe network system provides custom function of initialization parameters. The user can flexibly andconveniently set all system initialization parameters by using super system tool of Windows operatingsystem.Firstly, connect the system serial port to a computer serial port, here is CO

32、M2. From the “start” menu,select program -attachment -communication, lauch hyper system, and there is a connectiondescribe dialog box, waiting to input a connection name, enter setup and click the ok. Then a “connect to” window appears, at connection with place, choose COM2 which is connection port

33、between system and computer and click ok. Then set the communication parameters for COM2 in COM2 attribute setting window. Click ok to enter the hyper system main interface.In order to get better result in the process of configuration parameters, it is necessary to set “hypersystem”more detailedly.

34、Click properties button on the toolbar, open “properties” dialog box. ChooseSettings, click ASCII code set button in ASCII Settings window. After finishing these settings thesystem return to main interface, hyper system in a waiting connection status.Put preset switch S1-1 to OFF position, the green

35、 light display serial port data transmission and thered light display the network data transmission.5 The Program Design Essential and Application Of Network Sense SystemMCU accomplish writing and reading data to DS1821 with timing. The timing transmits data bits andcommand word decided which kind o

36、f operation is needed5.1.Write timingThe MCU pull I/O pin (1-wire bus) from high level to low level as a start of of writing cycle. Writetiming includes two types: write “1” timing and write “0” timing. The time keep at least 60us, there is 1s restore time between two write cycles at least.DS1821 ta

37、ke a sampling in 15s-60s time after the I/O line change into a low level. If I/O line ishigh level that one bit “1” is writed, if I/O line is low level that one bit “0” is writed. Write timingwaveform is shown in figure 4.When the MCU begin writing “1” cycle, must pull I/O line to low level and then

38、 release, pull into ahigh level in the 15s time. When the MCU begin writing “0” cycle, should also pull I/O line into lowlevel, and maintain 60s time.Figure 4. read and write cycle waveform a) write cycle b) read cycle5.2.Read timingWhen the MCU pull I/O line from high level to low level, the read c

39、ycle will begin, and I/O line remainlow level time for 1s at least. The DS1821 output data take effect within 15s after read timing fallingedge appear. During this time, the MCU should release the I/O line, so that it is in input status to read data.The read timing end after 15s, owe to the external

40、 pull-up resistors , the I/O line become high level againRead a bit data need at least 60 s time, there is at leas 1s restore time between two bit dada.Readingtiming waveform is shown in figure 4b.Use the temperature control system to measure certain industrial field temperature, then transmit dadat

41、o the computer by the network, eventually obtaining temperature curve is shown in figure 5.Figure 5. temperature curveConclusionNetwork measure and control technology play an important role in industrial system. Ethernet is a LANstandard used widely, which is defined by IEEE802.3, can support 10Mbps

42、, 100Mbps and 1000Mbpsbandwidth, often use twisted-pair cable or fiber as the transmission medium. Its characteristic is the lowprice, mature technology and flexible application.Embedded microcontroller network measure and control system based on Ethernet has thecharacteristic of advanced performanc

43、e, flexible application and low cost etc, so that the system can begeneralize and apply.嵌入式单片机网络测控系统的设计沙占友河北科技大学信息学院,河北石家庄 050054摘要介绍一种基于以太网的嵌入式单片机网络测控系统,它采用具有8052内核的高速单片机,通过对专用以太网芯片的控制,在以太网上实现了TCP/IP协议的功能,可作为以太网的一个独立系统,网络上的任何一台计算机都可通过标准的TCP/IP协议对其进行控制,传输控制命令或数据。将该网络测控系统配上数字温度传感器后实际测量工业现场温度,然后通过网络传输

44、给计算机,可获得温度曲线,其测温范围与控温范围均为-10+125,测温精度为,分辨率达0.1。该系统具有结构简单、通用性强、通过Internet进行通信、使用灵活、成本低等优点,适配多种智能传感器并具有较强的扩展能力,适用于远程数据采集、远程测控等领域。关键词:嵌入式单片机网络测控系统;以太网;系统参数;设置;数字温度传感器1 引言测控系统的发展历史大致经历了以下6个阶段:以单片机、PC机或工控机为核心而构成传统的测控系统;由PC机总线构成的测控系统由多台微处理机组成的集散控制系统(TDCS)基于LAN的TDCS系统由两线制4mA-20mA标准信号发展起来的、用在智能化现场设备与自运控制设备之

45、间的现场总线HART总线20世纪90年代以来,随着因特网的高速发展,使得更快捷、更方便、更经济地获取并交流信息成为可能,测控系统也因此而变成这种全球化网络的客户端。目前,基于Internet的远程测控系统正推动着测控技术的发展,并在核电站监控、室友输送管道的远程监测、并网运行监控和机器人的远程控制等领域得到了应用。基于Internet的远程测控系统具有信息传递快捷、交互性强、经济方便等特点,能实现数据共享。现有的网络测控设备大多采用MODEM芯片,是通过电话网用的PPP协议拨号到Internet或专用网络的。这种方法虽然可以实现网络控制与数据传输,但它依赖于电话网,使其使用成本也显著提高。另外

46、手电话网的限制,其传输速率最高只可能达到几百Kbps(通常只有几十kbps甚至更低),难以满足大量数据传输的需要。因此,基于以太网的网络测控技术也为人们所重视。以太网是一种应用广泛的局域网标准,它由IEEE-802.3所定义,可支持10Mbps100Mbps或1000Mbps带宽,常以双绞线或光纤作为传输介质。其特点是价格经济,技术成熟,应用灵活。2 嵌入式单片机网络系统的设计方案一种基于以太网的嵌入式单片机网络测控系统,采用具有8052内核的高速单片机,通过对专用以太网芯片RTL8019AS的控制,在以太网上实现了TCP/IP中常用的ARP、IP、ICMP、UDP等协议的部分功能。它完全可作

47、为以太网的一个独立系统,网络上的任何一台计算机都可通过标准的TCP/IP协议对其进行控制,在它们直径传输命令或数据。该系统在功能上有以下特定:结构简单,使用灵活;成本低,便于大规模及多通路应用;适配性强,可配合多种系统设备使用;Internet进行通信。该系统采用串口作为与数据采集部分的接口,适配多种智能传感器并具有较强的扩张能力,可防范用于远程数据采集、远程测控等领域。嵌入式单片机网络系统的电路宽途和系统的程序流程图分别如图1、图2所示。为了在单片机上实现标准的TCP/IP协议,在电路设计上采用了华邦公司生产的W78E58单片机作为主控芯片。W78E58单片机能满足以下三个条件:第一,与MC

48、S-51系列单片机兼容;第二,内部有较大的程序存储空间(32KB),免去了因程序过大而无法写入的后顾之忧;第三,运行速度快(最高时钟频率可达40MHz)。以W78E58为核心,沿着数据传递的方向向向两侧延伸,可以构成两个主要的功能模块:一是从W78E58的P0和P2口,对以太网接口芯片卡及32KB的外部KAM(62256)。进行读、写操作或控制。这样从网络上发送来的传感器(或控制器)的数据或控制型号首先被以太网芯片接受,再送至W78E58单片机进行处理,然后从串行口输出到89C51单片机,89C51单片机将其打包成标准的TCP/IP数据包,再发送到远程主机。为使网络系统能与不同的传感器及网上主

49、机相匹配,还外接一片2Kbit的闪速存储器AT24C02,用来存放IP地址、端口、串行口设置等系统参数。图 嵌入式单片机网络系统的电路框图在串口的两条数据线上接上了两只发光二级管,用来指示串口是否有数据。图 系统的程序流程图3 嵌入式单片机网络系统的电路设计网络传感器采用美国DALLAS公司最新推出的DS1821型单线可编程数字温度传感器。单片机选用单片机完全兼容,内含4KBFlash程序存储器,可方便地将程序写入芯片中,不用外扩程序存储器。为了能和嵌入式单片机网络系统相配合,现通过串行口输入控制命令、数据,输出温度及状态值。串口电平转换芯片选择MAXIM公司的MAX232.DS1821有两种工作模式:单线模式和

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公文档 > 其他范文


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号