Sie sind auf Seite 1von 16

A PROJECT REPORT ON

DIGITAL GATES EMULATOR USING 8051 MICROCONTROLLER

ACKNOWLEDGEMENT
I wish to express my sincere gratitude to SAVEETHA ENGINEERING COLLEGE for providing me an opportunity to do my project work on DIGITAL GATES EMULATOR USING 8051 MICROCONTROLLER in Microprocessor and Microcontroller Laboratory during the academic year 2011-2012.

Our special thanks to Mrs. Bhuvaneswari.P.R., M.E (Electronics & Communication Department) under whom we completed this project. She provided us with all the possible help and advice. Without her guidance this project would have not reached its completion in such a successful manner.

LIST OF CONTENTS

1. ABSTRACT

2. CIRCUIT DIAGRAM

3. PIN DIAGRAM

4. FLOW CHART

5. 8051 MICROCONTROLLER SPECIAL FEATURES

6. HARDWARE REQUIRED

7. SOURCE CODE

8. REFERENCE

ABSTRACT
This project Digital gated Emulator using Microcontroller is used to emulate the basic gates such us NOT, OR, AND.The system has the selector switch by which we can select any gate. The system has two inputs and one output. We use two SPDT switches for the inputs and for the output we use an LED. The gate selection can be done by the selector switch and it is also indicated on separate LED's. There are three LED's provided on the board for the gates NOT, OR, AND. The corresponding LED will glow for the corresponding gate. The main operation is done by the Microcontroller through its ports. The Microcontroller gets the input through the ports and it will produce the output according to the gate selected.

CIRCUIT DIAGRAM

PIN DIAGRAM

The following are some of the capabilities of 8051 microcontroller. Internal ROM and RAM I/O ports with programmable pins Timers and counters Serial data communication

FLOW CHART

8051 MICROCONTROLLER SPECIFIC FEATURES


16 bit PC &data pointer (DPTR). 8 bit program status word (PSW). 8 bit stack pointer (SP). Internal ROM 4k. Internal RAM of 128 bytes. 4 register banks, each containing 8 registers. 80 bits of general purpose data memory. 32 input/output pins arranged as four 8 bit ports: P0-P3. Two 16 bit timer/counters: T0-T1. Two external and three internal interrupt sources Oscillator and circuit. clock

HARDWARE REQUIRED
1. 8051 Microcontroller

A microcontroller is a single chip that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output (RAM), a clock and an I/O control unit. Also called a "computer on a chip," billions of microcontroller units (MCUs) are embedded each year in a myriad of products from toys to appliances to automobiles. 2. Resistor

A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. The current through a resistor is in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a resistor's terminals to the intensity of current through the circuit is called resistance. This relation is represented by Ohm's law

3. Capacitor

A capacitor (formerly known as condenser) is a passive two-terminal electrical component used to store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least two electrical conductors separated by a dielectric (insulator); for example, one common construction consists of metal foils separated by a thin layer of insulating film. 4. Diode

In electronics, a diode is a type of two-terminal electronic component with nonlinear resistance and conductance (i.e., a nonlinear currentvoltage characteristic), distinguishing it from components such as two-terminal linear resistors which obey Ohm's law. A semiconductor diode, the most common type today, is a crystalline piece of semiconductor material connected to two electrical terminals. A vacuum tube diode (now rarely used except in some high-power technologies) is a vacuum tube with two electrodes: a plate and a cathode.

5. SPDT Switch

SPDT switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. It is a simple change over switch. 6. LEDs

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.

7. AND , OR, NOT Logic Gate

A logic gate is an idealized or physical device implementing a Boolean function, that is, it performs a logical operation on one or more logic inputs and produces a single logic output.

SOURCE CODE
SW_AND SW_OR SW_NOT EQU P1.3 ; SWITCH FOR AND GATE EQU P1.2 ; SWITCH FOR OR GATE EQU P1.1 ; SWITCH FOR NOT GATE

LED1 EQU P1.5 ; LED FOR AND GATE LED2 EQU P1.6 ; LED FOR OR GATE LED3 EQU P1.7 ; LED FOR NOT GATE SW1 SW2 SW3 OP RG 0000H TOP: SETB LED1 SETB LED2 SETB LED3 SETB OP SETB SW_AND ; here 1 because we need I/P EQU P3.5 ; FIRST INPUT SWITCH EQU P3.7 ; SECOND INPUT SWITCH EQU P1.0 ; THIRD INPUT SWITCH EQU P1.4 ; LED FOR OUTPUT

JNB SW_AND, AND1; if pressed then go to AND1 SETB SW_OR JNB SW_OR, OR1 SETB SW_NOT ; ; checking whether it is pressed

JNB SW_NOT, NOT1 SJMP TOP

AND1: UP1: SETB SW_AND JB SW_AND, TOP ; if not pressed then go to TOP

CLR LED1 SETB SW1 SETB SW2 SETB SW3 JNB SW1, DWN1 JNB SW2, DWN1 JNB SW3, DWN1 CLR OP SJMP UP1 DWN1: SETB OP SJMP UP1 OR1: UP2: SETB SW_OR JB SW_OR, TOP ; if not pressed then go to TOP CLR LED2 SETB SW1 SETB SW2 SETB SW3 JB SW1, DWN2 JB SW2, DWN2

JB SW3, DWN2 SETB OP SJMP UP2 DWN2: CLR OP SJMP UP2 NOT1: UP3: SETB SW_NOT JB SW_NOT, TOP CLR LED3 SETB SW1 JB SW1, DWN3 CLR OP SJMP UP3 DWN3: SETB OP SJMP UP3 END ; if not pressed then go to TOP

REFERENCE
1. Ramesh S. Gaonkar,Microprocessor Architecture, Programming and Applications with the 8085 Penram International Publisher, 5th Ed., 2006. 2. Microprocessors & Microcontroller Systems by A.P Godse, D.A Godse, Technical Publication First Edition: 2007-2008. 3. www.wikipedia.com 4. www.google.co.in/imghp?hl=en&tab=wi 5. www.slideshare.net/thadeshvar/project-report-format

Das könnte Ihnen auch gefallen