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

上传人:仙*** 文档编号:30470138 上传时间:2021-10-10 格式:DOC 页数:15 大小:666.51KB
收藏 版权申诉 举报 下载
外文翻译嵌入式单片机网络测控系统的设计_第1页
第1页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计_第2页
第2页 / 共15页
外文翻译嵌入式单片机网络测控系统的设计_第3页
第3页 / 共15页
资源描述:

《外文翻译嵌入式单片机网络测控系统的设计》由会员分享,可在线阅读,更多相关《外文翻译嵌入式单片机网络测控系统的设计(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有两种

50、工作模式:单线模式和自动控温模式。选择单线模式适合构成数字温度计或测温系统;若选用自控模式,用户就必须预先对芯片进行编程后才能构成温控系统。两种工作模式可互相转换。利用AT89C51单片机把串行口发来的控制命令、数据转换成DS1821可以识别的单线信号,再发送到DS1821,对其进行编程控制,将DS1821以单线访问的第状态值或温度值进行识别转换,最后从串行口发送出去。W78E58单片机采用22.1184MHz的石英晶体振荡器,电路如图3所示。上电复位电路由C1和R3组成。预置开关S1-1用于设定系统上电时进入设置状态还是正常工作状态。P1.5接网卡的复位引脚,用于对网卡进行复位。图 W78E

51、58单片机的电路图RAM存储器62256使用典型的接法与单片机相连,74HC373用于对地址的低8位进行锁存。62256的地址为0x0000 0x7FFF。外部存储器AT24C02的SDA、SCL分别与单片机的P1.7、P1.6口线相连,通过软件在P1.6、P1.7口线上模拟出2C总线的时序,对AT24C02进行读、写操作,写保护端Wb固定接低电平,不对其进行写保护。将A0、A1、A2端都接地时,读、写地址分别为:0xA1、0xA0。串行接口芯片MAX232的CPUTXD、CPURXD引脚, 分别接单片机的TXD、RXD引脚。该系统可使用任何一种与NE2000兼容的ISA接口网卡。新网卡可在计

52、算机上用其自带的设置程序进行基本设置,以满足嵌入式网络系统的要求。具体操作步骤如下:进入MSDOS操作系统, 运行网卡设置程序。选择“YES”退出网卡设置程序, 使所有设置生效。把该网卡从计算机上拔下, 插入系统板即可使用。按照表1对网卡进行设置。4 系统参数的自定义设置网络系统提供了初始化参数的自定义功能,用户只需使用Windows操作系统自带的“超级系统”工具, 即可灵活、方便地对系统的各项初始化参数进行合理设置。首先,将系统的串行口连接到计算机的一个串行口,这里选择COM2。从“开始”菜单起,依次选择“程疗”“附件”“通信”,启动超级系统,就会出现一个“连接说明”的对话框, 等待输入一个

53、连接名, 这里输入“setup”并点击“确定”。在随后出现的“连接到”窗口的“连接时使用”栏目上,选择系统与计算机相连的串口COM2并点击“确定”。然后对COM2的通信参数进行设置,在“COM2属性”设置窗口中进行设置。点击“确定”后即可进入超级系统的主界面。5 网络传感系统的程序设计要点及应用单片机通过时序(亦称“时间片”)来写入或读出DS1821中的数据。时序用于传输数据位和指定进行何种操作的命令字。5.1 写时序单片机把I/O线(即单线总线:亦称数据线) 从高电平拉成低电平时, 作为一个写周期的开始。写时序包括两种类型:写1时序,写0时序。写1或写0时序时至少要保持60s, 在两个写周期

54、之间至少要有1s的恢复期。图 读 写时序波形图 写时序#读时序DS1821在I/O线变为低电平后的15s60s的时间内进行采样。若I / O线为高电平,即认为写入了一位1;若I/O线为低电平,即认为写入了一位0。写时序的波形如图4a所示。单片机在开始写1周期时,必须将I/O线拉成低电平,然后再释放,15s内将I/O线拉成高电平。单片机在开始写0周期时,也应将I/O线拉成低电平,并保持60s的时间。5.2 读时序当单片机将I / O线从高电平拉成低电平时, 就作为一个读周期的开始, 并且I / O线保持低电平的时间至少为1s。DS1821的输出数据在读时序下降沿过后的15s内有效。在此期间, 单

55、片机应释放I /O线, 使之处于输入状态以便读取数据。经过15s后读时序结束, I / O线经外部上拉电阻又变成高电平。读取一位数据至少需要60s时间, 并且在两位数据之间至少要有1s的恢复期。读时序的波形如图4b所示。使用上述温控系统测量某工业现场温度, 然后通过网络传输给计算机, 最终获得的温度曲线如图5所示。该系统的测温范围与控温范围均为- 10+125, 测温误差为1, 分辨力为0.1。图5 温度曲线图6 结束语网络测控技术也为人们所重视。以太网是一种应用广泛的局域网标准,它由IEEE802.3所定义,可支持10Mbps、100Mbps或1000Mbps宽带,常以双或光纤作为传输介质。其特点是价格经济、技术成熟,应用灵活。基于以太网的嵌入式单片机网络测控系统具有性能先进、使用灵活、成本低廉等优点, 具有推广应用的价值。

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!