This action might not be possible to undo. Are you sure you want to continue?
-o0o- PROJECT REPORT ON -o0o-
8C1 i r - ot o e 9 5 M oc n l r c r l Be ad s Sc rt A esCn o Sse euiy c s ot l yt m c r
PROJECT GUIDE: Er. Santosh A. Kamble.
-o0o- WORKED BY -o0o1. Abu Sufiyan M. Kalam. 2. Jadhav Santosh Dhondu. 3. Chetan Suresh Tulaskar. 4. Vishnu Gopal Shelar.
-o0o- YEAR & COURSE -o0oTHIRD YEAR DIPLOME IN ELECTRONICS AND TELECOMMUNICATION ENGINEERING -o0o- 2005 - 2006 -o0o-
SION, MUMBAI – 400 022 CRI I AE ET CT F
This is to certify that the following students of Third Year Diploma in ELECTRONICS AND TELECOMMUNICATION ENGINEERING has satisfactorily carried out the project work entitled,
Micro-controller based Security Access
Control System” as a partial fulfillment of their Diploma
Engineering during academic year of 2005 – 2006.
1. Abu Sufiyan M. Kalam. 2. Jadhav Santosh Dhondu. 3. Chetan Suresh Tulaskar. 4. Vishnu Gopal Shelar.
________________ (H.O.D) ___________________ (DATE)
Ak o l de et c nw gm e n
We are pleasured to submit this presentation studied out in manohar phalke memorial foundation’s polytechnic. We would like for humble attempt to thank all those people who helped us to make this project. First it is our pleasure to Prof. Ashok D. Chavan (Principal Of M.P.M.F.P.) & Er. Parmeshwar Manegopale (H.O.D ET/EX) for granting us the opportunity to present our project –
“Micro-controller based Security Access Control System”
We express our heart filled gratitude to honorable sir, Er. Santosh A. Kamble (college project in-charge and internal guide), who offered us all the possible assistance during our developing period and for the interest he took in sorting our difficulties and offering us guidance, constant encouragement and help. Finally we wish to extend our gratitude to all the M.P.M.F.P. Staff that all made our developing period a great experience for us.
• Abu Sufiyan M. Kalam. • Jadhav Santosh Dhondu. • Chetan Suresh Tulaskar. • Vishnu Gopal Shelar.
Ie nx d Sr. 1 2 3 4 5 6 7 8 9 10 11 Topic Introduction Block Diagram and Description Circuit Diagram and Description PCB Layout Project hardware Project Software Applications and Advantages Future Modifications Conclusion Bibliography Data sheets Page no.no. .
C A T R1 HPE IN R D C IO TOUT N .
This function thwarts any attempt by hackers to quickly try a large number of codes in a sequence. When an authorized person enters predetermined number (password) via the keypad. the relay operated for a limited time to unlatched the magnetic lock so the door can be pushed/pulled to open. The secret code can be changed any time after entering the current code (Master code) . The micro controller based digital lock present here is an access control system that allows only authorized persons to access a restricted area. Every one wants to be as much as secure as to be possible.” And if the entered password is wrong it gives three beep signals and display will displays “Code is in-correct – Access is denied”. An access control system forms a vital link in security chain.0 T O U T N Security is prime concern in our day-today life. the code lock will switch to alarm relay are turned off after entering a valid user Access code. If the entered password is correct the display displays that “ Code is correct – access allowed.1 IN R D C IO . which is fixed out side the entry door to control a magnetic lock. At the end of present delay. The system comprises a small electronics unit with a numeric keypad. When the code has been incorrectly entered five times. the relay reenergizes and the door gets locked again.
C A T R2 HPE B O KD G A L C IA R M AD N DS R T N E C IP IO .
2 B c D ga .0 lo k ia r m .
The on- . When button is normal i.e. Relay Driver 5. not pressed then it gives logic zero. These are normally open push buttons. Micro-controller 89C51 : It is a low-power. 1. Key Pad 2.1 lo k ia r m e r tio 89C51 Micro-controller based Security Access Control System has following blocks. 1. And when button is pressed then it gives logic high i. Power supply 1. Key Pad: There are total 12 keys. Micro-controller 89C51 3. Buzzer 6.e.2 B c D g a D sc ip n .e +5 Volt i. 2. LCD display 4. high-performance CMOS and 8-bit microcomputer with 4K bytes of Flash Programmable Erasable Read Only Memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the MCS-51™ instruction set and pin-out.
This LCD display is used to display the code. and ports 3.4 furnish register select and read/write levels. which provides a highly flexible and cost effective solution so many embedded control applications 3. Port 1 is used to furnish the command or data byte. error message etc. the hex command byte 80H will be used to signify that display RAM address 00H is chosen.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. To distinguish between these two data areas. One for the commands (RS=0) and second for character to be displayed (RS=1). It also contains a user programmed RAM area (the character RAM) that can be programmed to generate any desired character that can form using a dot matrix. LCD bit 7 is monitored for logic high (Busy) to ensure the display is not overwritten. The display takes varying amounts of time to accomplish the functions. . LCD display : This display contains two internal byte wise resisters.2 to 3.
Relay Driver : Output of micro-controller is not sufficient to drive the relay directly. When wrong code is pressed then buzzer will turn ON. +5 volts is required for key pad. 5. 6. Power supply: This block converts 230 Vac into +5 volt dc and +12 volts dc. Micro-controller 89C51 board and LCD display. . BUZZER: This is output device. Therefore to drive the relay we are using relay driver block by using transistor as switch. + 12 Volts are required for Relay driver circuit and Buzzer.4.
C A T R3 HPE C C IT IR U D GA AD IA R M N DS R T N E C IP IO .
3 C c it D g a .0 ir u ia r m .
In our project we are using switch to enter the number. It has four ports. When we press wrong code then the buzzer will turn on and relay remains energized for latch. port1. When we press the right code then the relay will become de-energized i. de magnetize.e. The switches are normally open and normally it gives logic one output. Normally relay is energized therefore it is magnetized. Through program microcontroller will check the digit.3 C c it D g a D sc ip n . port 3.1 ir u ia r m e r tio Microcontroller 89C51 is heart of our project. port2. Relay is used as magnetic lock. and it gives logic zero to microcontroller. port 0. LCD is used to display the code entered. The operating frequency of the microcontroller is 12 MHz. When we press the button switch will become close. .
C A T R4 HPE P BL y u C aot .
1 C a o t .4 P BL y u .
C A T R5 HPE PR JE T O C H R WR AD AE .
9 Transistors .5 Diodes 5.4 Capacitors 5.6 Light Emitting Diodes (LEDs) 5.5P o c H r w r : r je t a d a e In our project we uses following hardware 5.7 Buzzer and Bleeper 5.1 Microcontroller 89C51 5.8 Presets 5.2 Voltage Regulator 78XX series 5.3 Relay 5.
The Idle Mode stops the CPU while allowing the RAM. . high-performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM). The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. The AT89C51 is designed with static logic for operation down to zero frequency and supports two Software selectable power saving modes. By combining a versatile 8-bit CPU with Flash on a monolithic chip. timer / counters .5. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next Hardware reset. the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. 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.1 Microcontroller 89C51 The AT89C51 is a low-power . serial port and interrupt system to continue functioning.
Features of 89C51 Following are the features of 89C51 Microcontroller as per the datasheet given by Atmel- • Compatible with MCS-51TM Products. • 4K Bytes of In-system Reprogrammable Flash Memory Endurance • 1. • Fully Static Operation : 0 Hz to 24 MHz • Three-level Program Memory Lock • 128 x 8-bit Internal RAM • 32 Programmable I / O Lines.000 Write / Erase Cycles. • Two 16-bit Timer / Counters • Six Interrupt Sources • Programmable Serial Channel • Low-power Idle and Power-down Modes .
Pin Diagram of 89C51 Microcontroller .
Port 1 also receives the low-order address bytes during Flash programming and verification. As inputs . The port 1output buffers can sink/source four TTL inputs. Port 1:Port 1 is an 8-bit bi-directional I / O port with internal pull-ups.Pin Description VCC:GND:Port 0:Supply Voltage Ground Port 0 is an 8-bit open-drain bi-directional I /O port. Port 0 also receives the code bytes during Flash programming. As an output port. Port 0 may also be configured to be the multiplexed low order address / data bus during accesses to external program and data memory. Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. When 1s are written to port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. When 1s are written to port 0 pins. and outputs the code bytes during program verification. each pin can sink eight TTL inputs. . the pins can be used as high impedance inputs. External pull-ups are required during program verification. In this mode P0 has internal pull-ups.
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.Port 2:- Port 2 is an 8-bit bi-directional I / O port with internal pull-ups. As inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI). When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. . The Port 3 output buffers can sink / source four TTL inputs. it uses strong internal pull-ups when emitting 1s. Port 2 emits the contents of the P2 Special Function Register. Port 3:Port 3 is an 8-bit bi-directional I /O port with internal pull-ups. Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 3 pins that are externally being pulled low will source Current (IIL) because of the pull-ups. As inputs. The port 2 output buffers can sink / source four TTL inputs.
A high on this pin for two machine cycles while the oscillator is running resets the device. however .2 P3.4 P3. In normal operation ALE is emitted at a constant rate 1 / 6 the oscillator frequency.0 P3. This pin is also the program pulse input (PROG) during Flash programming.Port Pin Alternate Functions – P3. If desired. ALE is active only . With the bit set.7 RXD (Serial input port) TXD (Serial output port) INT0 (External Interrupt 0) INT1 (External Interrupt 1) T0 (Timer 0 external input) T1 (Timer 1 external input) WR (External data memory write strobe) RD (External data memory read strobe) RST:- Reset input . ALE operation can be disabled by setting bit 0 of SFR location 8EH.1 P3.5 P3.3 P3. Note. ALE / PROG:- Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. that one ALE pulse is skipped during each access to external Data Memory.Port 3 also serves the functions of various special features of the AT89C51 as listed below . and may be used for external timing or clocking purposes.6 P3.
XTAL1:- Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2:Output from the inverting oscillator amplifier. . EA should be strapped to VCC for internal program executions. Setting the ALE-disable bit has no effect if the Microcontroller is in external execution mode. EA will be internally latched on reset. however . PSEN is activated twice each cycle. 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. that if lock bit 1 is programmed . Note. When the AT89C51 is executing code from external program memory.during a MOVX or MOVC instruction. Otherwise. EA / VPP:External Access Enable. PSEN:Program Store Enable is the read strobe to external program memory. for parts that require 12volt VPP. except that two PSEN activations are skipped during each access to external data memory. the pin is weakly pulled high. The pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.
only three terminals are required for device of such types. Although. Shows the basic circuit configuration of the three terminal voltage regulator. the three terminal regulators offers only fixed output voltages. both +Ve and – Ve.2 Three Terminal Voltage Regulator: General Features: A three terminal voltage regulator is a regulator in which the output voltage is set at some predetermined value. Such regulators do not require an external feedback connection.5. The main advantages of such regulators are the simplicity of connections to the external circuit and the minimum of external components. input (Vin) output (Vo) and a ground terminal. The output current range from 100 m A to 3 A. LM 78 MXX series 3 terminal positive voltage regulators. Fig. Since the regulator operates at a preset output voltage the current limiting resistor is also internal to the device. Hence. General description: The LX78MXX series of three terminal regulators is available with several fixed output voltages making them useful in a wide range . there are wide variety of voltages available.
650v to 1500c + 2300c . Circularity allows start up even if output is pulled to negative voltage (I supplies) Absolute maximum rating: Input voltage internal power dissipation Operating temperature range Maximum junction temperature Storage temperature range Lead temperature 35 V Internally limited. Features: 1) 2) 3) 4) 5) Internal thermal overload protection. NO external components required.of applications. Although designed primarily devices can be used with external component to obtain adjustable voltage and current. The voltage available allow these regulators to be used in logic system. Output transistor safe area protection. Internal short circuit current limit. Hi – Fi and other solid state electronic equipment. 00 to 700 c + 1250c . instrumentation.
For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. The coil of a relay passes a relatively large current. typically 30mA for a 12V relay. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches. which attracts a lever and changes the switch contacts. but it can be as much as 100mA for relays designed to operate from lower voltages. There is no electrical connection inside the relay between the two circuits. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. the link is magnetic and mechanical. The .3 Relay: A relay is an electrically operated switch. Relays allow one circuit to switch a second circuit. which can be completely separate from the first.5. Current flowing through the coil of the relay creates a magnetic field.
Relays are usually SPDT or DPDT but they can have many more sets of switch contacts. This lever moves the switch . For further information about switch contacts and the terms used to describe them please see the page on switches. The coil will be obvious and it may be connected either way round. The animated picture shows a working relay with its coil and switch contacts.maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should show you the relay's connections. You can see a lever on the left being attracted by magnetism when the coil is switched on. To prevent damage you must connect a protection diode across the relay coil. for example relays with 4 sets of changeover contacts are readily available.
making the relay DPDT . There is one set of contacts (SPDT) in the foreground and another behind them.contacts.
but it is too much for most ICs and they will require a transistor to amplify the current. If you are choosing a relay for an existing PCB you will need to ensure that its dimensions and pin arrangement are suitable. Some relays operate perfectly well with a supply voltage which is a little lower than their rated value. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily available. You should find this information in the supplier's catalogue. Coil voltage : The relay's coil voltage rating and resistance must suit the circuit powering the relay coil. This is OK for a 555 timer IC (maximum output current 200mA). . Coil resistance The circuit must be able to supply the current required by the relay coil.Choosing a relay You need to consider several features when choosing a relay: Physical size and pin arrangement. You can use Ohm's law to calculate the current: supply voltage coil resistance For example: A 12V supply relay with a coil resistance of 400 Relay coil current = passes a current of 30mA.
DPDT etc) Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or "double pole changeover" (DPCO). at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode.Switch ratings (voltage and current) The relay's switch contacts must be suitable for the circuit they are to control. Switch contact arrangement (SPDT. Note that the voltage rating is usually higher for AC. . For further information please see the page on switches. Conduction only occurs when the relay coil is switched off. for example: "5A at 24V DC or 125V AC". The diagram shows how a signal diode (eg 1N4148) is connected across the relay coil to provide this protection. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing. Protection diodes for relays Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. You will need to check the voltage and current ratings. Note that the diode is connected 'backwards' so that it will normally not conduct.
Relays require more current than many chips can provide. transistors can switch many times per second. Relays can switch high voltages. Relays use more power due to the current flowing through their coil. Disadvantages of relays: Relays are bulkier than transistors for switching small currents. In these cases a relay will be needed. Relays are a better choice for switching large currents (> 5A). For switching small DC currents (< 1A) at low voltage they are usually a better choice than a relay. Relays can switch many contacts at once. transistors cannot. transistors can be used as an electrically operated switch. . Relays cannot switch rapidly (except reed relays). transistors can only switch DC.Relays and transistors compared Like relays. so a low power transistor may be needed to switch the current for the relay's coil. but note that a low power transistor may still be needed to switch the current for the relay's coil! The main advantages and disadvantages of relays are listed below: Advantages of relays: Relays can switch AC and DC.
They are also used in filter circuits because capacitors easily pass AC (changing) signals but they block DC (constant) signals. . 1µF +) Electrolytic capacitors are polarized and they must be connected the correct way round. Polarised capacitors (large values. There are two designs of electrolytic capacitors.5.4Capacitors Capacitors store electric charge. The voltage rating can be quite low and it should always be checked when selecting an electrolytic capacitor. Radial capacitors tend to be a little smaller and they stand upright on the circuit board. They are not damaged by heat when soldering. at least one of their leads will be marked + or -. They are used to smooth varying DC supplies by acting as a reservoir of charge. axial where the leads are attached to each end (220µF in picture) and radial where both leads are at the same end (10µF in picture). It is easy to find the value of electrolytic capacitors because they are clearly printed with their capacitance and voltage rating.
up to 1µF) Small value capacitors are unpolarised and may be connected either way round. except for one unusual type (polystyrene). The arrow of the circuit symbol shows the direction in which the current can flow.Unpolarised capacitors (small values. It can be difficult to find the values of these small capacitors because there are many types of them and several different labeling systems. so you need to use experience to work out what the multiplier should be! 5. Diodes are the electrical version of a valve and early diodes were actually called valves. . They are not damaged by heat when soldering. Many small value capacitors have their value printed but without a multiplier.5 Diodes Diodes allow electricity to flow in only one direction.
Ordinary diodes can be split into two types: Signal diodes which pass small currents of 100mA or less and Rectifier diodes which can pass large currents. all diodes have a maximum reverse voltage (usually 50V or more) and if this is exceeded the diode will fail and pass a large current in the reverse direction. it is called the forward voltage drop and is about 0.7V for all normal diodes which are made from silicon. The forward voltage drop of a diode is almost constant whatever the current passing through the diode so they have a very steep characteristic (current-voltage graph). This can be ignored in most circuits because it will be very much smaller than the current flowing in the forward direction.Forward Voltage Drop Electricity uses up a little energy pushing its way through the diode. . rather like a person pushing through a door with a spring. Reverse Voltage When a reverse voltage is applied a perfect diode does not conduct. However. but all real diodes leak a very tiny current of a few µA or less. This means that there is a small voltage across a conducting diode. this is called breakdown. In addition there are LED (which have their own page) and Zener diodes (at the bottom of this page).
yellow.5. amber. Colours of LEDs LEDs are available in red. The colour of an LED is determined by the semiconductor material. not by the colouring of the 'package' (the plastic body). The coloured packages are also available as diffused (the standard type) or transparent. green. blue and white. orange. Blue and white LEDs are much more expensive than the other colours. LEDs of all colours are available in uncoloured packages which may be diffused (milky) or clear (often described as 'water clear').6 Light Emitting Diodes (LEDs) LEDs emit light when an electric current passes through them. .
.Bi-colour LEDs A bi-colour LED has two LEDs wired in 'inverse parallel' (one forwards. otherwise it will burn out almost instantly.VL) / I VS = supply voltage VL = LED voltage (usually 2V. one backwards) combined in one package with two leads. Calculating an LED resistor value An LED must have a resistor connected in series to limit the current through the LED. R is given by: R = (VS . so that the current will be a little less than you chose. but 4V for blue and white LEDs) I = LED current (e. The resistor value. this must be less than the maximum permitted If the calculated value is not available choose the nearest standard resistor value which is greater. In fact you may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright. Only one of the LEDs can be lit at one time and they are less useful than the tri-colour LEDs described above.g. 20mA).
Bleepers have wide voltage ranges. 5.02A = 350 . their red lead is positive (+). which is set at about 400Hz for buzzers and about 3kHz for bleepers. Their typical current is about 25mA. R = (9V .7 Buzzer and Bleeper These devices are output transducers converting electrical energy to sound. for example 6V and 12V buzzers can be used with a 9V supply. requiring a current I = 20mA = 0.For example If the supply voltage VS = 9V.020A. Buzzers and bleepers must be connected the right way round. such as 3-30V. and they pass a low current of about 10mA. They contain an internal oscillator to produce the sound. .2V) / 0. and you have a red LED (VL = 2V). Buzzers have a voltage rating but it is only approximate. so choose 390 (the nearest standard value which is greater).
A small screwdriver or similar tool is required to adjust presets. They are designed to be mounted directly onto the circuit board and adjusted only when the circuit is built. 5. giving very fine control. Multiturn presets are used where very precise adjustments must be made.8 Presets These are miniature versions of the standard variable resistor. The screw must be turned many times (10+) to move the slider from one end of the track to the other. for example they can be used to amplify the small output current from a logic chip so that it can operate a lamp. In . For example to set the frequency of an alarm tone or the sensitivity of a light-sensitive circuit. relay or other high current device. Presets are much cheaper than standard variable resistors so they are sometimes used in projects where a standard variable resistor would normally be used.5.9 Transistors Transistors amplify current.
Most transistors used today are NPN because this is the easiest type to make from silicon. NPN and PNP. A transistor may be used as a switch (either fully on with maximum current. or fully off with no current) and as an amplifier (always partly on). so just treat them as labels! . The letters refer to the layers of semiconductor material used to make the transistor. symbol hFE. If you are new to electronics it is best to start by learning how to use NPN transistors. collector (C) and emitter (E). The amount of current amplification is called the current gain. with different circuit symbols. Types of transistor There are two types of standard transistors. The leads are labelled base (B). so the transistor is being used to amplify voltage. These terms refer to the internal operation of a transistor but they are not much help in understanding how a transistor is used.many circuits a resistor is used to convert the changing current to a changing voltage.
CHAPTER 6 S SE YT M S F WR OT A E .
5 SETB P2. r ga : ORG 0000H CLR P2.START .P2 ANL A.DISPLAY CODE ACALL LCDDISPLAY .#COMM1 UP1: CLR A MOVC A.#0CH CJNE A.4 MOV DPTR. LCD INITILISATION .PRGORFIX AJMP UP012 .COMMAND11 UP772: ACALL LOCKDISPLAY ACALL COLLAGEDISPLAY MOV A.#0CH.@A+DPTR INC DPTR CJNE A.A ACALL LCDDISPLAY ACALL SWREAD MOV R1.MSB .#7EH MOV R1.A UP012: ACALL SETDISPLAY MOV A.DISPLAY CODE .P2 ANL A.#'$'.#7EH ACALL SWREAD MOV R2.DISPLAY CODE .DISPLAY CODE .6 Po r m .#7EH MOV R2.A ACALL LCDDISPLAY ACALL SWREAD MOV R0.CHECK FOR FINAL SET .LSB .#04H JNZ UP772 UP22: MOV R0.
DISPLAY CODE .LSB .SAVE LSB .MSB .DISPLAY CODE .R0 MOV 31H.PRGORFIX2 AJMP UP0122 PRGORFIX2: CJNE A.#08H.#0CH CJNE A.P2 ANL A.UP223 SKAGAIN: MOV R0.#0CH.R2 MOV 46H.R1 MOV 32H.#02H UP223: ACALL SAVEDISPLAY DJNZ 45H.#00H MOV 45H.DISPLAY CODE .UP22 MOV 30H.A ACALL LCDDISPLAY ACALL SWREAD MOV R0.#08H.#0FFH MOV R1.#0FFH ACALL LCDDISPLAY ACALL SWREAD MOV R2.#0FFH MOV R2.SKAGAIN .A ACALL LCDDISPLAY ACALL SWREAD MOV R1.PRGORFIX: CJNE A.DISPLAY CODE .SAVE MSB .A UP0122: ACALL SETDISPLAY MOV A.
5 DENIED1:ACALL DENIEDISPLAY DJNZ 45H.#03H MOV A.R2 CJNE A.#03H.5 SJMP SKAGAIN .R1 CJNE A.DENIED1 CLR P2.30H.DENIED MOV A.DENIED MOV A.4 UP2232:ACALL ALLOWDISPLAY DJNZ 45H.#00H CLR P2.4 SJMP SKAGAIN COMMAND11: ACALL COMMAND AJMP UP1 DENIED:MOV 45H. CALL COMMAND REGISTER OF LCD .5 YAHA: LCALL HANG SJMP YAHA DDDD1: INC 46H SETB P2.MOV A.DDDD1 SETB P2.#05H MOV 46H.31H.46H CJNE A.UP2232 SETB P2.32H.DENIED MOV 45H.R0 CJNE A.
#01H ACALL COMMAND MOV A.#LINE73 UP73: CLR A MOVC A. CALL DATA REGISTER OF LCD FOR DISPLAY .#02H P225: ACALL DELAY DJNZ R0.@A+DPTR INC DPTR CJNE A.DISPLAY DATA ON LINE1.#LINE72 UP072: CLR A MOVC A.#02H UP525:ACALL DELAY DJNZ R0.#'$'. .DISPLAY DATA ON LINE1.P225 MOV DPTR.@A+DPTR INC DPTR CJNE A.#'$'.CLEAR LCD DISPLAY . .#0C0H ACALL COMMAND MOV DPTR. STARTING ADDRESS OF LINE 1 OF LCD RAM .LOCKDISPLAY: MOV A.DISPLAY73 MOV R0. STARTING ADDRESS OF LINE 2 OF LCD RAM . CALL DATA REGISTER OF LCD FOR DISPLAY .DISPLAY072 MOV A.DELAY .DELAY .#80H ACALL COMMAND MOV R0.UP525 RET DISPLAY072: ACALL DISPLAY AJMP UP072 DISPLAY73: ACALL DISPLAY AJMP UP73 .
STARTING ADDRESS OF LINE 1 OF LCD RAM .UP5525 RET DISPLAY5072: ACALL DISPLAY AJMP UP5072 .DISPLAY573 MOV R0.#0C0H ACALL COMMAND MOV DPTR.@A+DPTR INC DPTR CJNE A.LINE72: LINE73: DB 'SECURITY ACCESS$' DB 'CONTROL SYSTEM.DISPLAY DATA ON LINE1.#01H ACALL COMMAND MOV A.CLEAR LCD DISPLAY .P5225 MOV DPTR. CALL DATA REGISTER OF LCD FOR DISPLAY . .#02H UP5525:ACALL DELAY DJNZ R0.#80H ACALL COMMAND MOV R0.DELAY .DISPLAY5072 MOV A.#LINE572 UP5072: CLR A MOVC A. .@A+DPTR INC DPTR CJNE A.#'$'.#02H P5225: ACALL DELAY DJNZ R0.DELAY .#LINE573 UP573: CLR A MOVC A.$' COLLAGEDISPLAY: MOV A.DISPLAY DATA ON LINE1.#'$'. STARTING ADDRESS OF LINE 2 OF LCD RAM .
DISPLAY DATA ON LINE1. .#LINE731 UP731: CLR A MOVC A.@A+DPTR INC DPTR CJNE A.#02H UP5251:ACALL DELAY DJNZ R0.CLEAR LCD DISPLAY .#02H P2251: ACALL DELAY DJNZ R0.DELAY . .DISPLAY731 MOV R0.#LINE721 UP0721: CLR A MOVC A.DISPLAY573: ACALL DISPLAY AJMP UP573 LINE572: LINE573: DB 'MANOHAR PHALKE.#'$'.DISPLAY DATA ON LINE1.P2251 MOV DPTR.DISPLAY0721 MOV A.UP5251 RET LINE721: LINE731: DB ' NEW PASSWARD $' DB ' SAVED. STARTING ADDRESS OF LINE 1 OF LCD RAM .#'$'.$' DB ' POLYTECHNIC $' .#0C0H ACALL COMMAND MOV DPTR. STARTING ADDRESS OF LINE 2 OF LCD RAM .#80H ACALL COMMAND MOV R0. CALL DATA REGISTER OF LCD FOR DISPLAY SAVEDISPLAY: MOV A.DELAY . $' .@A+DPTR INC DPTR CJNE A.#01H ACALL COMMAND MOV A.
#02H P02251: ACALL DELAY DJNZ R0.@A+DPTR INC DPTR CJNE A.UP05251 RET .P02251 MOV DPTR.DISPLAY0731 MOV R0. .#01H ACALL COMMAND MOV A.DISPLAY0721: ACALL DISPLAY AJMP UP0721 DISPLAY731: ACALL DISPLAY AJMP UP731 ALLOWDISPLAY: MOV A. CALL DATA REGISTER OF LCD FOR DISPLAY .DISPLAY DATA ON LINE1. CALL DATA REGISTER OF LCD FOR DISPLAY .DISPLAY DATA ON LINE1.#80H ACALL COMMAND MOV R0.DISPLAY00721 MOV A.#0C0H ACALL COMMAND MOV DPTR.@A+DPTR INC DPTR CJNE A.#'$'.#02H UP05251:ACALL DELAY DJNZ R0.DELAY .#'$'.#LINE0731 UP0731: CLR A MOVC A.CLEAR LCD DISPLAY . STARTING ADDRESS OF LINE 1 OF LCD RAM .#LINE0721 UP00721: CLR A MOVC A. . STARTING ADDRESS OF LINE 2 OF LCD RAM .DELAY .
$' DB ' ACCESS ALLOWED $' . CALL COMMAND REGISTER OF LCD .LINE0721: LINE0731: DB 'CODE IS CORRECT. CALL DATA REGISTER OF LCD FOR DISPLAY AJMP UP2 DISPLAY2: ACALL DISPLAY .DELAY OF 1 SECOND .#0FAH LOOP1: MOV R5. CALL DATA REGISTER OF LCD FOR DISPLAY . CALL DATA REGISTER OF LCD FOR DISPLAY AJMP UP32 DELAY: MOV R7.R7 JNZ LOOP1 RET .R5 JNZ LOOP DEC R7 MOV A. CALL DATA REGISTER OF LCD FOR DISPLAY DISPLAY00721: ACALL DISPLAY AJMP UP00721 DISPLAY0731: ACALL DISPLAY AJMP UP0731 COMMAND1: ACALL COMMAND AJMP UP1 DISPLAY1: ACALL DISPLAY .#0FFH LOOP: DEC R5 MOV A.
CONVERT IT TO ASCII .DISPLAY MINITE .CONVERT IT TO ASCII .DISPLAY MINITE .DISPLAY DATA ON LINE1.#LINE2 UP32: CLR A MOVC A.R1 ORL A.DISPLAY1 UP1234: MOV A.#0A1H ACALL DISPLAY RET .#'$'. .CONVERT IT TO ASCII .DISPLAY MINITE .#01H ACALL COMMAND MOV A.#20H ACALL DISPLAY MOV A.R0 ORL A.#80H ACALL COMMAND MOV DPTR. . STARTING ADDRESS OF LINE 2 OF LCD RAM .#0C0H ACALL COMMAND MOV DPTR.DISPLAY MINITE .LCDDISPLAY: MOV A.DISPLAY DATA ON LINE1.#30H ACALL DISPLAY MOV A.CLEAR LCD DISPLAY .#30H ACALL DISPLAY MOV A.@A+DPTR INC DPTR CJNE A.@A+DPTR INC DPTR CJNE A.R2 ORL A.#'$'.#LINE1 UP2: CLR A MOVC A.DISPLAY2 MOV A. STARTING ADDRESS OF LINE 1 OF LCD RAM .#30H ACALL DISPLAY MOV A.
SETDISPLAY: ACALL DELAY MOV A,#01H ACALL COMMAND MOV A,#80H ACALL COMMAND MOV DPTR,#LINE11 UP123: CLR A MOVC A,@A+DPTR INC DPTR CJNE A,#'$',DISPLAY123 AJMP UP1234 DISPLAY123: ACALL DISPLAY DISPLAY AJMP UP123 LINE11: DB 'PRESS EN2FIX/PRG$' COMMAND: ACALL READY MOV P1,A CLR P3.2 CLR P3.3 SETB P3.4 RET DISPLAY: ACALL READY MOV P1,A SETB P3.2 CLR P3.3 SETB P3.4 CLR P3.4 ;take data to be displayed ;RS=P3.2= 1 to select data register ;write enable ;strobe character to be displayed ;Write when display is not busy ;Command Character in Port P1 ;Command resister chosen ; write enable ; Strobe Character to display ;Return CLR P3.4 ; CALL DATA REGISTER OF LCD FOR ;DISPLAY DATA ON LINE1. ; STARTING ADDRESS OF LINE 1 OF LCD RAM ;DELAY ;CLEAR LCD DISPLAY
RET READY: CLR P3.4 CLR P3.2
; Return ;strobe display ;Select command register ;read enabled ;strobe display
MOV P1,#0FFH ;configure P1 for input SETB P3.3 WAIT: CLR P3.4 SETB P3.4 JB P1.7,WAIT ;Read busy status (BF=0) CLR P3.4 RET SWREAD: MOV R6,#00H MOV A,P0 CJNE A,#0FFH,CHECKSW MOV A,P2 ANL A,#03H CJNE A,#03H,CHECKSW1 AJMP SWREAD CHECKSW: RRC A JNC DOWN111 INC R6 AJMP CHECKSW DOWN111: MOV A,P0 CJNE A,#0FFH,DOWN111 MOV A,R6 RET CHECKSW1: ;INPUT NO IS 0 ;end display strobe. ;Return
MOV R6,#08H CHECKSW11: RRC A JNC DOWN1111 INC R6 AJMP CHECKSW11 DOWN1111: MOV A,P2 ANL A,#03H CJNE A,#03H,DOWN1111 MOV A,R6 RET COMM1: DB 3CH,0EH,06H,01H,'$' LINE1: DB 'SECURITY SYSTEM.$' LINE2: DB 'ENTER CODE =$' DENIEDISPLAY: MOV A,#01H ACALL COMMAND MOV A,#80H ACALL COMMAND MOV R0,#02H PK02251: ACALL DELAY DJNZ R0,PK02251 MOV DPTR,#LINE0721K UP00721K: CLR A MOVC A,@A+DPTR INC DPTR CJNE A,#'$',DISPLAY00721K MOV A,#0C0H ACALL COMMAND ; STARTING ADDRESS OF LINE 2 OF LCD RAM ;DISPLAY DATA ON LINE1. ;DELAY ; STARTING ADDRESS OF LINE 1 OF LCD RAM ;CLEAR LCD DISPLAY
#LINE0731K UP0731K: CLR A MOVC A.$' DB ' ACCESS DENIED.#01H ACALL COMMAND MOV A. CALL DATA REGISTER OF LCD FOR .DELAY DB 'CODE IN-CORRECT.DISPLAY0731K MOV R0.P22517 MOV DPTR. $' DISPLAY00721K: ACALL DISPLAY DISPLAY AJMP UP00721K DISPLAY0731K: ACALL DISPLAY DISPLAY AJMP UP0731K HANG: MOV A.DISPLAY DATA ON LINE1.#LINE7217 UP07217: CLR A .#'$'.#02H UP05251K:ACALL DELAY DJNZ R0.#02H P22517: ACALL DELAY DJNZ R0. .@A+DPTR INC DPTR CJNE A.#80H ACALL COMMAND MOV R0.DELAY .MOV DPTR. STARTING ADDRESS OF LINE 1 OF LCD RAM .DISPLAY DATA ON LINE1. CALL DATA REGISTER OF LCD FOR . .CLEAR LCD DISPLAY .UP05251K RET LINE0721K: LINE0731K: .
#'$'.DISPLAY7317 MOV R0.#'$'.DISPLAY07217 MOV A. CALL DATA REGISTER OF LCD FOR DISPLAY .MOVC A.DISPLAY DATA ON LINE1.#02H UP52517:ACALL DELAY DJNZ R0. $' . STARTING ADDRESS OF LINE 2 OF LCD RAM DISPLAY07217: ACALL DISPLAY AJMP UP07217 DISPLAY7317: ACALL DISPLAY AJMP UP7317 . .@A+DPTR INC DPTR CJNE A. CALL DATA REGISTER OF LCD FOR DISPLAY .#LINE7317 UP7317: CLR A MOVC A.DELAY .#0C0H ACALL COMMAND MOV DPTR.@A+DPTR INC DPTR CJNE A.UP52517 RET LINE7217: LINE7317: DB 'System is Hanged$' DB ' Press Reset.
CHAPTER 7 AP C T N P L A IO S AD N AVNA E DATG .
LCD display which makes very easy to understand the Used of keyboard matrix for entering password in simple operation taking place. Antitheft system design.7 Ap a n . way. Password protected access to PC. Access to electronic circuit. Electrical application access. There is also facility of changing password. 7 A v n g s: .3 d a ta e The system used is microcontroller based.1 p lic tio s: Digital card access in telephone exchange. . Locker in bank. Simple circuit which can easily be understood. Too little space is required for it to set for any operation at any location. Reset button is available for resetting the system. Door locking system.
. Moderate price.
CHAPTER 8 F T R UUE M D IC T N O IF A IO S .
.0 u r o ific tio s: In future from our point of view we will not make use of password instead of that we shall be able to make use of detecting finger print or again in any advance technology detecting face or eyes.8 F tu eMd a n . etc.
CHAPTER 9 CNL S N O C U IO .
for security purpose.9. 0 CONCLUSION It was are pleasure that we deal with our project “89C51 Microcontroller based Security Access Control System”” Thus we can say that with this project we can automatically control the lock just by giving the password.So only the user can access it by entering the correct password. .
CHAPTER 10 B L G AH IB IO R P Y .
0B L G A H 0 IB IO R P Y 1.google. Ayala 2. Microcontroller 89C51 data Manual -Intel 3.Kenneth J.com/sk_instru . Web site : www.1 .geocities. The 8051 Microcontroller .com 4. web site : www.
CHAPTER 11 DATA SHEETS .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.