PROJECT REPORT
ON MICROCONTROLLER BASED ANNUNCIATOR SYSTEM SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF DEGREE OF BACHELOR OF ENGINEERING IN ELECTRICAL ENGINEERING
SUBMITTED BY: INDERJEET SINGH JUVENA AGNES GOMES JYOTSANA SHARMA ROOPA VERMA VAIBHAV KALMEGH
UNDER THE GUIDANCE OF: PROF. T.S. BAGHEL H.O.D. ELECTRICAL ENGG. DEPT. B.I.T, DURG (C.G.)
(2007-2008) DEPARTMENT OF ELECTRICAL ENGINEERING BHILAI INSTITUTE OF TECHNOLOGY BHILAI HOUSE, DURG (C.G.)
CERTIFICATE OF PROJECT COMPLETION
This is to certify that Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, bonafide students of Bachelor of Engineering in Electrical Engineering, Bhilai Institute of Technology, Durg (C.G), have successfully completed their B.E. final year project titled: “MICROCONTROLLER supervision and guidance. While forwarding the project work and report on the mentioned topic above, I certify that the candidates have completed their project work in the prescribed period and the project work incorporates the result of the job done by them. BASED ANNUNCIATOR SYSTEM” under my
Project Guide:
Counter Signed by:
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
LETTER OF RECOMMENDATION
The
report
entitled
“MICROCONTROLLER
BASED
ANNUNCIATOR
SYSTEM” submitted by Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, for the partial fulfillment of the award of the B.E. degree in Electrical Engineering from Pt. Ravishankar Shukla University, Raipur (C.G.) is a record of work carries out by them on the project title. The work is comprehensive and is of sufficient standard, as found after proper evaluation. It is recommended as a creditable work for the award of the degree of B.E. in Electrical Engineering. However, the statements made in the report are the outcome of the project work carried out by the student and the undersigned will not be responsible for it if this report is presented for purposes other than award of degree.
Project Guide:
Counter Signed by:
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
CERTIFICATE OF DISSERTATION ACCEPTANCE
This is to certify that the project work entitled “MICROCONTROLLER BASED ANNUNCIATOR SYSTEM” carried out by Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, students of final year B.E. - 2008 at Bhilai Institute of Technology, Durg (C.G.) is here by accepted and approved proper evaluation as a creditable work submitted in the partial fulfillment of the requirement for awarding the degree of B.E. in Electrical Engineering from Pt. Ravishankar Shukla University, Raipur (C.G.). It is understood that by this approval, the undersigned do not necessarily endorse or approve any statement made, opinion expressed or conclusion there in, but approve the report for the purpose for which it is submitted.
Internal Examiner
External Examiner
Date……………………
ACKNOWLEDGEMENT
The feeling of acknowledging some thing and expressing it in words are two things apart. It’s our weakness but we honestly admit that when we truly wish to express our warm gratitude and indebtedness towards somebody concerned, we are always at loss of words. We gratefully take this opportunity to express our gratitude and indebtedness to Prof. B.S. Narang, Director and Dr. M.K. Kowar, Principal, Bhilai Institute of Technology, Durg. We also thank our project guide Prof. T.S. Bhagel for showing keen interest, timely encouragement, invaluable suggestions, unceasing assistance and constructive criticism at every stage of the project work. Without this help, the project would have never seen the light of the day. We pay sincere gratitude to the Management of Bhilai Institute of Technology, Durg for providing the necessary support as and when required. We also thank all the respected faculty and staff members of then institute, who directly or indirectly helped us in the completion of this project.
-Projectee.
ABSTRACT
Microcontroller based Annunciator system work as a multichannel monitoring system used for detecting the fault condition in any input and showing it by audible alarm and visual display. Here we have presented a microcontroller-based annunciator that detects up to eight faculty conditions and informs the operator about them. We have used a microcontroller 89C51, which simulate the hardware-connected to its input port by giving the instruction in software written in assembly language. For this we interface the complete hardware port. The 89C51 is a low power high performance CMOS 8 bit microcontroller with 4K-byte flash programmable and erasable chip. So on occurring of any error in program we can easily erase in a few seconds and inter corrects the instruction. For input port 8 Links is connected through 40106 IC, which is having a set of 8 NOT gates, which converts the high input to low, and vice-versa. For output port 8 resistors with LEDs and relays connected to IC ULN2803. This IC is having a set of Darlington’s pair transistors. For buffering the 89C51 to IC ULN2803, we have used IC 74LS373. This IC prevents the high current flowing through output and save it by damage. We have used three micro switches for clearing, accepting and testing purpose. These micro switches are open switch. We have used Piezobuzzer as alarm.
CONTENTS
CHAPTERS 1. INTRODUCTION 1.1 INTRODUCTION 1.2 PCB LAYOUT 1.3 COMPONENT LIST 2 IC DETAILS 2.1 IC 89C51 2.2 ULN 2803 2.3 IC 74LS373 2.4 IC 40106 2.5 IC 74LS02 3 DETAIL OF COMPONENTS 3.1 RESISTORS 3.2 DIODES 3.3 LED 3.4 TRANSFORMER 3.5 CAPACITOR 3.6 RELAY WORKING PRINCIPLE PCB FABRICATION SOLDERING APPLICATION ADVANTAGES & LIMITATIONS PRECAUTION
4 5 6 7 8 9
10 CONCLUSION 11 REFERENCE 12 MICROCONTROLLER SOURCE CODE
CHAPTER – 01
INTRODUCTION
INTRODUCTION
Today, all instrumentation systems pertaining to industrial process control as well as domestic application, like elevator control and centralized air-conditioning control, involve some type of fault-finding facility. This facility detects the faulty condition of the system and draws the attention of the operator towards it, enabling him to take suitable remedial action to ensure the proper operation of the system. One such method is annunciation in which activation of a visual or mechanical indicator takes place when a remote switch or device has been activated as a result of fault in certain art of the system. An audio alarm may also be associated with Annunciators. Here we present a microcontroller based annunciator system that detects up to eight different faculty condition of one of the eight interlock links (designated as LINK 1 through LINK 8). Eight flashing light-emitting diodes, corresponding to each of the eight links have been used as annunciator. Each annunciation also results in an audible alarm. Here only the fault persisting for more than 20 milliseconds are considered as critical and fault persisting for less than 20 milliseconds are rejected.
PCB LAYOUT
COMPONENT LIST
Semiconductors:
IC1 IC2, IC4 IC3 IC5 IC6 T1 LED1-LED8 89C51 microcontroller 74373 octal latch ULN2803 octal buffer/driver 7402 quad NOR gate CD40106 hex Schmitt trigger Inverter CL100 npn transistor Red LED
Resistors
R1-R11 R12 R13 R14 4.7 kilo-ohm 10 kilo-ohm 6.8 kilo-ohm 1.8 kilo-ohm
Capaciors
C1 C2, C3 C4-C11 10uf, 10V electrotype 22pF, ceramic disk 0.1uF ceramic disk
Miscellaneous
S1-S3 XTAL PZ1 Push-to-on switch 12 MHz crystal Piezobuzzer
CHAPTER – 02
IC DETAILS
MICROCONTROLLER DETAIL AT89C51 8-BIT MICROCONTROLLER WITH 4K BYTES FLASH
Introduction
The AT89C51 is a low-power, high performance CMOS 8-bit microcontroller with 4K bytes of Flash, programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer, which provides a highly flexible and cost-effective solution to many embedded control applications.
Features
• • • • • • • • • • Compatible with MCS-51TM Products. 4K Bytes of In-System Reprogrammable Flash Memory, Endurance: 1,000 write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes
Pin Configurations
The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex serial port, on chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
BLOCK DIAGRAM
Pin Description
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pullups. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 1 pins they are pulled high by internal pullups and can be used as inputs. As inputs, port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and verification.
Port 2
Pin is also the program pulse input (PROG) during Flash port 2 is an 8-bit bidirectional I/O port with internal pullups. The port 2 output buffers. When 1s are written to port pins they are pulled high by the internal pullups and can be used as inputs. As inputs, port 2 pins are externally being pulled low with source current (IIL) because of the internal pullups. Port 2 emits the high order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pullups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), port 2 emits the contents of the P2 special function register. Port 2 also receives the high order address bits and some control signals during Flash programming and verification.
Port 3
It is an I/O port with internal pullups. The port 3 output buffers can sink/source four TTL inputs. When 1s are written to port 3 pins, they are pulled high by the internal pullups and can be used as inputs. As inputs, port 3 pins, that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port Pin Alternate Functions
P3.0 RXD (Serial Input Port) P3.1 TXD (Serial Output Port) P3.2 INT0 (External Interrupt 0) P3.3 INT1 (External Interrupt 1) P3.4 T0 (Timer 0 External Input) P3.5 T1 (Timer 1 External Input) P3.6 WR (External Data Memory Write Strobe) P3.7 RD (External Data Memory Read Strobe) Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program s tore Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.
XTAL 1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL 2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL 1 and XTAL 2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL 2 should be left unconnected while XTAL 1 is driven. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-bytwo flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Idle Mode
In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The contents of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hardware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before this internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when idle is terminated by reset, the instruction following the one that invokes idle should not be one that writes to a port pin or to external memory.
Programming the Flash
The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12 volt) or a low voltage (VCC) program enable signal. The lowvoltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89C51 is shipped with either the highvoltage or low-voltage programming mode enabled. The AT89C51 code memory array is programmed byte-by-byte in either programming mode. To program any nonblank byte in the on-chip Flash memory, the entire memory must be erased using the Chip Erase Mode.
Programming Algorithm
Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table. To program the AT89C51, take the following steps. 1. Input the desired memory location on the address line. 2. Input the appropriate data byte on the data line. 3. Activate the correct combination of control signals. 4. Raise EA/VPP to 12V for high-voltage programming mode. 5. Pulse ALE/PROG once to program a byte in the Flash array or lock bits. The byte-write cycle is self-timed & typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.
Data Polling
The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum no PO.7. Once the write cycle has been completed, true data are valid on all outputs and the next cycle may begin. Data polling may begin any time after a write cycle has been initiated.
Ready/Busy
The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.
Program Verify
If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.
Chip Erase
The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all 1s. The chip erase operation must be executed before the code memory can be reprogrammed.
Reading the Signature Bytes
The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows: (030H) = 1EH indicates manufactured by Atmel (031H) = 51H indicates 89C51 (032H) = FFH indicates 12V programming (032H) = 05H indicates 5V programming
Programming Interface
Every code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is self timed and once initiated, will automatically time itself to completion. All major programming vendors offer worldwide support for the Atmel microcontroller series. Please contact your local programming vendor for the appropriate software revision.
ULN-2803 HIGH-VOLTAGE, HIGH CURRENT DARLINGTON ARRAYS
Featuring continuous load current ratings to 500 mA for each of the drivers, the series ULN28xxA/LW and ULQ28xxA/LW high voltage, high current Darlington arrays are ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads. Typical power loads totaling over 260 W (350 mA x 8, 95 V) can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED & incandescent displays and heaters. All devices feature opencollector outputs with integral clamp diodes.
The ULx2803A, ULx2803LW, ULx2833A and ULx2833LW have series input resistors selected for operation directly with 5 V TTL or CMOS. These devices will handle numerous interface needs – particularly those beyond the capabilities of standard logic buffers. The ULx2804A, ULx2804LW, ULx2824A and ULx2824LW have series input resistors for operation directly from 6 V to 15 V CMOS or PMOS logic outputs. The ULx2803A/LW and ULX2804A/LW are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the OFF state. Outputs may be paralleled for higher load current capability. The ULx2833A/LW and ULx2824A/LW will withstand 95 V in the OFF state. These Darlington arrays are furnished in 18-pin dual in-line plastic packages (suffix ‘A’) or 18-lead small-outline plastic packages (suffix ‘LW’). All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout. Prefix ‘ULN’ devices are rated for operation over the temperature range of -200C to +850C; prefix ‘ULQ’ devices are rated for operation up to -400C.
Features
1. TTL, DTL, PMOS or CMOS compatible inputs. 2. Output current to 50 mA. 3. Output voltage to 95 V. 4. Transient protected outputs. 5. Dual in-line package or wide-body small-outline package.
KA78XX/KA78XXA 3-TERMINAL 1A POSITIVE VOLTAGE REGULATOR
Features
• • • • • Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24 V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection
Description
The KA78XX/KA78XXA series of three-terminal regulator are available in the TO – 220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents.
DM74LS373, 3-STATE OCTAL D-TYPE TRANSPARENT LATCHES & EDGE-TRIGGERED FLIP-FLOPS
General Descriptions
These 8-bit registers feature totem-pole 3-state outputs designed specifically for driving highly-capacitive or relatively low-impedance loads. The high impedance state and increased high-logic level drive provide these registers with the capability of being connected directly to and driving the bus lines in a bus organized system without need for interface or pull-up components. They are particularly attractive for implementing buffer registers, I/O ports, bidirectional bus drivers and working registers. The eight latches of the DM74LS373 are transparent D-type latches meaning that while the enable (G) is HIGH the Q outputs will follow the data (D) inputs. When the enable is taken LOW, the output will be latched at the level of the data that was set up. The eight flip-flops of the DM74LS373 are edge-triggered Dtype flip-flops. On the positive transition of the clock, the Q outputs will be set to the logic states that were set up at the D inputs. A buffered output control input can be used to place the eight outputs in either a normal logic state (HIGH or LOW logic levels) or a high-impedance. In the high impedance state the outputs neither load nor drive the bus lines significantly. The output control does not affect the internal operation of the latches or flip-flops. That is, the old data can be retained or new data can be entered even while the outputs are OFF.
Features
• • • • Choice of 8 latches or 8 D-type flip-flops in a single package 3-STATE bus-driving outputs Full parallel-access for loading Buffered control inputs
•
P-N-P inputs reduce D-C loading on data lines
CD 40106 BC HEX SCHMITT TRIGGER INVERTER
General Description
The CD40106B Hex Schmitt Trigger is a monolithic complimentary MOS (CMOS) integrated circuit constructed with N or P-channel enhancement transistors. The positive and negative going threshold voltages, VTa and VTb, show low variation with respect to temperature (typ 0.0005 V/?C at VDD e 10V), and hysteresis, VTa b VTb t 0.2 VDD is guaranteed. All inputs are protected from damage due to static discharge by diode clamps to VDD and VSS. Features • • Wide supply voltage range of 3V to 15V High noise immunity of 0.7 VDD (typ.) Low power Fan out of 2 driving 74L TTL compatibility of 1 driving 74LS Hysteresis 0.4 VDD (typ.) 0.2 VDD guaranteed Equivalent to MM54C14 / MM74C14 Equivalent to MC14584B
•
• • • • •
IC74LS02
Quad 2-input Positive Nor Gate
The LS02 bipolar, NPN, sealed-junction, silicon integrated circuit. It is manufacued in low-power Schottky technology and available in wire-bonded, 14 pin plastic DIP surface mount package.
CHAPTER – 03
DETAIL OF COMPONENTS
DETAILS OF COMPONENTS
5.1 Resistors
Resistors are the electronic components used to control the current passing through the circuit. They are calibrated in ohms. In other words resistances are circuit elements having the function of introducing electrical resistance into the circuit. There are three basic types: a) Fixed resistor b) Rheostat c) Potentiometer A fixed resistor is a two terminal resistor whose electrical resistance is constant. A rheostat is a resistor that can bee changed in resistance value without opening the circuit to make adjustments. A potentiometer is an adjustable resistor with three terminals, one at each end of the resistor element and third movable along its length. COLOUR CODE BLACK BROWN RED ORANGE YELLOW GREEN BLUE FIGURE NUMBER 0 1 2 3 4 5 6 TOLERANCE --------
VOILET GRAY WHITE GOLD SILVER NO COLOUR
7 8 9 ----
---5% 10% 20%
5.2 DIODES
These devices allow flowing current in only one direction. These devices are also called unidirectional devices. Earlier these devices were made of vacuum tubes. Now a day these are semiconductor solid-state devices. These are PN junction devices. The PN means doping of semiconductor with positive or negative valence atoms. The silicon diodes have knee voltage drop of 0.7 V i.e. forward biased voltage drop whereas germanium diodes have 0.3 V drop. The different diodes are used for different purposes. The diodes work in forward biased condition or reverse biased conditions. These are available with different current rating, voltage rating, power rating and are used for different applications. The diodes of higher wattages are of bigger sizes.
5.3 Light Emitting Diodes
In a forward biased diode, free electrons cross the junction and fall into holes. As these electrons falls from a higher to lower energy level, they radiate energy. In ordinary diodes, this energy goes of in the form of heat. But in the Light Emitting Diode (LED), the energy radiates as light. LEDs that radiate red, green, yellow, blue, orange or infra-red are manufactured by using elements like gallium, arsenic and phosphorous. LEDs that produce visible radiations are useful with instruments, calculators etc. the infra-red LED finds application in burglar systems and other areas requiring invisible radiations. The seven segments display uses seven LEDs.
5.4 Transformers
These are the devices which converts the primary AC voltage to different secondary AC voltages. If the secondary voltage is higher than primary voltage then the transformer is called step up transformer. If the secondary voltage is less than primary, then it is called stepdown transformer. If secondary voltage is same as primary then it is called unity transformer. This unity transformer is also used as isolation transformer. These devices are highly efficient up to 99.99 % i.e. very low power loss. The transformers are required for making DC supply, tuning circuit etc. the current rating of primary and secondary winding determines the SWG gauge of the copper wire.
5.5 Capacitors
These are the storage devices but have in built resistance that’s why the storage voltage does not last for longer period. The use of capacitor is for tuning the circuit, filtering the noise to ground, creating the timing pulse as in our case. The capacitors can not be fabricated on ICs because of the technical difficulty. The capacitors are selected based on capacitance and voltage rating. Higher the voltage, higher the size of the capacitor. These are available in following types. Electrolytic Capacitor These capacitors have electrolyte ass the dielectric between the two plates. These are available with polarity ‘+’ and ‘-’. These are available with vertical mount or horizontal mount configuration. Paper capacitor These capacitors are available in low range of capacitance. The paper is used as dielectric media between the two plates. Mica Capacitor These capacitors are available in low range of capacitance. The mica is used as dielectric media between the two plates. Disc Capacitor These are available from 12pF to 10000µF.
5.6 Relays
These are an electromagnetic device which make or breaks the contacts as per the control voltage. These are solid-state relays, which do not consume much power for their operation, but are not available in higher current rating. Relays are being substituted by SCRs also called as thyristors for ON/OFF control.
CHAPTER – 04
WORKING PRINCIPLE
WORKING PRINCIPLE
There are eight input links in the PCB, which are connected to the 5V circuit. These links are connected to 40106 IC, which is having a set of NOT gates. When there are no inputs all the links are at logic 1, which is a 5V voltage. The logic 1 is converted in to logic 0 after passing through 40106 IC. Then the output of 40106 IC is given to the 89C51 microcontroller. Microcontroller 89C51 is one which is programmed for scanning process with 1 microsecond’s clock pulse. Means microcontroller checks each of its input at every 1 microsecond. After completing the one cycle, it checks the format, which is in the input, with the stored or programmed format and gives the meaning for further processing. The output of 89C51 is given to buffer IC74LS373 then ULN2803 IC which is connected to set of LEDs and relays which gives the final output. We have used piezobuzzer as alarm. There are 3 switches i.e. ACCEPT, CLEAR and TEST in the PCB. These are micro switches. TEST switch is used for testing the LED and buzzer. ACCEPT switch is used for accepting the fault condition. In this situation alarm stops but LED remains in ON state until we remove the fault. Let us take an example that there is an error or fault in third link. In this situation link 3 is shorted and having logic 0 and other link is having logic 1. When it passes from 40106 IC, all the link except link 3 shows the logic 0 at the input of 89C51 microcontroller. But link 2 shows logic 1. Microcontroller compares the generated format with the stored format. It gets the format 00100000, which means link 3 is having fault. Microcontroller gives this information to ULN2803. Then ULN2803 start the buzzer and gives the ON state to the third LED. That means link 3 is having fault. For accepting the fault we push the ACCEPT button. After pushing the ACCEPT button alarm stops but LED remains in ON state. After removing the fault, we reset the LEDs with CLEAR button.
CHAPTER – 05
P.C.B FABRICATION
PCB FABRICATION
7.1 Schematic Preparation
Schematic is a circuit that is drawn either with the help of software or by manually on paper with standard symbols. If the circuit is big and complicated then multi layer schematic is made otherwise single layer schematic is made. The schematic is drawn with colored pen to indicate the different layers, power lines, single lines and ground lines.
7.2 Artwork Preparation
After making the schematic on a paper, it is duplicated on transparent acrylic plastic sheet. This circuit is called artwork. The artwork is made either bigger or smaller or same size of the desired PCB. The artwork is drawn with different colour tapes to identify the single lines, power lines and ground lines. The artwork should be proper without leaving any connection or making any excess connection or shorts.
7.3 Etching of Copper Cladded Board
The films are put on copper cladded board and the board is exposed to light. The time of exposure depends on many factors. After the exposure of the board, it is rinsed in the etching solution. During the etching operation, the exposed copper gets dissolved in the solution whereas unexposed copper remains intact with the board. This unexposed copper in turn makes the pattern what we see on PCB. The board is then washed with gentle brush.
7.4 Drilling of Holes
The PCB is now ready for drilling operation. The holes are now drilled at all places wherever the components are to be put. The size of the drills should not be either more than the required or less than the required. If the hole is large then it will be difficult to solder and lot of lead will be consumed. If the hole is small then component will not be inserted easily.
7.5 Tinning of PCB
The PCB is tinned after putting the mask on PCB. This is done to insulate the pattern and avoid any short. The mask covers the areas where the soldering is to be done.
7.6 PCB Testing
PCB is checked for all interconnections through multimeter whether the tracks are broken or short at any place; thereby correction is done through soldering.
7.7 Assembling of the Unit
Components are assembled in proper direction and avoid the touching of component to one another. Heat sink is to be put wherever required with a heat sink compound.
CHAPTER – 06
SOLDERING
SOLDERING
Soldering is a process of joining two metallic conductors. The joint where the two metallic conductors are to be joined or fused is heated with a device called soldering iron and then alloy of tin & lead called Solder is applied which melts and covers the joint. The solder cools & solidifies quickly to ensure a good & durable connection between the joint metals. Covering the joint with solder also prevents oxidation.
HOW TO SOLDER:
Good solder practices are very important for assembling for any electronics circuit. A poorly soldered joint or connection in electronic circuits is the cause of most service problems. Given below are some important steps to be followed in good & correct soldering process.
1. Use of correct type of soldering iron & solder avoid the use of excessive flux. 2. Keep the soldering hot during the working period and let it rest on its stand when it is not in use.
3.
All component leads & solder wires should be thoroughly cleaned to remove rust & dust before soldering.
4. Enough heat is applied to the joint so that the solder metal flows freely over the joint. 5. Over heating of components in PCB should be avoided. Over heating may result in damage to PCB components. 6. Too much solder is not used to avoid short circuits between conduction paths on a PCB.
CHAPTER – 07
APPLICATION
APPLICATIONS
9.1 In Substation:
Suppose there are 8 input lines of 132/11KV in any substation and if there is any fault in these lines due to flow of high current, lines will b tripped . For detecting these faulty conditions we can use an annunciator.
9.2 For Industrial Purpose:
In any industry suppose the pressure of water is set in a particular level then if there is any change in pressure we can easily detect this change through annunciator.
9.3 For Domestic Purpose:
We can also use annunciator in home for safety purpose like checking whether the door is closed or not.
9.4 In Any Big Building:
In any hotel or building if there is fire in any room, then we can detect it through annunciator with fire sensor.
CHAPTER – 08
ADVANTAGES & LIMITATIONS
10.1 ADVANTAGES
• • • • Its initial cost is very low. It’s very reliable due to presence of micro controller. It can be universally used i.e. for industrial purposes, domestic purposes etc. Power consumption of the detector is very less i.e. it’s operating at very low voltage of 5V & can drive heavy loads through use of contractor, relays or small rating transformers etc.
10.2 LIMITATION
Limitation of our project is that there are only eight inputs & eight outputs. For increasing the outputs we can use Demuxing process. For increasing the inputs we can use Muxing process.
CHAPTER – 09
PRECAUTIONS
PRECAUTIONS
• • • •
The quality of soldering of component on PCB should be of good quality. The power of supply should not exceed 5Volts. The component fitted on PCB should be loosely fitted. Voltage should be checked at each point.
•
The solder metal has 60-40 combination and for all soldering, a good solder joint has always a shining bead like appearance.
•
IC are fitted with heat sink so that the heat generated in it should be taken by this heat sink.
CHAPTER – 10
CONCLUSION
CONCLUSION
The Micro controller Based Annunciator System has a versatile application. We can use it at each place wherever the fault detection is required. We know that fault checking is must in each field so we can say that it is a very useful device.
CHAPTER – 11
REFERENCE
REFERENCE
• •
ELECTRONICS PROJECT DIGITAL LOGIC AND COMPUTER DESIGN COMPUTER CIRCUIT ARCHITECTURE DIGITAL COMPUTER ELECTRONICS
VOL-10
MORRIS MANO
•
MORRIS MANO
•
ALBERT PAUL MALVINO KENNETH J.AYALA
• •
THE 8051 MICROCONTROLLER ELECTRONICS FOR YOU
CHAPTER – 12
MICROCONTROLLER SOURCE CODE
SIM51 Disassembler
Address 0000 0010 0013 0015 0017 0019 001A 001D 001E 0020 0022 0024 0027 0029 002C 002E 0030 0031 0033 0036 0037 Opcode 020010 758130 D2B0 7B00 7C00 E4 908000 F0 D2B3 A2B3 400A 7590FF E590 B40013 80E2 74FF F0 C2B0 I200ES E4 F0 Label LJMP INT INT: MOV SP,#30H SETB P3.0 MOV R3,#00H MOV R4,#00H CLR A START: MOV DPTR,#8000H MOVX @DPTR,A SETB P3.3 MOV C,P3.3 JC TEST MOV P1,#FFH MOV A,P1 CJNE A,#00H, SCAN SJMP INT TEST: MOV A,#00FH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOVX @DPTR,A Preset The Stack Pointer Disable The Sound Clear Register Clear Register Clear Accn Data Ptr Is Assigned With Led Port Address Disable All Leds Set The Input To Read Read The Test Input Check For Test Input Set Port 1 To Read The Input Fault Read The Input Fault Check For Fault Jump To Initial Load The Data To Lit All Leds O/P At Led Port Enable Sound Delay For Blink & Beep Load The Data To Put off All Leds O/P At Led Port Mnemonics Comments
0038 003A 003D 003F 0042 0044 0045 0047 0048 0049 004B 004E 004F 0050 0052 0055 0057 0059 005B 005D 005F 0061 0063
D2B0 I200ES 80DB 7590FF E590 FB 60C9 EB F0 C2B0 I200ES E4 F0 D2B0 I200ES D2B4 A2B4 401A D2B3 A2B3 4002 80DC 74FF
SETB P3.0 LCALL DELAY SJMP START SCAN: MOV P1,#0FFH MOV A,P1 MOV R3,A JZ INT SHOW: MOV A,R3 MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOVX @DPTR,A SETB P3.0 LCALL DELAY CHKACP: SETB P3.4 MOV C,P3.3 JC ACCEPT CT1: SETB P3.3 MOV C,P3.3 JC TEST1 SJMP SCAN TEST1: MOV A,#00FFH
Disable Sound Delay For Blink & Beep Jump To Start Set Port To Read Fault Read The Fault Save For Future Use Check For Fault Load Detected Fault O/P At Led Port Enable Sound Delay For Blink & Beep Data For Led Off O/P At Led Port Disable Sound Delay For Blink & Beep Set To Read Accept Input Read Test Input Check For Accept Input Set To Read Test Input Read Test Input Check For Test Input Jump For Scan Routine Data For Led Lit
0065 0066 0068 006B 006C 006D 006E 0070 0073 0075 0078 007A 007B 007C 007E 0081 0083 0084 0085 0086 0087 0088 008A
F0 C2B0 I200ES E4 4B F0 D2B0 I200ES 80CA 7590FF E590 4B 6B 603B 7590FF E590 FC 4B EB 4C F0 C2B0 I200ES
MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY SJMP SCAN
O/P At Led Port Enable Sound Delay For Blink & Beep Data For Led Off Combine With Already Found Fault O/P At Led Port Disable Sound Delay For Blink & Beep Jump For Scan Routine
ACCEPT: MOV P1,#0FFH Set To Read Input Fault MOV A,P1 ORL A,R3 XRL A,R3 JZ CHKCLR2 MOV P1,#0FFH MOV A,P1 MOV R4,A ORL A,R3 MOV A,R3 ORL A,R4 MOVX @DPTR,A CLR P3.0 LCALL DELAY Read The Fault Combine With Already Found Fault Set Flag To Find New Fault There Is No New Fault,Check For Clear Input Set To Read Input Read Input Save For Future Use Combine With Already Found Fault Load Already Found Fault Combine With New Fault O/P At Led Port Enable Sound Delay For Blink & Beep
008D 008E 008F 0090 0092 0095 0097 0099 009B 009D 009F 00A1 00A3 00A5 00A6 00A8 00AB 00AC 00AD 00AE 00AF 00B1 00B4
E4 4B F0 D2B0 I200ES D2B4 A2B4 401B D2B4 A2B3 4002 80D2 74FF F0 C2B0 I200ES E4 EB 4C F0 D2B0 I200ES 80BF
CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY CHKACP1: SETB P3.4 MOV C,P3.4 JC CHKCLR1 CHKACP1: SETB P3.4 MOV C,P3.3 JC TEST2 SJMP ACCEPT TEST2: MOVA,#00FFH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOV A,R3 ORL A,R4 MOVX @DPTR,A SETB P3.0 LCALL DELAY SJMP ACCEPT
Data For Led Off Combine With Already Found Fault O/P At Led Port Disable Sound Delay For Blink & Beep Set To Read Accept Input Read Accept Input Check For Accept Input Set To Read Accept Input Read Accept Input Check The Test Input Jump To Accept Routine Data To Lit Leds O/P At Led Port Enable Sound Delay For Blink & Beep Data To Off Led Combine With Already Found Fault Combine With New Fault O/P At Led Port Disable Sound Delay For Blink & Beep Jump To Accept Routine
00B6 00B7 00B8 00B9 00BA 00BB 00BD 00BF 00C1 00C3 00C5 00C7 00C9 00CB 00CD 00CE 00D0 00D3 00D4 00D5 00D6 00D8 00DB
EB 4C FB EB F0 D2B0 D2b5 A2B5 401B D2B3 A2B3 4002 80AA 74FF F0 C2B0 I200ES E4 4B F0 D2B0 I200ES 020075
CHKCLR1: MOV A,R3 ORL A,R4 MOV R3,A CHKCLR2: MOV A,R3 MOVX @DPTR,A SETB P3.0 SETB P3.5 MOV C,P3.5 JC CLEAR CT3: SETB P3.3 MOV C,P3.3 JC TEST3 SJMP ACCEPT TEST3: MOV A,#00FFH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY LJMP ACCEPT
Load The Already Found Fault Combine With New Fault Save For Future Use Load Already Found Fault O/P At Led Ports Disable Sound Set To Read Clear Fault Read Clear Fault Check For Clear Fault Set To Read Test Input Read Test Input Check For Test Input Jump To Accept Routine Data To Lit Leds O/P At Led Port Enable Sound Delay For Blink & Beep Data Les Off Combine With Fault Found O/P At Led Port Disable Sound Delay For Blink & Beep Jump To Accept Routine
00DE 00DF 00E0 00E2 00E5 00E7 00E9 00EB 00ED
E4 F0 D2B0 020010 7DFF 7EFF DEFE DDFA 22
CLR A MOVX @DPTR,A SETB P3.0 LJMP INT DELAY: MOV R5,#00FFH D1: MOV R6,#00FFH D2: DJNZ R6,D2 DJNZ R5,D1 RET
Data Led Off O/P At Led Port Disable Sound Jump To Initial Routine Count For Delay Count For Delay Decrement Count Decrement Count Return From Delay Routine
SYMBOL TABLE: INT – 0010 START - 001A TEST – 002E SCAN - 003F SHOW – 0047 CHKACP – 0055 CT1 – 005B TEST1 – 0063 ACCEPT – 0075 CHKACP1 – 0095 CT2 – 009B TEST2 – 00A3 CHKCLR1 – 00B6 CHKCLR2 – 00B9 CT3 – 00C3 TEST3 – 00CB CLEAR – 00DE DELAY – 00E5 D1 – 00E7 D2 – 00E9
doc_932709246.doc
ON MICROCONTROLLER BASED ANNUNCIATOR SYSTEM SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF DEGREE OF BACHELOR OF ENGINEERING IN ELECTRICAL ENGINEERING
SUBMITTED BY: INDERJEET SINGH JUVENA AGNES GOMES JYOTSANA SHARMA ROOPA VERMA VAIBHAV KALMEGH
UNDER THE GUIDANCE OF: PROF. T.S. BAGHEL H.O.D. ELECTRICAL ENGG. DEPT. B.I.T, DURG (C.G.)
(2007-2008) DEPARTMENT OF ELECTRICAL ENGINEERING BHILAI INSTITUTE OF TECHNOLOGY BHILAI HOUSE, DURG (C.G.)
CERTIFICATE OF PROJECT COMPLETION
This is to certify that Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, bonafide students of Bachelor of Engineering in Electrical Engineering, Bhilai Institute of Technology, Durg (C.G), have successfully completed their B.E. final year project titled: “MICROCONTROLLER supervision and guidance. While forwarding the project work and report on the mentioned topic above, I certify that the candidates have completed their project work in the prescribed period and the project work incorporates the result of the job done by them. BASED ANNUNCIATOR SYSTEM” under my
Project Guide:
Counter Signed by:
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
LETTER OF RECOMMENDATION
The
report
entitled
“MICROCONTROLLER
BASED
ANNUNCIATOR
SYSTEM” submitted by Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, for the partial fulfillment of the award of the B.E. degree in Electrical Engineering from Pt. Ravishankar Shukla University, Raipur (C.G.) is a record of work carries out by them on the project title. The work is comprehensive and is of sufficient standard, as found after proper evaluation. It is recommended as a creditable work for the award of the degree of B.E. in Electrical Engineering. However, the statements made in the report are the outcome of the project work carried out by the student and the undersigned will not be responsible for it if this report is presented for purposes other than award of degree.
Project Guide:
Counter Signed by:
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
(Prof. T.S. Bhagel)
Head of Deptt. Deptt. Of Electrical Engg. B.I.T., Durg
CERTIFICATE OF DISSERTATION ACCEPTANCE
This is to certify that the project work entitled “MICROCONTROLLER BASED ANNUNCIATOR SYSTEM” carried out by Mr. Inderjeet Singh, Ku. Juvena Agnes Gomes, Ku. Jyotsana Sharma, Ku. Roopa Verma and Mr. Vaibhav Kalmegh, students of final year B.E. - 2008 at Bhilai Institute of Technology, Durg (C.G.) is here by accepted and approved proper evaluation as a creditable work submitted in the partial fulfillment of the requirement for awarding the degree of B.E. in Electrical Engineering from Pt. Ravishankar Shukla University, Raipur (C.G.). It is understood that by this approval, the undersigned do not necessarily endorse or approve any statement made, opinion expressed or conclusion there in, but approve the report for the purpose for which it is submitted.
Internal Examiner
External Examiner
Date……………………
ACKNOWLEDGEMENT
The feeling of acknowledging some thing and expressing it in words are two things apart. It’s our weakness but we honestly admit that when we truly wish to express our warm gratitude and indebtedness towards somebody concerned, we are always at loss of words. We gratefully take this opportunity to express our gratitude and indebtedness to Prof. B.S. Narang, Director and Dr. M.K. Kowar, Principal, Bhilai Institute of Technology, Durg. We also thank our project guide Prof. T.S. Bhagel for showing keen interest, timely encouragement, invaluable suggestions, unceasing assistance and constructive criticism at every stage of the project work. Without this help, the project would have never seen the light of the day. We pay sincere gratitude to the Management of Bhilai Institute of Technology, Durg for providing the necessary support as and when required. We also thank all the respected faculty and staff members of then institute, who directly or indirectly helped us in the completion of this project.
-Projectee.
ABSTRACT
Microcontroller based Annunciator system work as a multichannel monitoring system used for detecting the fault condition in any input and showing it by audible alarm and visual display. Here we have presented a microcontroller-based annunciator that detects up to eight faculty conditions and informs the operator about them. We have used a microcontroller 89C51, which simulate the hardware-connected to its input port by giving the instruction in software written in assembly language. For this we interface the complete hardware port. The 89C51 is a low power high performance CMOS 8 bit microcontroller with 4K-byte flash programmable and erasable chip. So on occurring of any error in program we can easily erase in a few seconds and inter corrects the instruction. For input port 8 Links is connected through 40106 IC, which is having a set of 8 NOT gates, which converts the high input to low, and vice-versa. For output port 8 resistors with LEDs and relays connected to IC ULN2803. This IC is having a set of Darlington’s pair transistors. For buffering the 89C51 to IC ULN2803, we have used IC 74LS373. This IC prevents the high current flowing through output and save it by damage. We have used three micro switches for clearing, accepting and testing purpose. These micro switches are open switch. We have used Piezobuzzer as alarm.
CONTENTS
CHAPTERS 1. INTRODUCTION 1.1 INTRODUCTION 1.2 PCB LAYOUT 1.3 COMPONENT LIST 2 IC DETAILS 2.1 IC 89C51 2.2 ULN 2803 2.3 IC 74LS373 2.4 IC 40106 2.5 IC 74LS02 3 DETAIL OF COMPONENTS 3.1 RESISTORS 3.2 DIODES 3.3 LED 3.4 TRANSFORMER 3.5 CAPACITOR 3.6 RELAY WORKING PRINCIPLE PCB FABRICATION SOLDERING APPLICATION ADVANTAGES & LIMITATIONS PRECAUTION
4 5 6 7 8 9
10 CONCLUSION 11 REFERENCE 12 MICROCONTROLLER SOURCE CODE
CHAPTER – 01
INTRODUCTION
INTRODUCTION
Today, all instrumentation systems pertaining to industrial process control as well as domestic application, like elevator control and centralized air-conditioning control, involve some type of fault-finding facility. This facility detects the faulty condition of the system and draws the attention of the operator towards it, enabling him to take suitable remedial action to ensure the proper operation of the system. One such method is annunciation in which activation of a visual or mechanical indicator takes place when a remote switch or device has been activated as a result of fault in certain art of the system. An audio alarm may also be associated with Annunciators. Here we present a microcontroller based annunciator system that detects up to eight different faculty condition of one of the eight interlock links (designated as LINK 1 through LINK 8). Eight flashing light-emitting diodes, corresponding to each of the eight links have been used as annunciator. Each annunciation also results in an audible alarm. Here only the fault persisting for more than 20 milliseconds are considered as critical and fault persisting for less than 20 milliseconds are rejected.
PCB LAYOUT
COMPONENT LIST
Semiconductors:
IC1 IC2, IC4 IC3 IC5 IC6 T1 LED1-LED8 89C51 microcontroller 74373 octal latch ULN2803 octal buffer/driver 7402 quad NOR gate CD40106 hex Schmitt trigger Inverter CL100 npn transistor Red LED
Resistors
R1-R11 R12 R13 R14 4.7 kilo-ohm 10 kilo-ohm 6.8 kilo-ohm 1.8 kilo-ohm
Capaciors
C1 C2, C3 C4-C11 10uf, 10V electrotype 22pF, ceramic disk 0.1uF ceramic disk
Miscellaneous
S1-S3 XTAL PZ1 Push-to-on switch 12 MHz crystal Piezobuzzer
CHAPTER – 02
IC DETAILS
MICROCONTROLLER DETAIL AT89C51 8-BIT MICROCONTROLLER WITH 4K BYTES FLASH
Introduction
The AT89C51 is a low-power, high performance CMOS 8-bit microcontroller with 4K bytes of Flash, programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer, which provides a highly flexible and cost-effective solution to many embedded control applications.
Features
• • • • • • • • • • Compatible with MCS-51TM Products. 4K Bytes of In-System Reprogrammable Flash Memory, Endurance: 1,000 write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes
Pin Configurations
The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex serial port, on chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
BLOCK DIAGRAM
Pin Description
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pullups. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 1 pins they are pulled high by internal pullups and can be used as inputs. As inputs, port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and verification.
Port 2
Pin is also the program pulse input (PROG) during Flash port 2 is an 8-bit bidirectional I/O port with internal pullups. The port 2 output buffers. When 1s are written to port pins they are pulled high by the internal pullups and can be used as inputs. As inputs, port 2 pins are externally being pulled low with source current (IIL) because of the internal pullups. Port 2 emits the high order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pullups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), port 2 emits the contents of the P2 special function register. Port 2 also receives the high order address bits and some control signals during Flash programming and verification.
Port 3
It is an I/O port with internal pullups. The port 3 output buffers can sink/source four TTL inputs. When 1s are written to port 3 pins, they are pulled high by the internal pullups and can be used as inputs. As inputs, port 3 pins, that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port Pin Alternate Functions
P3.0 RXD (Serial Input Port) P3.1 TXD (Serial Output Port) P3.2 INT0 (External Interrupt 0) P3.3 INT1 (External Interrupt 1) P3.4 T0 (Timer 0 External Input) P3.5 T1 (Timer 1 External Input) P3.6 WR (External Data Memory Write Strobe) P3.7 RD (External Data Memory Read Strobe) Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program s tore Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.
XTAL 1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL 2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL 1 and XTAL 2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL 2 should be left unconnected while XTAL 1 is driven. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-bytwo flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Idle Mode
In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The contents of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hardware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before this internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when idle is terminated by reset, the instruction following the one that invokes idle should not be one that writes to a port pin or to external memory.
Programming the Flash
The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12 volt) or a low voltage (VCC) program enable signal. The lowvoltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89C51 is shipped with either the highvoltage or low-voltage programming mode enabled. The AT89C51 code memory array is programmed byte-by-byte in either programming mode. To program any nonblank byte in the on-chip Flash memory, the entire memory must be erased using the Chip Erase Mode.
Programming Algorithm
Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table. To program the AT89C51, take the following steps. 1. Input the desired memory location on the address line. 2. Input the appropriate data byte on the data line. 3. Activate the correct combination of control signals. 4. Raise EA/VPP to 12V for high-voltage programming mode. 5. Pulse ALE/PROG once to program a byte in the Flash array or lock bits. The byte-write cycle is self-timed & typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.
Data Polling
The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum no PO.7. Once the write cycle has been completed, true data are valid on all outputs and the next cycle may begin. Data polling may begin any time after a write cycle has been initiated.
Ready/Busy
The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.
Program Verify
If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.
Chip Erase
The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all 1s. The chip erase operation must be executed before the code memory can be reprogrammed.
Reading the Signature Bytes
The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows: (030H) = 1EH indicates manufactured by Atmel (031H) = 51H indicates 89C51 (032H) = FFH indicates 12V programming (032H) = 05H indicates 5V programming
Programming Interface
Every code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is self timed and once initiated, will automatically time itself to completion. All major programming vendors offer worldwide support for the Atmel microcontroller series. Please contact your local programming vendor for the appropriate software revision.
ULN-2803 HIGH-VOLTAGE, HIGH CURRENT DARLINGTON ARRAYS
Featuring continuous load current ratings to 500 mA for each of the drivers, the series ULN28xxA/LW and ULQ28xxA/LW high voltage, high current Darlington arrays are ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads. Typical power loads totaling over 260 W (350 mA x 8, 95 V) can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED & incandescent displays and heaters. All devices feature opencollector outputs with integral clamp diodes.
The ULx2803A, ULx2803LW, ULx2833A and ULx2833LW have series input resistors selected for operation directly with 5 V TTL or CMOS. These devices will handle numerous interface needs – particularly those beyond the capabilities of standard logic buffers. The ULx2804A, ULx2804LW, ULx2824A and ULx2824LW have series input resistors for operation directly from 6 V to 15 V CMOS or PMOS logic outputs. The ULx2803A/LW and ULX2804A/LW are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the OFF state. Outputs may be paralleled for higher load current capability. The ULx2833A/LW and ULx2824A/LW will withstand 95 V in the OFF state. These Darlington arrays are furnished in 18-pin dual in-line plastic packages (suffix ‘A’) or 18-lead small-outline plastic packages (suffix ‘LW’). All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout. Prefix ‘ULN’ devices are rated for operation over the temperature range of -200C to +850C; prefix ‘ULQ’ devices are rated for operation up to -400C.
Features
1. TTL, DTL, PMOS or CMOS compatible inputs. 2. Output current to 50 mA. 3. Output voltage to 95 V. 4. Transient protected outputs. 5. Dual in-line package or wide-body small-outline package.
KA78XX/KA78XXA 3-TERMINAL 1A POSITIVE VOLTAGE REGULATOR
Features
• • • • • Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24 V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection
Description
The KA78XX/KA78XXA series of three-terminal regulator are available in the TO – 220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents.
DM74LS373, 3-STATE OCTAL D-TYPE TRANSPARENT LATCHES & EDGE-TRIGGERED FLIP-FLOPS
General Descriptions
These 8-bit registers feature totem-pole 3-state outputs designed specifically for driving highly-capacitive or relatively low-impedance loads. The high impedance state and increased high-logic level drive provide these registers with the capability of being connected directly to and driving the bus lines in a bus organized system without need for interface or pull-up components. They are particularly attractive for implementing buffer registers, I/O ports, bidirectional bus drivers and working registers. The eight latches of the DM74LS373 are transparent D-type latches meaning that while the enable (G) is HIGH the Q outputs will follow the data (D) inputs. When the enable is taken LOW, the output will be latched at the level of the data that was set up. The eight flip-flops of the DM74LS373 are edge-triggered Dtype flip-flops. On the positive transition of the clock, the Q outputs will be set to the logic states that were set up at the D inputs. A buffered output control input can be used to place the eight outputs in either a normal logic state (HIGH or LOW logic levels) or a high-impedance. In the high impedance state the outputs neither load nor drive the bus lines significantly. The output control does not affect the internal operation of the latches or flip-flops. That is, the old data can be retained or new data can be entered even while the outputs are OFF.
Features
• • • • Choice of 8 latches or 8 D-type flip-flops in a single package 3-STATE bus-driving outputs Full parallel-access for loading Buffered control inputs
•
P-N-P inputs reduce D-C loading on data lines
CD 40106 BC HEX SCHMITT TRIGGER INVERTER
General Description
The CD40106B Hex Schmitt Trigger is a monolithic complimentary MOS (CMOS) integrated circuit constructed with N or P-channel enhancement transistors. The positive and negative going threshold voltages, VTa and VTb, show low variation with respect to temperature (typ 0.0005 V/?C at VDD e 10V), and hysteresis, VTa b VTb t 0.2 VDD is guaranteed. All inputs are protected from damage due to static discharge by diode clamps to VDD and VSS. Features • • Wide supply voltage range of 3V to 15V High noise immunity of 0.7 VDD (typ.) Low power Fan out of 2 driving 74L TTL compatibility of 1 driving 74LS Hysteresis 0.4 VDD (typ.) 0.2 VDD guaranteed Equivalent to MM54C14 / MM74C14 Equivalent to MC14584B
•
• • • • •
IC74LS02
Quad 2-input Positive Nor Gate
The LS02 bipolar, NPN, sealed-junction, silicon integrated circuit. It is manufacued in low-power Schottky technology and available in wire-bonded, 14 pin plastic DIP surface mount package.
CHAPTER – 03
DETAIL OF COMPONENTS
DETAILS OF COMPONENTS
5.1 Resistors
Resistors are the electronic components used to control the current passing through the circuit. They are calibrated in ohms. In other words resistances are circuit elements having the function of introducing electrical resistance into the circuit. There are three basic types: a) Fixed resistor b) Rheostat c) Potentiometer A fixed resistor is a two terminal resistor whose electrical resistance is constant. A rheostat is a resistor that can bee changed in resistance value without opening the circuit to make adjustments. A potentiometer is an adjustable resistor with three terminals, one at each end of the resistor element and third movable along its length. COLOUR CODE BLACK BROWN RED ORANGE YELLOW GREEN BLUE FIGURE NUMBER 0 1 2 3 4 5 6 TOLERANCE --------
VOILET GRAY WHITE GOLD SILVER NO COLOUR
7 8 9 ----
---5% 10% 20%
5.2 DIODES
These devices allow flowing current in only one direction. These devices are also called unidirectional devices. Earlier these devices were made of vacuum tubes. Now a day these are semiconductor solid-state devices. These are PN junction devices. The PN means doping of semiconductor with positive or negative valence atoms. The silicon diodes have knee voltage drop of 0.7 V i.e. forward biased voltage drop whereas germanium diodes have 0.3 V drop. The different diodes are used for different purposes. The diodes work in forward biased condition or reverse biased conditions. These are available with different current rating, voltage rating, power rating and are used for different applications. The diodes of higher wattages are of bigger sizes.
5.3 Light Emitting Diodes
In a forward biased diode, free electrons cross the junction and fall into holes. As these electrons falls from a higher to lower energy level, they radiate energy. In ordinary diodes, this energy goes of in the form of heat. But in the Light Emitting Diode (LED), the energy radiates as light. LEDs that radiate red, green, yellow, blue, orange or infra-red are manufactured by using elements like gallium, arsenic and phosphorous. LEDs that produce visible radiations are useful with instruments, calculators etc. the infra-red LED finds application in burglar systems and other areas requiring invisible radiations. The seven segments display uses seven LEDs.
5.4 Transformers
These are the devices which converts the primary AC voltage to different secondary AC voltages. If the secondary voltage is higher than primary voltage then the transformer is called step up transformer. If the secondary voltage is less than primary, then it is called stepdown transformer. If secondary voltage is same as primary then it is called unity transformer. This unity transformer is also used as isolation transformer. These devices are highly efficient up to 99.99 % i.e. very low power loss. The transformers are required for making DC supply, tuning circuit etc. the current rating of primary and secondary winding determines the SWG gauge of the copper wire.
5.5 Capacitors
These are the storage devices but have in built resistance that’s why the storage voltage does not last for longer period. The use of capacitor is for tuning the circuit, filtering the noise to ground, creating the timing pulse as in our case. The capacitors can not be fabricated on ICs because of the technical difficulty. The capacitors are selected based on capacitance and voltage rating. Higher the voltage, higher the size of the capacitor. These are available in following types. Electrolytic Capacitor These capacitors have electrolyte ass the dielectric between the two plates. These are available with polarity ‘+’ and ‘-’. These are available with vertical mount or horizontal mount configuration. Paper capacitor These capacitors are available in low range of capacitance. The paper is used as dielectric media between the two plates. Mica Capacitor These capacitors are available in low range of capacitance. The mica is used as dielectric media between the two plates. Disc Capacitor These are available from 12pF to 10000µF.
5.6 Relays
These are an electromagnetic device which make or breaks the contacts as per the control voltage. These are solid-state relays, which do not consume much power for their operation, but are not available in higher current rating. Relays are being substituted by SCRs also called as thyristors for ON/OFF control.
CHAPTER – 04
WORKING PRINCIPLE
WORKING PRINCIPLE
There are eight input links in the PCB, which are connected to the 5V circuit. These links are connected to 40106 IC, which is having a set of NOT gates. When there are no inputs all the links are at logic 1, which is a 5V voltage. The logic 1 is converted in to logic 0 after passing through 40106 IC. Then the output of 40106 IC is given to the 89C51 microcontroller. Microcontroller 89C51 is one which is programmed for scanning process with 1 microsecond’s clock pulse. Means microcontroller checks each of its input at every 1 microsecond. After completing the one cycle, it checks the format, which is in the input, with the stored or programmed format and gives the meaning for further processing. The output of 89C51 is given to buffer IC74LS373 then ULN2803 IC which is connected to set of LEDs and relays which gives the final output. We have used piezobuzzer as alarm. There are 3 switches i.e. ACCEPT, CLEAR and TEST in the PCB. These are micro switches. TEST switch is used for testing the LED and buzzer. ACCEPT switch is used for accepting the fault condition. In this situation alarm stops but LED remains in ON state until we remove the fault. Let us take an example that there is an error or fault in third link. In this situation link 3 is shorted and having logic 0 and other link is having logic 1. When it passes from 40106 IC, all the link except link 3 shows the logic 0 at the input of 89C51 microcontroller. But link 2 shows logic 1. Microcontroller compares the generated format with the stored format. It gets the format 00100000, which means link 3 is having fault. Microcontroller gives this information to ULN2803. Then ULN2803 start the buzzer and gives the ON state to the third LED. That means link 3 is having fault. For accepting the fault we push the ACCEPT button. After pushing the ACCEPT button alarm stops but LED remains in ON state. After removing the fault, we reset the LEDs with CLEAR button.
CHAPTER – 05
P.C.B FABRICATION
PCB FABRICATION
7.1 Schematic Preparation
Schematic is a circuit that is drawn either with the help of software or by manually on paper with standard symbols. If the circuit is big and complicated then multi layer schematic is made otherwise single layer schematic is made. The schematic is drawn with colored pen to indicate the different layers, power lines, single lines and ground lines.
7.2 Artwork Preparation
After making the schematic on a paper, it is duplicated on transparent acrylic plastic sheet. This circuit is called artwork. The artwork is made either bigger or smaller or same size of the desired PCB. The artwork is drawn with different colour tapes to identify the single lines, power lines and ground lines. The artwork should be proper without leaving any connection or making any excess connection or shorts.
7.3 Etching of Copper Cladded Board
The films are put on copper cladded board and the board is exposed to light. The time of exposure depends on many factors. After the exposure of the board, it is rinsed in the etching solution. During the etching operation, the exposed copper gets dissolved in the solution whereas unexposed copper remains intact with the board. This unexposed copper in turn makes the pattern what we see on PCB. The board is then washed with gentle brush.
7.4 Drilling of Holes
The PCB is now ready for drilling operation. The holes are now drilled at all places wherever the components are to be put. The size of the drills should not be either more than the required or less than the required. If the hole is large then it will be difficult to solder and lot of lead will be consumed. If the hole is small then component will not be inserted easily.
7.5 Tinning of PCB
The PCB is tinned after putting the mask on PCB. This is done to insulate the pattern and avoid any short. The mask covers the areas where the soldering is to be done.
7.6 PCB Testing
PCB is checked for all interconnections through multimeter whether the tracks are broken or short at any place; thereby correction is done through soldering.
7.7 Assembling of the Unit
Components are assembled in proper direction and avoid the touching of component to one another. Heat sink is to be put wherever required with a heat sink compound.
CHAPTER – 06
SOLDERING
SOLDERING
Soldering is a process of joining two metallic conductors. The joint where the two metallic conductors are to be joined or fused is heated with a device called soldering iron and then alloy of tin & lead called Solder is applied which melts and covers the joint. The solder cools & solidifies quickly to ensure a good & durable connection between the joint metals. Covering the joint with solder also prevents oxidation.
HOW TO SOLDER:
Good solder practices are very important for assembling for any electronics circuit. A poorly soldered joint or connection in electronic circuits is the cause of most service problems. Given below are some important steps to be followed in good & correct soldering process.
1. Use of correct type of soldering iron & solder avoid the use of excessive flux. 2. Keep the soldering hot during the working period and let it rest on its stand when it is not in use.
3.
All component leads & solder wires should be thoroughly cleaned to remove rust & dust before soldering.
4. Enough heat is applied to the joint so that the solder metal flows freely over the joint. 5. Over heating of components in PCB should be avoided. Over heating may result in damage to PCB components. 6. Too much solder is not used to avoid short circuits between conduction paths on a PCB.
CHAPTER – 07
APPLICATION
APPLICATIONS
9.1 In Substation:
Suppose there are 8 input lines of 132/11KV in any substation and if there is any fault in these lines due to flow of high current, lines will b tripped . For detecting these faulty conditions we can use an annunciator.
9.2 For Industrial Purpose:
In any industry suppose the pressure of water is set in a particular level then if there is any change in pressure we can easily detect this change through annunciator.
9.3 For Domestic Purpose:
We can also use annunciator in home for safety purpose like checking whether the door is closed or not.
9.4 In Any Big Building:
In any hotel or building if there is fire in any room, then we can detect it through annunciator with fire sensor.
CHAPTER – 08
ADVANTAGES & LIMITATIONS
10.1 ADVANTAGES
• • • • Its initial cost is very low. It’s very reliable due to presence of micro controller. It can be universally used i.e. for industrial purposes, domestic purposes etc. Power consumption of the detector is very less i.e. it’s operating at very low voltage of 5V & can drive heavy loads through use of contractor, relays or small rating transformers etc.
10.2 LIMITATION
Limitation of our project is that there are only eight inputs & eight outputs. For increasing the outputs we can use Demuxing process. For increasing the inputs we can use Muxing process.
CHAPTER – 09
PRECAUTIONS
PRECAUTIONS
• • • •
The quality of soldering of component on PCB should be of good quality. The power of supply should not exceed 5Volts. The component fitted on PCB should be loosely fitted. Voltage should be checked at each point.
•
The solder metal has 60-40 combination and for all soldering, a good solder joint has always a shining bead like appearance.
•
IC are fitted with heat sink so that the heat generated in it should be taken by this heat sink.
CHAPTER – 10
CONCLUSION
CONCLUSION
The Micro controller Based Annunciator System has a versatile application. We can use it at each place wherever the fault detection is required. We know that fault checking is must in each field so we can say that it is a very useful device.
CHAPTER – 11
REFERENCE
REFERENCE
• •
ELECTRONICS PROJECT DIGITAL LOGIC AND COMPUTER DESIGN COMPUTER CIRCUIT ARCHITECTURE DIGITAL COMPUTER ELECTRONICS
VOL-10
MORRIS MANO
•
MORRIS MANO
•
ALBERT PAUL MALVINO KENNETH J.AYALA
• •
THE 8051 MICROCONTROLLER ELECTRONICS FOR YOU
CHAPTER – 12
MICROCONTROLLER SOURCE CODE
SIM51 Disassembler
Address 0000 0010 0013 0015 0017 0019 001A 001D 001E 0020 0022 0024 0027 0029 002C 002E 0030 0031 0033 0036 0037 Opcode 020010 758130 D2B0 7B00 7C00 E4 908000 F0 D2B3 A2B3 400A 7590FF E590 B40013 80E2 74FF F0 C2B0 I200ES E4 F0 Label LJMP INT INT: MOV SP,#30H SETB P3.0 MOV R3,#00H MOV R4,#00H CLR A START: MOV DPTR,#8000H MOVX @DPTR,A SETB P3.3 MOV C,P3.3 JC TEST MOV P1,#FFH MOV A,P1 CJNE A,#00H, SCAN SJMP INT TEST: MOV A,#00FH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOVX @DPTR,A Preset The Stack Pointer Disable The Sound Clear Register Clear Register Clear Accn Data Ptr Is Assigned With Led Port Address Disable All Leds Set The Input To Read Read The Test Input Check For Test Input Set Port 1 To Read The Input Fault Read The Input Fault Check For Fault Jump To Initial Load The Data To Lit All Leds O/P At Led Port Enable Sound Delay For Blink & Beep Load The Data To Put off All Leds O/P At Led Port Mnemonics Comments
0038 003A 003D 003F 0042 0044 0045 0047 0048 0049 004B 004E 004F 0050 0052 0055 0057 0059 005B 005D 005F 0061 0063
D2B0 I200ES 80DB 7590FF E590 FB 60C9 EB F0 C2B0 I200ES E4 F0 D2B0 I200ES D2B4 A2B4 401A D2B3 A2B3 4002 80DC 74FF
SETB P3.0 LCALL DELAY SJMP START SCAN: MOV P1,#0FFH MOV A,P1 MOV R3,A JZ INT SHOW: MOV A,R3 MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOVX @DPTR,A SETB P3.0 LCALL DELAY CHKACP: SETB P3.4 MOV C,P3.3 JC ACCEPT CT1: SETB P3.3 MOV C,P3.3 JC TEST1 SJMP SCAN TEST1: MOV A,#00FFH
Disable Sound Delay For Blink & Beep Jump To Start Set Port To Read Fault Read The Fault Save For Future Use Check For Fault Load Detected Fault O/P At Led Port Enable Sound Delay For Blink & Beep Data For Led Off O/P At Led Port Disable Sound Delay For Blink & Beep Set To Read Accept Input Read Test Input Check For Accept Input Set To Read Test Input Read Test Input Check For Test Input Jump For Scan Routine Data For Led Lit
0065 0066 0068 006B 006C 006D 006E 0070 0073 0075 0078 007A 007B 007C 007E 0081 0083 0084 0085 0086 0087 0088 008A
F0 C2B0 I200ES E4 4B F0 D2B0 I200ES 80CA 7590FF E590 4B 6B 603B 7590FF E590 FC 4B EB 4C F0 C2B0 I200ES
MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY SJMP SCAN
O/P At Led Port Enable Sound Delay For Blink & Beep Data For Led Off Combine With Already Found Fault O/P At Led Port Disable Sound Delay For Blink & Beep Jump For Scan Routine
ACCEPT: MOV P1,#0FFH Set To Read Input Fault MOV A,P1 ORL A,R3 XRL A,R3 JZ CHKCLR2 MOV P1,#0FFH MOV A,P1 MOV R4,A ORL A,R3 MOV A,R3 ORL A,R4 MOVX @DPTR,A CLR P3.0 LCALL DELAY Read The Fault Combine With Already Found Fault Set Flag To Find New Fault There Is No New Fault,Check For Clear Input Set To Read Input Read Input Save For Future Use Combine With Already Found Fault Load Already Found Fault Combine With New Fault O/P At Led Port Enable Sound Delay For Blink & Beep
008D 008E 008F 0090 0092 0095 0097 0099 009B 009D 009F 00A1 00A3 00A5 00A6 00A8 00AB 00AC 00AD 00AE 00AF 00B1 00B4
E4 4B F0 D2B0 I200ES D2B4 A2B4 401B D2B4 A2B3 4002 80D2 74FF F0 C2B0 I200ES E4 EB 4C F0 D2B0 I200ES 80BF
CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY CHKACP1: SETB P3.4 MOV C,P3.4 JC CHKCLR1 CHKACP1: SETB P3.4 MOV C,P3.3 JC TEST2 SJMP ACCEPT TEST2: MOVA,#00FFH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A MOV A,R3 ORL A,R4 MOVX @DPTR,A SETB P3.0 LCALL DELAY SJMP ACCEPT
Data For Led Off Combine With Already Found Fault O/P At Led Port Disable Sound Delay For Blink & Beep Set To Read Accept Input Read Accept Input Check For Accept Input Set To Read Accept Input Read Accept Input Check The Test Input Jump To Accept Routine Data To Lit Leds O/P At Led Port Enable Sound Delay For Blink & Beep Data To Off Led Combine With Already Found Fault Combine With New Fault O/P At Led Port Disable Sound Delay For Blink & Beep Jump To Accept Routine
00B6 00B7 00B8 00B9 00BA 00BB 00BD 00BF 00C1 00C3 00C5 00C7 00C9 00CB 00CD 00CE 00D0 00D3 00D4 00D5 00D6 00D8 00DB
EB 4C FB EB F0 D2B0 D2b5 A2B5 401B D2B3 A2B3 4002 80AA 74FF F0 C2B0 I200ES E4 4B F0 D2B0 I200ES 020075
CHKCLR1: MOV A,R3 ORL A,R4 MOV R3,A CHKCLR2: MOV A,R3 MOVX @DPTR,A SETB P3.0 SETB P3.5 MOV C,P3.5 JC CLEAR CT3: SETB P3.3 MOV C,P3.3 JC TEST3 SJMP ACCEPT TEST3: MOV A,#00FFH MOVX @DPTR,A CLR P3.0 LCALL DELAY CLR A ORL A,R3 MOVX @DPTR,A SETB P3.0 LCALL DELAY LJMP ACCEPT
Load The Already Found Fault Combine With New Fault Save For Future Use Load Already Found Fault O/P At Led Ports Disable Sound Set To Read Clear Fault Read Clear Fault Check For Clear Fault Set To Read Test Input Read Test Input Check For Test Input Jump To Accept Routine Data To Lit Leds O/P At Led Port Enable Sound Delay For Blink & Beep Data Les Off Combine With Fault Found O/P At Led Port Disable Sound Delay For Blink & Beep Jump To Accept Routine
00DE 00DF 00E0 00E2 00E5 00E7 00E9 00EB 00ED
E4 F0 D2B0 020010 7DFF 7EFF DEFE DDFA 22
CLR A MOVX @DPTR,A SETB P3.0 LJMP INT DELAY: MOV R5,#00FFH D1: MOV R6,#00FFH D2: DJNZ R6,D2 DJNZ R5,D1 RET
Data Led Off O/P At Led Port Disable Sound Jump To Initial Routine Count For Delay Count For Delay Decrement Count Decrement Count Return From Delay Routine
SYMBOL TABLE: INT – 0010 START - 001A TEST – 002E SCAN - 003F SHOW – 0047 CHKACP – 0055 CT1 – 005B TEST1 – 0063 ACCEPT – 0075 CHKACP1 – 0095 CT2 – 009B TEST2 – 00A3 CHKCLR1 – 00B6 CHKCLR2 – 00B9 CT3 – 00C3 TEST3 – 00CB CLEAR – 00DE DELAY – 00E5 D1 – 00E7 D2 – 00E9
doc_932709246.doc