41
附录一 部分元器件特性介绍
一、单片机AT89S52
AT89系列单片机是由美国ATMEL公司将闪速存储器与MCS-51控制器相
结合开发
生产的一种新型8位单片机,它不但具有一般MCS-51单片机的所有特性,而且还拥
有一些独特的优点,使8位单片机更具生命力。 它具有以下主要特性: (1)与MCS-51系列单片机兼容
(2) 8K Bytes, Flash存储器,在线编程,可写1000次 ( 3) 4. 0-5. 5V的工作电压 (4)自带256X8bit RAM (5) 32个可编程I/0管脚 (6) 3个16-Bit定时器/计数器 (7) 8个中断源 (8)自带看门狗
二、时钟芯片DS1302
DS1302特征:
(1)实时时钟,可以对秒、分、时、周、日、月、年以及带闰年补偿的年进行计数;
(2)与T'I'L兼容(V}}=5V )、 (3)2. 0-5. 5V的宽电压范围 (4具有主从双电源方式,从电源为 (5 8个中断源 (6)自带看门狗
三、看门狗芯片X5045X5045引脚功能如下:
42
CS: 选输入;
SO: 行输出,数据由此引脚逐位输出;
SI: 行输入,数据或命令由此引脚逐位写入X5045;
SCK 串行时钟输入,其上升沿将数据或命令写入,下降沿将数据输出; WP: 保护输入,当它低电平时,写操作被禁止; Vss: 地 Vcc: 源电压 RESET: 位输出
X5045在读写操作之前,需要先向它发出指令,指令名及指令格式如表1所示。
表1 X5045指令及其含义 指令名 WREN WRDI RDSR WRSR READ WRITE
43
指令格式 00000110 00000100 00000101 00000001 0000A801 0000A801 操作 设置写使能锁存器(允许写操作) 复位写使能锁存器(禁止写操作) 读状态寄存器 写状态寄存器 把开始于所选地址的寄存器中的数据读出 把数据写入开始于所选地址的寄存器
附录二
DP-Ethernet: the Profibus DP protocol implemented on
Ethernet
S. Vitturi
National Research Council, ISIB-CNR, Corso Stati Uniti 4, I-35127 Padova, Italy Received 7 January 2002; revised 27 September 2002; accepted 10 October 2002
Abstract
The use of Ethernet networks at the low level of factory automation systems, which is even more frequent, requires the adoption of real time protocols to implement the typical functions of this level.This paper investigates the possibility of using of a very popular fieldbus protocol, Profibus DP, as a real time protocol for Ethernet. The proposal, named DP-Ethernet, makes use of the IEEE 802.2 Logical Link Control to implement the Profibus DP functions on Ethernet. The paper shows how DP-Ethernet could be implemented maintaining the compatibility with already existing Profibus DP applications. Moreover, some DP-Ethernet performance figures, obtained with a software simulation package, are given. q 2002 Elsevier Science B.V. All rights reserved.
Keywords: Ethernet; Profibus DP; Real time; Protocol
1.Introduction
Communication networks currently have a widespread use at all hierarchical levels of factory automation systems. Unfortunately, the lack of a well clear standardisation process together with the continuously changing communication requirements have led to the necessity of using an heterogeneous variety of networks and protocols. As a result, several types of networks, such as for example fieldbuses, Local Area Networks (LANs) and Wide Area Networks (WANs), are commonly encountered in factory automation systems. This scenario, at the highest hierarchical levels, is rapidly converging towards a de facto standardisation, because, thanks to the impressive growth of the Internet, some very popular protocols such as for example FTP, HTTP, based on the TCP/IP suite are even more adopted also in industrial applications. These protocols are usually implemented on Ethernet networks whose physical extension is limited to that of the plant under
44
control: the resulting networks are normally referred to as Intranets.
Conversely, the situation is particularly critical at the lowest level of factory automation systems, called ‘device level’, where fieldbuses are typically used. In this area there has been a proliferation of proprietary products, which are incompatible among each other. At present, many of these products have been included in some international standards such as for example IEC 61158, EN 50170 and EN50254. However, although some considerable efforts to reach a form of harmonisation (e.g. the NOHA ESPRIT project), they are still incompatible. An interesting tendency originated recently is represented by the possibility of using Ethernet networks also at the device level of factory automation systems. The advantages of such a solution are indubitable, among them: a very easy integration with the higher levels, the big availability of hardware components, the possibility of accessing the device level through the Internet/Intranet. The use of Ethernet networks at the device level requires suitable real time protocols to implement the typical functions performed at this level. Unfortunately, at present a protocol of this type worldwide recognized as ‘the standard’ is not available. Also in this case, however, some proprietary products are already on the market, and there is the concrete risk of assisting to a new ‘fieldbus war’.
For this purpose it is worth mentioning that the IAONA organization encourages the growth of open networking in factory automation systems and the adoption of Ethernet at all levels. IAONA, in particular has the objective of harmonising the different protocols available for Ethernet and to prevent further incompatibilities.This paper investigates the possibility of adopting a very popular fieldbus protocol, Profibus DP, as a real time protocol for Ethernet networks employed at the device level. In practice, the paper proposes of implementing an Ethernet network with the Profibus DP protocol placed on top of its data link layer. As it will be shown, this solution, which for commodity will be later on referred to as DP-Ethernet, may be realized in a simple way. Moreover, as in this case the interface to the user applications does not change, DP-Ethernet could replace Profibus DP in any already established application. In detail, the structure of the paper is the following: Section2 reports the main features of Profibus DP.
Particular attention will be given to the functions available to the user applications and to their mapping onto data link layer services. Section 3 illustrates the features of Ethernet and of the Logical Link Control (LLC) protocol, which are extensively used by DP-Ethernet. Section 4
45