Project Report On Repaired)

  • Uploaded by: Robert White
  • 0
  • 0
  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Project Report On Repaired) as PDF for free.

More details

  • Words: 4,075
  • Pages: 48
PROJECT REPORT ON “ AUTOMATIC PLANT IRRIGATOR” A MINOR PROJECT UNDER MR. D.K.RAHEJA (LECTURER,DEPTT OF ECE,AIT) DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

AMBEDKAR INSTITUTE OF TECHNOLOGY,DELHI

SUBMITTED BY :RITESH BATRA (0571012806) DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 1

RAMESHWAR SHARMA (0471012806) VINOD CHATURVEDI

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 2

CONTENTS OF REPORT CERTIFICATE 2. INTRODUCTION 3. PROJECT IMPLEMENTATION 4. OVERALL BLOCK DIAGRAM 5. MICROCONTROLLER BLOCK 6. DTMF BLOCK 7. OP AMP BLOCK(SENSOR) 8. RELAY AND OPTOCOUPLER BLOCK 9. OTHER REQUIREMENTS 10.SOFTWARE REQUIREMENTS 11.FLOW CHART 12.ASM FILE 13.HEX CODE 14.REFERENCES 1.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 3

CERTIFICATE THIS IS TO CERTIFY THAT RITESH BATRA (0571012806),RAMESHWAR SHARMA(0471012806),VINOD CHATURVEDI(0751012806) STUDENTS OF 7TH SEMESTER,ECE HAS COMPLETED “AUTOMATIC PLANT CONTROLLER” PROJECT UNDER MY GUIDANCE.I WISH THEM SUCCESS THROUGHOUT THEIR LIVES. (D.K.RAHEJA,LECTURER,DEPTT. OF ECE,AIT)

ACKNOWLEDGEM ENT DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 4

WE EXPRESS OUR GRATITUDE TOWARDS D.K. RAHEJA SIR FOR HIS OVERWHELMING SUPPORT AND VISIONARY GUIDANCE.THANK YOU SIR FOR MOTIVATING US AT EVERY POINT OF TIME TO ACHIEVE THE BEST STANDARDS. WITH REGARDS, (TEAM MEMBERS)

INTRODUCTIO N IN THIS FAST PACED WORLD,HUMAN BEINGS REQUIRE EVERYTHING TO BE AUTOMATED.OUR LIFESTYLE DEMANDS EVERYTHING TO BE REMOTE CONTROLLED.APART FROM FEW THINGS MAN HAS MADE HIS LIFE AUTOMATED.AND WHY NOT? IN THIS WORLD OF ADVANCE ELECTRONICS,LIFE OF HUMAN BEINGS SHOULD BE SIMPLER. HENCE,TO MAKE LIFE MORE SIMPLER AND CONVINIENT,WE HAVE MADE “AUTOMATIC PLANT IRRIGATOR”,A MODEL OF CONTROLLING IRRIGATION FACILITIES TO HELP MILLIONS OF PEOPLE. THIS MODEL USES ADVANCED DTMF TECHNIQUES,SENSOR TECHNOLOGY WITH MICROCONTROLLER TO MAKE A SMART SWITCHING DEVICE. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 5

THE MODEL SHOWS THE BASIC SWITCHING MECHANISM OF BULBS BY USING MOBILE PHONES,FROM ANY PART OF WORLD AND BY SENSING THE MOISTURE PRESENT IN THE SOIL. OUR BASIC MODEL CAN BE EXTENDED TO ANY LEVEL OF SWITCHING & CONTROLLING BY USING DTMF,SENSOR TECHNOLOGY. APPLICATIONS:1.IRRIGATION IN FIELDS. 2.IRRIGATION IN GARDENS,PARKS. 3.VERY EFFICIENT FOR PADDY(RICE) FIELDS. 4.PICSICULTURE. THIS REPORT CONTAINS THE DETAILED INVESTIGATION OF AFORESTATED PROJECT. THE FOLLOWING PAGES WOULD GIVE YOU AN IDEA HOW SIMPLE LIFE COULD BE…………………..

PROJECT IMPLEMENTATION

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 6

