Quiz Buzzer Using 8051 Report
Quiz Buzzer Using 8051 Report
In this project we design a 8 channel quiz buzzer using 8051 microcontroller. Quiz
buzzers are used often at places like educational institutions and game shows, where it is
required for the organizers to know who pressed the button first.
CIRCUIT DIAGRAM:-
CIRCUIT WORKING:-
Once the circuit is powered, the compiler will initialize the stack pointer and the variables having
the non-zero initial values and perform other initialization process and then calls the main
function. It then checks if any of the buttons is pressed.
In other words the microcontroller scans for any of its input pins at port P1 to be zero or at logic
low level. In case a button is pressed, the display function is called by passing the corresponding
number. The microcontroller then sends the relevant signals to the port connected to the 7
segment display.
The microcontroller will turn on the buzzer for some time and turns it off but the number will be
continuously displayed on the 7 segment display until the RST button is pressed.
CIRCUIT DESIGN:-
The circuit involves using five major components – 8051 Microcontroller, SPST Push Buttons, a
buzzer and a common anode 7 segment display. The microcontroller used in this case is
AT89C51, an 8 bit microcontroller manufactured by Atmel (now Microchip).
Oscillator Circuit Design: The oscillator circuit is designed using a crystal oscillator of 11.0592
Mhz and two ceramic capacitors each 33pF. The crystal is connected between pins 18 and 19 of
the microcontroller
Microcontroller Interfacing Design: The set of 8 push buttons are interfaced to port P1 of the
microcontroller and a buzzer is interfaced to the port pin P3.3. The 7 segment display is
interfaced to the microcontroller such that all the input pins are connected to port P2.
Microcontroller Code: The code can be written using C language or assembly language. Here,
the program is written in C language using Keil μVision software.
Code is compiled a hex file is created. Once this is done, next step is to dump the code into the
microcontroller. This can be done by double clicking on the controller in Proteus.
COMPONENTS REQUIRED:-
OBSERVATIONS:-
We can observe in the above simulation picture that the button pressed is displayed on the seven
segment display (i.e, in the above simulation it is 7).
CODE:-
#include<reg51.h>
int x=0,y,z;
unsigned char i;
for(;d>0;d--)
for(i=250;i>0;i--);
void main()
SWITCH=0xff;
SEGMENT=0xff;
digit=1;
buzz=0;
rst=1;
while(1)
{
while(SWITCH==0xff); // wait until any button is pressed.
SEGMENT=ch[1];
buzz=1;
buzz=0;
SEGMENT=ch[2];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=ch[3];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=ch[4];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=ch[5];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=ch[6];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
}
SEGMENT=ch[7];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=ch[8];
buzz=1;
delay(1000);
buzz=0;
while(rst!=0);
SEGMENT=0xff;
rst=1;
APPLICATIONS:-
This circuit can be used at quiz competitions organized at schools, colleges and other
institutions.
It can be also used for other games shows.
It can be used as at public places like banks, restaurants as a digital token display system.