Vous êtes sur la page 1sur 18

Quiz Buzzer

1.INTRODUCTION
1.1 MICROCONTROLLERS

Circumstances that we find ourselves in today in the field of microcontrollers had their
beginnings in the development of technology of integrated circuits. This development has
made it possible to store hundreds of thousand of transistors into one chip. That was a
prerequisite for production of microprocessors, and the first computers were made by adding
external peripherals such as memory, input-output lines, timers and other. These integrated
circuits contained both processor and peripherls. That is how the first chip containing a
microcomputer, or what would later be known as a microcontroller came about.

1.2 Definition of a Microcontroller

Microcontroller, as the name suggests, are small controllers. They are like single chip
computers that are often embedded into other systems to functions as processing/controlling
unit. For example, the remote control you are using probably has microcontrollers inside that
do decoding and other controlling functions. They are also used in automobiles, washing
machines, microwave ovens, toys.etc, where automation is needed.

The key features of microcontrollers include:

High Integration of Functionality


Microcontrollers sometimes are called single-chip computers because they have on-chip
memory and I/O circuit and other circuitries that enable them to function as small
standalone computers without other supporting circuitry.
Field Programmability, Flexibility
Microcontrollers often use EEPROM or EPROM as their storage device to allow field
programmability so they are flexible to use. Once the program is tested to be correct
then large quantities of microcontrollers can be programmed to be used in embedded
systems.
Easy to Use
Assembly language is often used in microcontroller and since they usually follow RISC
architecture, the instruction set is small. The development package of microcontrollers often
includes an assembler, a simulator, a programmer to burn the chip and a demonstration board.

Electronics and communication Engineering KL University


Quiz Buzzer
2

Some packages include a high level language compiler such as a C compiler and more
sophisticated libraries.

Most microcontrollers will also combine other devices such as:

A Timer module to allow the microcontroller to perform tasks for certain time periods.
A serial I/O port to allow data to flow between the microcontroller and other
devices such as a PC or another microcontroller.
An ADC to allow the microcontroller to accept analogue input data for
processing.
The heart of the microcontroller is the CPU core.

1.3 Microcontrollers versus Microprocessors

Microcontroller differs from a microprocessor in many ways. First and the most important is
its functionality. In order for a microprocessor to be used, other components such as memory,
or components for receiving and sending data must be added to it. In short that means that
microprocessor is the heart of the computer. On the other hand, microcontroller is designed to
be all of that in one. No other external components are needed for its application because all
necessary peripherals are already built into it. Thus, we save the time and space needed to
construct devices.

2.BLOCK DIAGRAM AND WORKING PRINCIPLE


2.1 BLOCK DIAGRAM

Electronics and communication Engineering KL University


Quiz Buzzer
3

Figure2.1:Quiz Buzzer Block Diagram

2.2 WORKING PRINCIPLE

Quiz buzzer are used often at places like educational institutions and also in various
game shows to determine who has the right to answer a particular question first. In conventional

Electronics and communication Engineering KL University


Quiz Buzzer
4

systems, people depend only on human judgement to determine who has pressed the button first.
But this way of judgement can often be bias and also it becomes very difficult for the judges to
differentiate between the two persons who have pressed the buzzer within a span of few
milliseconds. So, keeping the above problem in view, we have decided to make an automatic
quiz buzzer system which turns to be very useful when more than one person has pressed the
buzzer. Firstly, the question which the teams should answer will be displayed on the LCD display
and the team which knows the answer needs to press the push button. The team which pushes the
button first, can have the right to answer the question. This system calculates the delay and
displays the number of the team which has pressed the buzzer first.

In embedded system, it is essential that microcontrollers take analog input. Sensors and
transducers used in industry are analog in nature. We need to convert the analog output from the
sensors to digital so that the corresponding signal can be processed by the controller. This project
is an example of a real time measurement system which takes input from the physical world
processes the input and responds accordingly with the requirement of the system.