1.The project implementation begins with brain storming.After a good session of brainstorming,We got an idea for hardware design(involves R&D). 2.After the hardware design,the overall hardware was divided into 5 sections,and work on every section was done separately. 3.Then came the phase of programming and debugging.Thanks to Raheja sir for helping us in turning every stone into a milestone.Programming and debugging was a cakewalk for us as we had visionary support of Raheja sir. 4.Then came transferring on board and Raheja sir’s knowledge and experience came handy that really helped us by providing handy circuits for our project. 5.Finally the overall prototype was tested by us.The overall project was successful,except small errors that were rectified in due time.

BLOCK DIAGRAM MCU DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 7

BLOCK

MOT R1

RELAY AND OPTOCOU PLOR

SENSOR BLOCK(LM324)

SOIL

MOT R2

MOTR 3

MOTR 4

DTMF BLOCK

IF WE PRESS THE FOLLOWING KEYS OF CELL PHONE THEN FOLLOWING BULBS WOULD BE ON/OFF. CELL PHON E

2-MOTOR1 -ON 4- MOTOR2-ON

1- MOTOR1-OFF 3- MOTOR2-OFF

6- MOTOR3-ON

7- MOTOR3-OFF

123

8- MOTOR4-ON

9- MOTOR4-OFF

456

5-ALL OFF

789

THE PROJECT CONSISTS OF 4 BLOCKS. 1.MICROCONTROLLER BLOCK (AT89S52). DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 8

2.DTMF BLOCK(CM8870). 3.OP-AMP BLOCK. 4.RELAY AND OPTOCOUPLER UNIT. 5.LOAD BLOCK(BULBS).

MCU BLOCK

9

DTMF BLOCK

RELAY AND OP AMP DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage OPOPTOCOUP BLOCK(SENSOR) LER

MICROCONTROLLER BLOCK THIS BLOCK CONSISTS OF FOLLOWING AT89S52:PIN DESCRIPTION:VCC Supply voltage-5V GND Ground.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 10

Port 0 Pin 32-39 is port 0 of 8052.Port 0 is an 8-bit open-drain bi-directional I/O port. Port 0 receives the code bytes during Flash programming, and outputs the code bytes during program verifICation. External pullups are required during program verifICation.Here we are using port 0 as output port to give control signals to relay block.when the pins on port 0 becomes low ie.logICal zero,it gives o/p to relay block for switching on/off the load. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pullups.Port 1 also receives the low-order address bytes during Flash programming and DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 11

verifICation.Here we are using port 1 as sensing port that detects dtmf signal,and gives control signal to port zero. Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pullups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this applICation, it uses strong internal pull-ups when emitting 1s.During accesses to external data memory that use 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 Port 3 is an 8-bit bi-directional I/O port with internal pullups.we have used port 3 for interrupt as our sensor will continuosly sense the moisture present and it will give control signal to p3.3 whICh is an external interrupt enable pin,i.e. INT1. Port 3 also receives some control signals for Flash programming and verifICation Port 3 also serves the functions of various special features of the AT89C52 as listed below:

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 12

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 13

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 Store Enable is the read strobe to external program memory. When the AT89C52 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. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 14

Crystal The crystal we are using here is to provide clock frequency to the mICrocontroller.Its no is-624-21 11.0592 kdsi ok.It gives 11.0592mhz of frequency whICh is divided by 12.

Other capacitances n resistances are used to filter spikes and to provide appropriate loads.also there is a port for adapter that provides 12 v.Output pins are also embedded on the board. Hence we can see that how small components joined together forms the most important part of our project i.e. mcu block.

POWER SUPPLY UNIT The power supply unit consists of bridge rectifier,voltage regulator IC-7805,capacitor-1000uf 25 v,0.1 uf.we have made power supply unit from bridge rectifier whICh converts 12 volt to 5 volt constant current.There is a single 5v o/p pin & one ground-5-12v pin for relay and optocoupler block.hence power supply is ready with ground,5v,12v. Do remember that all IC’s work on 5v.so IC’s should be connected to 5v supply,else they will get damaged. Next is an easy diagram to make power supply. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 15

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 16

