Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

Application of Microprocessor

Microprocessor

Uploaded by

sachinvish262006
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
13 views

Application of Microprocessor

Microprocessor

Uploaded by

sachinvish262006
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Chapter 8 APPLICATIONS OF MICROPROCEssoRS 8.1 INTRODUCTION Since the advent of the wP in 1971, its application domain has been ex- panding rapidly. This trend will definitely continue especially in the wake of the fact that new “Ps and Cs with superior performance are now avail- able to the system designer, e.g. Intel’s 80386, 80196, Motorola’s MC68030, M68CH11A8, and NEC’s 7800 series of microcontrollers. The purpose of this chapter is to familiarize the reader with a variety of application areas of Ps. Obviously, it is not possible to present each application in detail. We have therefore presented a brief description of several application areas and one application in detail. The application presented in detail is that of a temperature monitoring system for which the detailed software and hardware design is also presented. 8.2 A TEMPERATURE MONITORING SYSTEM One of the application areas of Ps is process control. In a typical pro- cess control application, the #P continuously monitors one or more process variables and generates outputs to the electro-mechanical elements which in turn control the process variables. This kind of control is known as closed loop control. If the 4P outputs the control variables to human operators, who in turn apply the necessary control inputs, then the control strategy is known as open loop control. In ay section we shall present an example to illustrate the use of a #P in abet oop process control, To illustrate, we shall use the 8085 as the control wP. For sim- Plicity, only one process variable, be monitored and displayed. We hardware design. via displays or line printers, namely the temperature at a point, will shall present the detailed software and 8.2.1 System Requirements : . is i Joop control system that monitors It is requii na pP-based open r el , a indi ic tba roa displays it on a four-digit sevensegment dil: The system should have the facility to inputs from a , 323 See 324 APPLICATIONS OF MICROPROCESSORS lower and upper limits of the temperature being monitored. If at an, moment these limits are violated, one of the two suitable alarms must be set. The alarms in our case are two LED displays. One of these indicates that the temperature has violated the upper limit (the HI alarm). ‘The other LED indicates that the temperature has violated the lower limit (the LO alarm) 8.2.2 Overall System Design ‘The complete system can be partitioned into three distinct, subsystems: 1. Processor and memory subsystem 2. Input subsystem 3. Output subsystem We have decided to use the 8085 yP as the control processor. We use the 2716A, 2K byte EPROM, for the program and fixed data storage. For stor- ing stacks and other variable data, we use the 6116A, 2K byte static RAM. One may as well select other widely available chips described in Chapter 4. ‘We use the 8255A Programmable Peripheral Interface, described earlier in Chapter 7, to get the necessary ports for interfacing various 1/O devices ‘The counters in the 8254 Programmable Interval Timer chip are used to provide the two timers needed in our application. 8.2.3 The Input Subsystem In order to satisfy the design requirements, the #P should be able to input the following variables: ; 1. temperature, and i 2. low and high limits. The temperature may be converted to an analog voltage by means of a suitable transducer and this output applied to an ADC. The output of the ADC may be read by the #P when desired. We assume that successive temperature readings are to be taken with a minimum of 50 ms inter-reading gap. A transducer that can be used if the temperature being measured 7 within the range of —55°C to +150°C, is the Analog Devices AD590. i has a wide power supply range of +4V to +30 V. It generates a caren output of 1 #A/Kelvin. For example, at 25°C, the output current is 2 By ‘There are several ways in which the low and high limits may be set read by the P. We shall use a very simple scheme described below. it ‘Assume that a switch is provided which may be closed by the a ae to indicate to the #P whether limit setting is desired or not. Call tl 7 the SET LIMIT switch. Another switeh, called the LO/HI switeh, can Py lised to indicate whether lower or upper limit is to be set The limi ite d may be set, by using sixteen LIMIT switches, divided into groups ©! —o 4 TEMPERATURE MONITORING SYSTEM 325 OPERATOR PANEL UMIT switches O(MsD) 1 2 foood food feasa pt Lomi ° SET Limit ° TEMPERATURE rr a ] x ALARMS % uc Figure 8.1: Operator panel for temperature monitoring system. each. Thus, a four-digit limit may be set by the operator using the BCD code. When the operator desires to change a limit, the following sequence of actions should be performed: 1. Set a 4digit limit on the sixteen LIMIT switches. Note that these must be BCD digits. 2. Set the LO/HI switch to LOW ( on which limit is to be set. 3. Close the SET LIMIT switch. close it) or HIGH (open it) depending | ‘After the processor recognizes the set limit request, it will read the limi | from the LIMIT switches and acknowledge ie ES by turing on = =D is E int, the SE’ | es ee ar sveans it again after, approximately, co “4g the appropriate limit. The LED display is was turned OD. opened. If it remains ¢! 15s and, if found closed, rese fter i it the out- ted i april 3. uaa . 8.1 exhil tput subsystem put displays, In this figure, the output produced Be ee | Beale ee. rr awitches shown ate of the SUPP 8.2.4 The Output Subsystem The output subsystem should be able to display the value of the temper. ature on a 4-digit 7-segment display. When required, the alarms LO or HI must be appropriately set. We assume that the temperature display is updated when sixteen readings have been accumulated. The average of these readings is displayed. As the output is displayed using four digits, the »P may display the successive digits one by one at a rate that would not impair the readability of the display. It would be sufficient to display the next digit 50 ms after the previous one. Thus, in a total of about 200 ms, all the digits would be displayed once in the cycle. This rate is high enough to keep the flicker in the display within tolerance. The advantage of using the display in a multiplexed mode is that only one digit driver would be required at a slight increase in software complexity. After obtaining the average temperature reading, the pP should check whether the temperature is within limits or not. If not, then the appropriate alarm lamp should be turned on, otherwise, any ON lamp must be turned off. Fig. 8.2 shows a block diagram of the system we plan to design. Fig. 8.3 and Fig. 8.4 show the flow charts embodying the overall algorithm that must be executed by the 8085 in order to achieve the desired design objectives. In the design of these flow charts, it is assumed that timers will be used for interrupting the yP to indicate the two conditions— time to input limits and time to turn off the LIMIT-SET lamp. 8.2.5 Hardware Design Let us begin the detailed hardware design of the system. To begin with, we assume that we shall not require more than 2K bytes of EPROM and 2K bytes of RAM. This decision is difficult to make so early in the design when the software has not been designed. However, we postpone a discussion on this aspect to the end of this section. Thus, we require one 2716A and one 6116A. We can now assign ad- dresses to these chips. As the 8085 jumps to location 0 when it is reset, we must have at least one instruction stored at this location. Generally, this instruction is a jump to an initialization routine for the application. This implies that location 0 must be in EPROM. Thus, we may assign addresses 40-2047 to the bytes in the 2716A and addresses 2048-4095 to the bytes in ic RAM. ast eprint address decoding circuitry, we have selected the 11 least ignil i 6-bit address for each memory chip. Bit A11 selects nificant bits of the 1 r ane ae emory chips. Fig. 8.5 shows this assignment. Oe On a aieeit, the chip select signals can be generated using an ai38 eae in Fig. 8.6. Note that bits Al2, A13, Al4, and 741 seat A TEMPE RATURE MONITORING SYSTEM 327 PANEL INTERFACE uy OPERATOR PANEL Figure 8.2: Block diagram of a microprocessor based temperature monitoring system. ‘A15 must all be 0 for the decoder to be enabled. This ensures that each memory byte has a unique address. Input/Output Subsystem Design For data input from the operator panel, the ports available in the 82554 are used. Similarly, some of the ports are used for data output to LED's. We have already described the architecture and programming of the 8255A in Chapter 7. Table 8.1 shows all the port assignments for the two 8255A chips used in our design. iming signals i One of these is We need to generate two timing signals in our system. a signal, with pepo of 15s, for scanning the SET LIMIT switch. The other signal has a period of 5s and is med for turning off the LED display indi «mit get by the operator has been recognized by the that indicates that, the limit set DY peat these EMO a i ‘ip to HP. We se the Intel 8264 times, ‘d the timer chip appear in ‘ ifferent ports an The address assign nae «tip select signals can be generated Fig. 8.7(a). Fig. 8.7(b) shows how "hr one 7418138 has been used to ensure nw re that the 10/M signal that a eS Note che address bus 1s from the memory, only i M4L8138 in te 3 mb) 8 enabled, and when it is for a port or a timer, then only the 74,8138 in Fig. 8:7(b) is enabled. ia ‘As the 8254 has not been described earlier using it in our design Jet us examine it before

You might also like