The team which presses the buzzer earliest is entitled to give the answer. At times it becomes
very difficult to identify which team has pressed the button when two teams press the buzzer
within a very small time gap. In such cases the decision can be biased due to human intervention.
The quiz buzzer presented here takes care of the aforesaid problem. This quiz buzzer disables the
other inputs as soon as the first buzzer is pressed. This quiz buzzer can be used for a maximum
of two teams. It is build around 8051 microcontroller(AT89C59) with lcd interfacing(LM016L)
the other components used for quiz buzzer are switches.

3.HARDWARE MODULE

3.1 8051 MICROCONTROLLER(AT89C51)

Electronics and communication Engineering KL University


Quiz Buzzer
5

Figure3.1: 8051 Pin Diagram

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL


89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128
bytes of RAM. It can be erased and program to a maximum of 1000 times.

In 40 pin AT89C51, there are four ports designated as P 1, P2, P3 and P0. All these ports are 8-bit
bi-directional ports, i.e., they can be used as both input and output ports. Except P 0 which needs
external pull-ups, rest of the ports have internal pull-ups.

Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when
connected to an external memory. Port 3 has multiplexed pins for special functions like serial
communication, hardware interrupts, timer inputs and read/write operation from external
memory. It can be programmed to operate at different baud rates. Including two timers &
hardware interrupts, it has a total of six interrupts.
Pins 1-8: Port 1 Each of these pins can be configured as an input or an output

Electronics and communication Engineering KL University


Quiz Buzzer
6

Pin 9: RS A logic one on this pin disables the microcontroller and clears the contents of most
registers. In other words, the positive voltage on this pin resets the microcontroller. By
applying logic zero to this pin, the program starts execution from the beginning.

Pins 10-17: Port 3 Similar to port 1, each of these pins can serve as general input or output.
Besides, all of them have alternative functions.

Pin 10: RXD Serial asynchronous communication input or serial synchronous


communication output.

Pin 11: TXD Serial asynchronous communication output or serial synchronous


communication clock output.

Pin 12: INTO Interrupt 0 input.

Pin 13: INT1 Interrupt 1 input.

Pin 14: T0 Counter 0 clock input.

Pin 15: T1 Counter 1 clock input.

Pin 16: WR Write to external RAM.

Pin 17: RD Read from external RAM.

Pin 18, 19: X2, X1 Internal oscillator input and output. A quartz crystal which specifies
operating frequency is usually connected to these pins. Instead of it, miniature ceramics
resonators can also be used for frequency stability. Later versions of microcontrollers operate
at a frequency of 0 Hz up to over 50 Hz.

Pin 20: GND Ground.

Pin 21-28: Port 2 if there is no intention to use external memory then these port pins are
configured as general inputs/outputs. In case external memory is used, the higher address
byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of
64Kb is not used, which means that not all eight port bits are used for its addressing, the rest
of them are not available as inputs/outputs.

Electronics and communication Engineering KL University


Quiz Buzzer
7

Pin 29: PSEN if external ROM is used for storing program then a logic zero (0) appears on it
every time the microcontroller reads a byte from memory.

Pin 30: ALE Prior to reading from external memory, the microcontroller puts the lower
address byte on P0 and activates the ALE output. After receiving signal from the ALE pin,
the external register memorizes the state of P0 and uses it as a memory chip address.
Immediately after that, the ALU pin is returned its previous logic state and P0 is now used as
a Data Bus. As seen, port data multiplexing is performed by means of only one additional
integrated circuit. In other words, this port is used for both data and address transmission.

Pin 31: EA By applying logic zero to this pin, P2 and P3 are used for data and address
transmission with no regard to whether there is internal memory or not. It means that even
there is a program written to the microcontroller, it will not be executed. Instead, the program

Written to external ROM will be executed. By applying logic one to the EA pin, the
microcontroller will use both memories, first internal the external.

