100% found this document useful (1 vote)
556 views9 pages

Quiz Buzzer Using 8051 Report

The document describes an 8 channel quiz buzzer circuit using an 8051 microcontroller. The circuit includes 8 push buttons interfaced to an 8051 microcontroller along with a buzzer and 7-segment display. When a button is pressed, the corresponding number is displayed on the 7-segment display and the buzzer is activated for 1 second. The microcontroller code written in C scans the buttons, activates the buzzer and displays the number. The circuit can be used for quiz competitions and other applications where quick response time needs to be determined.

Uploaded by

Tes 2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
556 views9 pages

Quiz Buzzer Using 8051 Report

The document describes an 8 channel quiz buzzer circuit using an 8051 microcontroller. The circuit includes 8 push buttons interfaced to an 8051 microcontroller along with a buzzer and 7-segment display. When a button is pressed, the corresponding number is displayed on the 7-segment display and the buzzer is activated for 1 second. The microcontroller code written in C scans the buttons, activates the buzzer and displays the number. The circuit can be used for quiz competitions and other applications where quick response time needs to be determined.

Uploaded by

Tes 2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Report on

“8 Channel Quiz Buzzer using 8051


Microcontroller.”
INTRODUCTION:-

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:-

 AT89C51 (8051 Microcontroller)


 7 Segment Display (Common Anode is used in this project)
 Push Buttons – 9 
 10KΩ Resistors – 2
 100Ω Resistors – 8
 470Ω Resistors – 2
 2N2222 NPN Transistors – 1
 5V Buzzer 
 10μF Capacitor 
 33pF Capacitors – 2 
 11.0592 MHz Crystal 
 8051 Programmer 
 5V Power Supply
SIMULATED OUTPUT:-

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>

#define SEGMENT P2 // PORT2 to Segments of 7-Segment Display

#define SWITCH P1 // Input Switches (buttons) to PORT1

sbit buzz=P3^0; // Buzzer


sbit rst=P3^3; // Reset Switch (Reset the display) - not the microcontroller

sbit digit=P3^7; // 7-Segment Display Common Pin (to enable)

void delay (int); // Delay function

int x=0,y,z;

unsigned char ch[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x98}; // Hexadecimal


values from 0 to 9.

void delay (int d)

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.

while (SWITCH==0xfe) // Button 1 is pressed.

SEGMENT=ch[1];

buzz=1;

delay(1000); // Activate buzzer.

buzz=0;

while(rst!=0); // display the digit until the reset is pressed.

while (SWITCH==0xfd) // Button 2 is pressed.

SEGMENT=ch[2];

buzz=1;

delay(1000);

buzz=0;

while(rst!=0);

while (SWITCH==0xfb) // Button 3 is pressed.

SEGMENT=ch[3];

buzz=1;

delay(1000);

buzz=0;
while(rst!=0);

while (SWITCH==0xf7) // Button 4 is pressed.

SEGMENT=ch[4];

buzz=1;

delay(1000);

buzz=0;

while(rst!=0);

while (SWITCH==0xef) // Button 5 is pressed.

SEGMENT=ch[5];

buzz=1;

delay(1000);

buzz=0;

while(rst!=0);

while (SWITCH==0xdf) // Button 6 is pressed.

SEGMENT=ch[6];

buzz=1;

delay(1000);

buzz=0;

while(rst!=0);
}

while (SWITCH==0xbf) // Button 7 is pressed.

SEGMENT=ch[7];

buzz=1;

delay(1000);

buzz=0;

while(rst!=0);

while (SWITCH==0x7f) // Button 8 is pressed.

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.

You might also like