DTMF BLOCK Dtmf:-it means dual tone multi frequency. It is a technique through whICh the keys of the telephonIC key pad is decoded.In this technique we have two frequencies,one high and one low.Based on these frequencies the inputted or pressed key is detected as 1 or 2 and so on………….. Dtmf is used in present days mobile phones,and we have used this technique to detect the keys pressed on the phone. Keypad The DTMF keypad is laid out in a 4×3 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key such as '1' will send a sinusoidal tone of the two frequencies 697 and 1209 hertz (Hz). The original keypads had levers inside, so each button activated two contacts. The multiple tones are the reason for calling the system multi frequency. These tones are then decoded by the switching center to determine whICh key was pressed. DTMF keypad frequencies (with sound clips) 1209 Hz 1336 Hz 1477 Hz 697 Hz

1

2

3

770 Hz

4

5

6

852 Hz

7

8

9

941 Hz

*

0

#

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 17

DTMF DECODER IC 8870. Description The M-8870 is a full DTMF Receiver that integrates both bandsplit filter and decoder functions into a single 18-pin DIP or SOIC package. Manufactured using CMOS process technology, the M-8870 offers low power consumption (35 mW max) and precise data handling. Its filter section uses switched capacitor technology for both the high and low group filters and for dial tone rejection. Its decoder uses digital counting techniques to detect and decode all 16 DTMF tone pairs into a 4-bit code. External component count is minimized by provision of an on-chip differential input amplifier,clock generator, and latched tri-state interface bus. Minimal external components required include a low-cost 3.579545 MHz color burst crystal, a timing resistor, and a timing capacitor. The M-8870-02 provides a “power-down” option whICh, when enabled,drops consumption to less than 0.5 mW. Features • Low Power Consumption • Adjustable Acquisition and Release Times • Central OffICe Quality and Performance • Power-down and Inhibit Modes (-02 only) • Inexpensive 3.58 MHz Time Base • Single 5 Volt Power Supply • Dial Tone Suppression ApplICations • Telephone switch equipment • Remote data entry • Paging systems • Personal computers • Credit card systems

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 18

Pin Configuration

Block Diagram

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 19

Functional Description M-8870 operating functions (see block diagram on page 1) include a bandsplit filter that separates the high and low tones of the received pair, and a digital decoder that verifies both the frequency and duration of the received tones before passing the resulting 4-bit code to the output bus. Filter The low and high group tones are separated by applying the dual-tone signal to the inputs of two 6th order switched capacitor bandpass filters with bandwidths that correspond to the bands enclosing the low and high group tones. The filter also incorporates notches at 350 and 440 Hz, providing excellent dial tone rejection. Each filter output is followed by a single-order switched capacitor section that smooths the DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 20

signals prior to limiting. Signal limiting is performed by highgain comparators provided with hysteresis to prevent detection of unwanted low-level signals and noise. The comparator outputs provide full-rail logIC swings at the frequencies of the incoming tones. Decoder The M-8870 decoder uses a digital counting technique to determine the frequencies of the limited tones and to verify that they correspond to standard DTMF frequencies. A complex averaging algorithm is used to protect against tone simulation by extraneous signals (such as voICe) while tolerating small frequency variations. The algorithm ensures an optimum combination of immunity to talkoff and tolerance to interfering signals (third tones) and noise. When the detector recognizes the simultaneous presence of two valid tones (known as signal condition), it raises the Early Steering flag (ESt). Any subsequent loss of signal condition will cause ESt to fall.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 21

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 22

Working of circuit:- here IC 8870 is used as decoder.now when the keys are pressed on the phone,a dtmf signal is generated that goes to dtmf decoder through input pins.The input is given to pin 2,3,therby output is obtained at pin 11,12,13,14,and pin 15 is used to detect change of o/p.pin 5,6,9 are connected to ground and crystal is connected to pin 7.pin 16,17,18 are connected to power supply.further resistors and capacitors are used to avoid spikes & provide appropriate load.also we have used 4 red led’s to know the o/p value.one yellow led is there to detect the change in o/p.A 5 v power supply is given to the IC whICh detects the keys pressed. Depending on the input the output value is taken from o/p pins and the value is given to port 1,where comparison is done and control signals are given to port 0.the circuit we have designed works on high logIC.do remember that input to the IC is given through an earphone lead that should be capable to detect the output coming from the phone. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 23

