Скачать 15.92 Kb.
|
Mohsin Murad, Uzair Kamal 2006-CISE-499, 2006-CISE-4 Department of Computer Systems Engineering NWFP University of Engineering and Technology Peshawar, Pakistan Abstract----Embedded systems are the brains of today’s most digital and industrial control systems. In systems where more than one processor is incorporated, the need for multiprocessor communication often arises. Products that might exploit this feature include data terminals which receive updates from a central control system, sensor systems which are interrogated by a monitoring station and multi-axis robots with each axis under the control of its own processor, to name a few. In this paper, we are discussing a simplified prototype of industrial multiprocessor communication systems using ATMEL 89C51 (8051) microcontroller, via serial communication RS-232 protocol. We’ve constructed and simulated such a model for experimental purposes. The experimental results and the problems faced by the group in the way to get the task done are discussed. The interfacing of LM35 Temperature Sensor using ADC0804 and Simple one way DC fan to this microcontroller, and the operation of three microcontrollers in master-slave configuration is elaborated. The communication protocol developed in this paper may be extended to meet the data transfer requirements in any kind of hardware configuration.
There has been a great shift of trend towards fabrication and industrial use of embedded systems during the last three decades owing to manifold increase in their applications. In an industrial setting where there are to be two or more inter-related processing systems, the need for multiprocessor communications is indispensable. The microprocessors or microcontrollers may communicate via serial or parallel mode. Serial communication can be accomplished via many protocols e.g. RS-232, RS-422 and RS-485. Among them, RS-232 is the most common in terms of its simplicity and the maximum number of communicating processors supported. 8-bit microcontrollers are widely used mainly because they are simpler and easier to use than 16-bit or 32-bit microcontrollers, and also due to their low cost. Among them, Motorola 68HC11, Microchip PIC family, and the industry standard 8051 are prevalent. To interface these devices to the outside world, input and output devices, like Keypad and LCDs respectively, are generally used. In this paper the serial RS-232 mode of communication using 8051 is the main concern, with an emphasis on interfacing 8051 with LM35. An approach towards interfacing simple one way dc motor to 8051, without use of any driver IC is also discussed. Even though many simulators are available for the 8051 family, most of them do not support multi-microcontroller operation, nor do they simulate all the embedded peripherals, and only a few can simulate external peripherals. So, programming, simulation and debugging couldn’t be done using KEIL simulator. We have used two slaves (1 and 2) and a master controller, with nothing attached to the master, a DC motor to Slave 1, and a temperature sensor to Slave 2. The serial communication is performed via RS-232 standard.
The RS232 is a serial communication protocol that uses ground-referenced signals. A minimal “3-wire” RS-232 connection consisting only of transmits data, receives data and ground, is commonly used when the full facilities of RS-232 are not required. Even a two-wire connection (data and ground) can be used if the data flow is one way (for example, a digital postal scale that periodically sends a weight reading, or a GPS receiver that periodically sends position, if no configuration via RS-232 is necessary). Since RS232 is not compatible with today’s micro controllers, we need a line driver or a voltage converter to convert the RS232 signals to TTL voltage levels which will be acceptable to the 8051 TxD and RxD. The MAX232 converts from RS232 voltage levels to TTL voltage levels and vice versa. 8051 transmits and receives data serially at multiple baud rates, we will be configuring our controllers with baud rate of 9600.
To establish a multiprocessor communication system in a master-slave configuration, three 8051 controllers in master-slave configuration are connected. The aim is to perform master to slave communication and vice versa. A set of rules have been set, and 2-way communication is established while abiding by these rules. A visual display of the communication scheme is shown in Fig. 1. ![]() Fig.1. Signal flow diagram of system
Part Of The Document Removed For Complete Code And Presentation visit www.intcube.com/forum and request in the projects section REFERENCES [1]. Nunnally, C.E., "Teaching Microcontrollers," Proc. of the 26th Frontiers in Education Annual Conference, Vol. 1, Nov. 1996, pp. 434-436. [2]. http://www.8052.com/tutser.phtml [3]. The 8051 microcontroller and Embedded systems using assembly and C Muhammad Ali Mazidi, Janice Gillespie Mazidi http://www.avocetsystems.com/. [4]. Keil Software, dScope Debugger, http://www.keil.com/. [5]. Virtual Micro Design, Universal microprocessor Program Simulator (UMPS), http://www.vmdesign.com/. [6]. Alfredo del Río and Juan José Rodríguez Andina, UVI51: a simulation tool for teaching/learning the 8051 Microcontroller, 30th ASEE/IEEE Frontiers in Education Conference, Kansas City, 2000. [7]. J. Axelson, “Serial Port Complete: Programming and Circuits for RS-232 and RS-485 Links and Networks”, Lakeview Research, Madison, WI, 1998. [8]. Circuit Cellar INK, the Computer Applications Journal, Issue 107, June 1999. [9].www.pjrc.com/tech/8051/autobaud.html. [10]. multiprocessor communicationwww.8051projects.net/forum-t6680.html[11]. Scott Mckenzie, “The 8051 Microcontroller”, Third edition, pp 218. [12]. www.google.com/ ADC interfacing reference page. [13].www.8052.com/Tutorial: Introduction to LM35 Interfacing [14]. NAtional LM35 datasheet available at http:// nationalsemiconductor.com/ [15]. MAX232 datasheet available at http://www.maxim-ic.com |