Académique Documents
Professionnel Documents
Culture Documents
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.
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.
Some packages include a high level language compiler such as a C compiler and more
sophisticated libraries.
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.
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.
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
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
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
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 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 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.
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).
Ports
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.
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.
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).
Figure3.3:Push Button
4.IMPLEMENTATION RESULT
Source code:
ORG 00H
MOV P1,#00H
MOV P2,#00H
MOV A,P0
CJNE A,#00H,LOOP
MOV P1,#00H
MOV P2,#00H
SJMP EXIT
MOV P1,#01H
MOV P2,#06H
SJMP EXIT
MOV P1,#02H
MOV P2,#5BH
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
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.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.
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