OP AMP BLOCK(SENSOR) we have designed our sensor using IC LM 324(quad op amp).This is a powerful op amp IC that can be used for variety of sensors.This IC is 14 pin,with four opamps that can be used sensors.The opamp’s are used in inverting mode as a comparator.it compares the input with 5v signals,and depending on comparison it gives a low or high output. The whole circuit is made on a readymade PCB readily available in market.the whole circuit is designed in a manner that any type of sensor can be used on it.Here our sensor is two pin DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 24

metal probes,that is used in soil,and it is connected to op amp using resistors so that low or high signal can be detected.Finally the output from sensor is given to pin 3.3 whICh is external interrupt1 i.e. int1.and from int1 control signal is given to relay that switches on/off the motor for irrigation purposes. Following is the overall diagram for op amp block.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 25

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 26

WORKING OF OVERALL CIRCUIT:1.The input from probe 1 is given to pin 2 of LM 324 IC.Pin 3 is connected to 5v,the opamp compares the input with 5v and gives output as inverted logIC of comparison. 2.Similarly pin 6,9,13 is connected to other probes and same comparison with 5v is done to provide the appropriate logIC. 3.outputs are taken from pin 1,7,3,14.the output is inverted. 4.Pin 4 is connected to +vcc and pin 11 is connected to ground. 5.resisters of 20k and 470k are used to provide appropriate connections. 6.Pin 3,8,10,12 are connected to 5v for comparison. 7.Further led’s are connected,so that output can be easily detected. 8.Two pins are used for input vcc. 9.A common ground and common –ve pins are provided to make necessary connections. 10.A variable resistor is embedded to provide appropriate load. 11.Hence after making the connections,the output is taken from respective pin,and given to mICrocontroller for further switching. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 27

12.Please note that 5v should be given to Lm324,a high voltage would damage the IC,and may lead to IC burst.