Pin 32-39: Port 0 Similar to P2, if external memory is not used, these pins can be used as
general inputs/outputs. Otherwise, P0 is configured as address output(A0-A7) when the ALE
pin is driven high (1) or as data output(Data Bus) when the ALE pin is driven low(0).

Pin 40: VCC +5V power supply.

Ports

There are four 8-bit ports: P0, P1, P2 and P3.

Port 0

The P0 port is characterized by two functions. If external memory is used then the lower
address byte is applied to it. Otherwise, all bits of this port are configured as inputs/outputs.

The other function is expressed when it is configured as an output. Unlike other ports
consisting of pins with built-in pull-up resistor connected by its end to 5V power supply, pins
of this port have this resistor left out. This apparently small difference has its consequences.

Electronics and communication Engineering KL University


Quiz Buzzer
8

If any pin of this port is configured as an input then it acts as if it floats. Such an input has
unlimited input resistance and in determined potential.

PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be
used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or
additional functions associated with them based upon the context of their usage.

PORT P3 (Pins 10 to 17): PORT P3 acts as a normal I/O port, but Port P3 has additional
functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external
counter inputs, read and write pins for memory access.

PORT P2 (Pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when
no external memory is present, but if external memory access is required then PORT P2 will
act as an address bus in conjunction with PORT P0 to access external memory, PORT P2 acts
as A8-A15.

PORT P0 (Pins 32 to 39) PORT P0 can be used as a general purpose 8 bit port when no
external memory is present, but if external memory access is required then PORT P0 acts as a
multiplexed address and data bus that can be used to access external memory in conjunction
with PORT P2. P0 acts as AD0-AD7.

Oscillator Circuits: The 8051 requires the existence of an external oscillator circuit. The
oscillator circuit usually runs around 12MHz, although the 8051 is capable of running at a
maximum of 40MHz. Each machine cycle in the 8051 is 12 clock cycles, giving an effective
cycle rate at 1MHz to 3.33MHz.

3.2 SEVEN SEGMENT DISPLAY

Electronics and communication Engineering KL University


Quiz Buzzer
9

Figure3.2.7-SEGMENT DISPLAYDiagram
The 7-segment display, also written as seven segment display, consists of seven LEDs (hence
its name) arranged in a rectangular fashion as shown. Each of the seven LEDs is called a
segment because when illuminated the segment forms part of a numerical digit (both Decimal
and Hex) to be displayed. An additional 8th LED is sometimes used within the same package
thus allowing the indication of a decimal point, (DP) when two or more 7-segment displays are
connected together to display numbers greater than ten.

Each one of the seven LEDs in the display is given a positional segment with one of its
connection pins being brought straight out of the rectangular plastic package. These individually
LED pins are labelled from a through to g representing each individual LED. The other LED pins
are connected together and wired to form a common pin.

So by forward biasing the appropriate pins of the LED segments in a particular order, some
segments will be light and others will be dark allowing the desired character pattern of the
number to be generated on the display. This then allows us to display each of the ten decimal
digits 0 through to 9on the same 7-segment display.

The displays common pin is generally used to identify which type of 7-segment display it is. As
each LED has two connecting pins, one called the Anode and the other called the Cathode,
there are therefore two types of LED 7-segment display called: Common Cathode (CC)
and Common Anode(CA).

3.3 PUSH BUTTON

Electronics and communication Engineering KL University


Quiz Buzzer
10

Figure3.3:Push Button

A push-button (also spelled pushbutton) or simply button is a simple switch mechanism


for controlling some aspect of a machine or a process. Buttons are typically made out of hard
material, usually plastic or metal. The surface is usually flat or shaped to accommodate the
human finger or hand, so as to be easily depressed or pushed. Buttons are most often biased
switches, though even many un-biased buttons (due to their physical nature) require a spring to
return to their un-pushed state. Different people use different terms for the "pushing" of the
button, such as press, depress, mash, hit, and punch.
Push button switch is connected to the first bit of PORT 0 (P0.0) which is configured as an input
pin. Thus P0.0 pin is at Vcc potential when the switch is not pressed. When the switch is pressed
this pin P0.0 will be grounded. The LED is connected to the first bit of port and a resistor is
connected in series with it to limit the current.

4.IMPLEMENTATION RESULT

Electronics and communication Engineering KL University


Quiz Buzzer
11

Source code:
ORG 00H

START: MOV P0,#0FFH

MOV P1,#00H

MOV P2,#00H

MOV A,P0

CJNE A,#00H,LOOP

MOV P1,#00H

MOV P2,#00H

SJMP EXIT

LOOP: CJNE A,#01H,NEXT

MOV P1,#01H

MOV P2,#06H

SJMP EXIT

NEXT: CJNE A,#02H,NEXT1

MOV P1,#02H

MOV P2,#5BH

Electronics and communication Engineering KL University


Quiz Buzzer
12

SJMP EXIT

NEXT1:CJNE A,#04H,NEXT2

MOV P1,#04H

MOV P2,#4FH

SJMP EXIT

NEXT2:CJNE A,#08H,NEXT3

MOV P1,#08H

MOV P2,#66H

SJMP EXIT

NEXT3:CJNE A,#10H,NEXT4

MOV P1,#10H

MOV P2,#6DH

SJMP EXIT

NEXT4:CJNE A,#20H,NEXT5

MOV P1,#20H

MOV P2,#7DH

SJMP EXIT

NEXT5:CJNE A,#40H,NEXT6
Electronics and communication Engineering KL University
Quiz Buzzer
13

MOV P1,#40H

MOV P2,#07H

SJMP EXIT

NEXT6:CJNE A,#80H,EXIT

MOV P1,#80H

MOV P2,#7FH

SJMP EXIT

EXIT: END

RESULTS:
Electronics and communication Engineering KL University
Quiz Buzzer
14

Electronics and communication Engineering KL University


Quiz Buzzer
15

Figure4.1:OUTPUT Diagram Of Quiz Buzzer

Electronics and communication Engineering KL University


Quiz Buzzer
16

5.ADVANTAGES AND DISADVANTAGES

5.1 ADVANTAGES

Generally quiz programs are implemented in the educational instruction so in the process
of the quiz manual cannot find how said the answer first so in order to identify the person
who answer first can be identified.
The other advantages of the quiz buzzer is once a player press the buzzer then the other
player buzzers are locked.
We can implement fastest finger first.

5.2 DISADVANTAGES

Quiz buzzer has disadvantages such as the buzzer will press before the question display.
Buzzer improper function.

6.CONCLUSION AND FUTURE SCOPE


Electronics and communication Engineering KL University
Quiz Buzzer
17

6.1 CONCLUSION

The desired quiz buzzer has been designed and the complete system (include all the
hardware components and software routines) is working as per the initial specifications and
requriments of our project. Even certain aspects of the system can br modified as operational
experience is gained with it. As the user play they develop various new ides for the development
and enhancement of the project.

6.2 FUTURE SCOPE

Number of players could be increased by making small changes in the programing and
incorporating few additional hardware units like push buttons. Certain aspects of the system can
be modified as operational experience is gained with it as the user work with the system,They
develop various new ideas for the development and enhancement of the project.

REFERENCES

Electronics and communication Engineering KL University


Quiz Buzzer
18

The 8051 Microcontroller, 3rd Edition, Ayala, CENGAGE Learning


Microcontrollers[Theory and Applications], Ajay V Deshmukh, Tata McGraw Hill
The 8051 Microcontroller and Embedded Systems, Muhammad Ali Mazidi, Pearson
Education
Mazidi & Mc Kinley The 8051 Micro controller and Embedded systems: using
assembles and C, 2nd edition.
Rajkamal, Microcontrollers - Architecture, Programming, Interfacing & System
Design, 2nd edition, Pearson Education.

Electronics and communication Engineering KL University

Vous aimerez peut-être aussi