RELAY AND OPTOCOUPLER UNIT This unit provides the actual switching of appliances.the mechanical on off is done by this unit only.The overall relay and optocoupler board consists of 1.RELAY(JQC-3FC(T73)DC 12V. 2.OPTOCOUPLER(VT 38T Q5627) 3.DIODES AND TRANSISTORS Relay is an electromagnetic switch.hence it makes bulbs on/off. And optocouplers are used to isolate 5v to 12v. Our relay and optocoupler board consists of 4 semiconductor relays,which are actually electromechanical switches,4 optocupler,4 diodes. Diodes are used so that signal always flow in 1 direction,else it may harm microcontroller,due to leakage current. Then comes optocouplers that takes the input from port 0 at pin1 and the led present inside the optocoupler drives the transistors by giving optical signals,hence o/p is taken from pin 4 which is given to another transistor that drives the relay. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 28

Optocouplers are used because our microcontroller works on 5v,where as led works on 12v.Hence to provide isolation between the two voltages,optocuplers are used.but if we directly connect microcontroller to relay,then it will harm mcu. Finally relay switches on/off our motors used for irrigation.its one end is connected to electrical main,and other end to motor.relays are of two types normally open/close.we have used normally closed relay.

Following is the circuit diagram of relay and optocoupler.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 29

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 30

OTHER CIRCUIT ELEMENTS USED 1. 4 bulb holders. 2. 2 meter household electrical wire,220 v(enamled). 3. 4.bakelite sheet. 4. 5.double sided tape 5. 6.two pin plug. 6. 7.connecting wires. 7. 8.mobile phone. 8. 9.handsfree wire. 9. 12 v adapter.

OVERALL WORKING OF PROJECT. 1.Connect the two pin plug to normal power supply i.e. 220 v,50 Hz Ac. 2.Also connect the microcontroller board to 12 v adapter. 3.Now the setup is ready for use. FOR DTMF TECHNOLOGY:1.Dial the phone number of phone connected with mcu. DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 31

2.The dtmf kit will get activated,as a result of which port 1 of mcu will receive some bi value like 11110011. 3.After receiving bit value’s on port 1,the values are moved to accumulator A. 4.Then the accumulator value is compared with predefined bit pattern. Like if 1 is pressed then comparison is done with 11110001,n so on……. 5.Microcontroller after getting the required signal makes port 0 bits ie.p0.0,p0.1,p0.2,p0.3 to set or clear depending on logic. 6.And finally port 0 pins give signal to optocoupler,that gives 12 v to relay circuit,as a result of it,the bulb depending on logic gets switched on/off. 7.Key 5 0n phone keypad is used to switch all appliances off. FOR SENSOR TECHNOLOGY:DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 32

1.After making the necessary connections,the sensor is placed inside the soil. 2.It senses the moisture present in the soil and gives interrupt to microcontroller. 3.On detecting the interrupt,microcontroller executes interrupt service routine. 4.This routine provides control signals to port 0,that gives signals to relay block for switching motor on/off. 5.if the soil is dry,motor would get on automatically,else it will remain off due to presence of moisture. NOTE:- controller signals can be given on any port depending on requirements. This is the overall working of our project.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 33

CIRCUIT DIAGRAM:- DTMF TECHNOLOGY

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 34

Control signals are given from port 0 to the relay block These are signals from dtmf block to port1

CIRCUIT DIAGRAM:- SENSOR TECHNOLOGY

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 35

P3 P0 ATB9S 52

P3

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 36

USB DEVELOPMENT KIT

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 37

The 8051 Development Kit is a multipurpose kit. It can be used to run various 8051 programs and burn them into the microcontroller. It can also be used in practical Robotic/Automation applications where implementation of Actuators and Sensors may be required. The development kit provided by us is shown below with the different parts labeled. 1. AT89S52 Microcontroller 2. Port 0 Connector 3. Port 1 Connector 4. Port 2 Connector 5. Port 3 Connector 6. 5V Power Supply Connector 7. 5V Power Supply Connector 8. Black Wire points to the LSB of each Port 9. EEPROM 24Cxx (optional) 10.LCD (optional) 11.5V Power Supply Connector 12.9 pin D-Shell Female Connector to get the input from the controller to the computer. 13.MAX 232 for serial communication with PC ( optional ) 14.25 pin D-Shell male connector to transfer the HEX code from PC to the microcontroller 15.DC Jack for 12V Power supply 16.Power Indication LED 17.Buffer IC to toggle between the Programming mode and the Run mode 18.Jumper 19.LED that signifies whether the Jumper is connected or not DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 38

How to make the connections?

The adopter should be connected to the DC Jack (in the development kit) while the other end is to be connected with the AC supply. There is a 25 pin D-Shell Connector in the development kit that is to be connected with the parallel port of the PC through a cable. The corresponding LED on the development kit will indicate the supply of power or the successful connection of the kit with the PC. IMPORTANT NOTE: Any input or output pin should NOT be connected with the Vcc (5V Supply) directly. Peripherals That Can Be Connected • • • • • • • • • • • •

Seven Segment LCD (Liquid Crystal Display) LED (Light Emitting Diode) Actuators (along with their driver circuitry like HBridge) DC Motor Stepper Motor Limit Switch ADC (Analog to Digital Converter) DAC (Digital to Analog Converter) Proximity Sensors Metal Proximity Sensor Infra-Red Proximity Sensor DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage

39

• Magnetic Proximity Sensor • Ultrasonic Proximity Sensor • DTMF (Dual Tone Multiple Frequency) Decoder- used especially for wireless control • Matrix Keyboard • Any electrical home appliances to be switched ON/OFF Troubleshooting • If the development kit is not working then • Check if the connector of the 12V adopter is connected properly • Check if the 25 pin D-Shell connector is connected properly • If still the program is not able to burn then either the microcontroller is faulty or under rare circumstances the buffer IC is faulty. • If the program is able to burn, but not able to run, then it means that the jumper near the 5V supply is not connected properly. If the jumper is connected properly then the LED (marked 19 in the diagram above) will glow. Select the correct device (AT89S52) in the SpiPgm up. After that the hex file can be easily burn into microcontroller using spigm.

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 40

SOFTWARE DEVELOPMENT The hex file for microcontroller was generated using following software tools. 1.8051 IDE:- It is an integrated development environment,that consists of a compiler,editor,linker.Here the code is written in assembly language,which is converted to hex file by 8051IDE.

2.FLIP 2.6:- It is a software designed by atmel,to burn the microcontroller of usb kit.It stores hex file into rom for execution purposes.FLIP 2.6 can be used for variety of microcontrollers.Flip 2.6 was used during development of hex files,i.e. during testing phase. 3.SPIGM:- It is a flash programmer,that writes the hex file to 8052 rom. Hence all the code was developed using above software and usb kits provided by plc institute of electronics. The code was tested on the kit,and Final code was burn in microcontroller using spigm burner.

FLOWCHART DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 41

ASM FILE ORG 0000H CODE.

LJMP MAIN1

ADDRESS. MOTOR

;ORIGIN ;JUMPING TO DTMF

ORG 0013H

;INT1 SERVICE

CLR P0.0

;SWITCHING IN

ACALL DELAY ACALL DELAY SETB P0.0 MOTOR OFF RETI INTERRUPT DELAY: MOV R7,#250 VALUE IN R7 L3: MOV R6,#250 L4: DJNZ R6,L4 DJNZ R7,L3 RET ACALL

;DELAYS ;SWITCHING ;RETURN FROM

;KEEPING COUNT ; R6=250 ;DECREMENT R6 ;DECREMENT R7 ;RETURN FROM

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 42

ORG 30H ADDRESS

;MAIN PROGRAM’S

MAIN1: INT1

MOV IE,#10000100B MOV A,P1

;ENABLING

;GETTING VALUE

FROM DTMF

CJNE A,#11110001B,NEXT

;COMPARISON

WITH KEY PRESSED

AJMP BULB1 NEXT: CJNE A,#11110010B,NEXT1 ;COMPARISON AJMP BULB2

NEXT1: CJNE A,#11110011B,NEXT2 ;COMPARISON AJMP BULB3 NEXT2: CJNE A,#11110100B,NEXT3 ;COMPARISON AJMP BULB4 NEXT3: CJNE A,#11110101B,NEXT4 ;COMPARISON AJMP BULB5 NEXT4: CJNE A,#11110110B,NEXT5 ;COMPARISON DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 43

AJMP BULB6 NEXT5: CJNE A,#11110111B,NEXT6 ;COMPARISON AJMP BULB7 NEXT6: CJNE A,#11111000B,NEXT7 ;COMPARISON AJMP BULB8 NEXT7: CJNE A,#11111001B,MAIN1 ;COMPARISON AJMP BULB9 BULB1: SETB P0.0 OFF AJMP MAIN1 BULB2: CLR P0.0 AJMP MAIN1

;MOTOR1

;MOTOR1 ON

BULB3: SETB P0.1 OFF AJMP MAIN1

;MOTOR2

BULB4: CLR P0.1 AJMP MAIN1

;MOTOR2 ON

BULB7: SETB P0.2 ;MOTOR3 OFF AJMP MAIN1 BULB6: CLR P0.2 AJMP MAIN1

;MOTOR3 ON

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 44

BULB9: SETB P0.3 ;MOTOR4 OFF AJMP MAIN1 BULB8: CLR P0.3 AJMP MAIN1 BULB5: SETB P0.0 SETB P0.1 MOTORS OFF SETB P0.2 SETB P0.3 AJMP MAIN1

;MOTOR4 ON

;ALL

HEX FILE :03000000020030CB DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 45

: 10001300C280111C111CD280327FFA7EFADE FEDF11 :02002300FA22BF : 1000300075A884E590B4F1020162B4F20201 66B4DD : 10004000F302016AB4F402016EB4F5020182 B4F65F : 10005000020176B4F7020172B4F802017EB4 F9D05D : 10006000017AD2800130C2800130D2810130 C28158 : 100070000130D2820130C2820130D2830130 C2838A :0C0080000130D280D281D282D2830130C4 DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 46

:00000001FF

REFERENCES 1.WWW.PLCIE.COM 2.WWW.8051PROJECTS.COM 3.WWW.PROJECTREPORTS.COM 4.MICROCONTROLLERSMAZZIDI 5.WWW.8052PROJECTS.COM 6.WWW.RICKEYSWORLD.COM 7.WWW.ATMEL.COM

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 47

DEPARTMENT OF ELECTRONICS & COMMUNICATION,AITPage 48

Related Documents


More Documents from ""