EE228
MICROPROCESSORS
MINI PROJECT
SUBMITTED BY
Tanuj Kumar
(12104025)
Electrical Department
ELECTRONIC QUIZ TABLE
CONCEPT
This project can be used in Quiz competitions.
The circuit is based on Microprocessor.
Simultaneously five players can participate in this game.
It has five separate LEDs to indicate who has pressed the key
and it also display the number on the seven segment display of
the microprocessor kit.
ELECTRONIC QUIZ TABLE
CONCEPT
Continue
The Reset switch is used to reset all the switches and
the circuit will get ready for the next round.
The above system is monitored and controlled by the 8
bit microprocessor 8085 and using the Ports of 8255.
ELECTRONIC QUIZ TABLE
CONCEPT
Continue
The Microprocessor continuously monitors the five
switches and if any one of the switch is pressed then it
latches the switch and the microprocessor switch on the
corresponding LED and display the number in the seven
segment switch.
A Buzzer sound is also produced to indicate that some
one has pressed any one of the Switch.
ELECTRONIC QUIZ TABLE
BLOCK DIAGRAM
ELECTRONIC QUIZ TABL
FLOW CHART
ELECTRONIC QUIZ TABLE
SOURCE CODE
0000
0000
0000
0000
0000
4100
4102
4104
4106
PORTA EQU 0CH
PORTB EQU 0DH
PORTC EQU 0EH
REG EQU 0FH
ORG 4100H
3E 94
D3 0F
3E DF
D3 0D
MVI A,94H
OUT REG
MVI A,11011111B
OUT PORTB
ELECTRONIC QUIZ TABLE
SOURCE CODE
4108 DB 0C
status
410A E6 02
button
410C C2 2E 41
410F DB 0C
status
4111 E6 04
second button
4113 C2 38 41
4116 DB 0C
status
4118 E6 08
Continue
TOP: IN PORTA ;get switch1
ANI 00000010B ;check first
JNZ SW1
IN PORTA ;get switch2
ANI 00000100B ;check
JNZ SW2
IN PORTA ;get switch3
ANI 00001000B ;check third
SOURCE CODE
Continue
411D DB 0C
IN PORTA ;get switch4 status
411F
E6 10
ANI 00010000B ;check
fourth button
4121
C2 4C 41
JNZ SW4
4124
DB 0C
IN PORTA ;get switch5 status
4126
E6 20
ANI 00100000B ;check fifth button
4128
C2 56 41
JNZ SW5
412B C3 08 41
JMP TOP
412E
3E FE
SW1: MVI A,O1111110 B ;switch ON 1
LED and buzzer
4130
D3 0D
OUT PORTB
4131
3E F9
MVI A,11111001 B
;display 1 on 7 segment display
4132
D3 OE
OUT PORT C
4133
CD 70 41
CALL DELAY
SOURCE CODE
Continue
4135 C3 5D 41
JMP DOWN
4138 3E FD
SW2: MVI A,01111101B ;switch ON 2 LED
and buzzer
413A D3 0D
OUT PORTB
413B
3E A4
MVI A,10100100 B
;display 2
on 7 segment display
4132
D3 OE
OUT PORT C
413C CD 70 41
CALL DELAY
413F C3 5D 41
JMP DOWN
4142 3E FB
SW3: MVI A,01111011B ;switch ON 3 LED
and buzzer
4144 D3 0D
OUT PORTB
4131
3E OB
MVI A,00001011 B
;display 3
on 7 segment display
4132
D3 OE
OUT PORT C
4146
CD 70 41
CALL DELAYELECTRONIC QUIZ TABLE
SOURCE CODE
Continue
4149 C3 5D 41
JMP DOWN
414C 3E F7
SW4: MVI A,01110111B ;switch ON 4 LED and
buzzer
414E D3 0D
OUT PORTB
4131
3E 99
MVI A,10011001 B
;display 4 on 7
segment display
4132
D3 OE
OUT PORT C
4150 CD 70 41
CALL DELAY
4153 C3 5D 41
JMP DOWN
4156 3E EF
SW5: MVI A,01101111B ;switch ON 5 LED and
buzzer
4158
D3 0D
OUT PORTB
4131
3E 92
MVI A,10010010 B
;display 5 on 7
segment display
4132
D3 OE
OUT PORT C
415A CD 70 41
CALL DELAY
ELECTRONIC QUIZ TABLE
SOURCE CODE
415D
415E
4160
4162
4164
4166
4169
416B
416D
4170
4170
4171
Continue
79
DOWN: MOV A,C
E6 1F
ANI 1FH
D3 0D
OUT PORTB
DB 0C
D1:IN PORTA
E6 01
ANI 01H
CA 62 41
JZ D1
3E DF
MVI A,11011111B
D3 0D
OUT PORTB
C3 08 41
JMP TOP
DELAY:
4F
MOV C,A
06 02
MVI B,02H
ELECTRONIC QUIZ TABLE
SOURCE CODE
4173
4176
4177
4178
4179
417C
417D
4180
4181
Continue
11 0F 00 LOOP1: LXI D,0FH
1B
LOOP: DCX D
7B
MOV A,E
B2
ORA D
C2 76 41
JNZ LOOP
05
DCR B
C2 73 41
JNZ LOOP1
C9
RET
END
ELECTRONIC QUIZ TABLE
WORK FLOW
Move
The
Immediate
data
1101111
to
Accumulator
Get the Status of Switch 1
To Check the first Button - Perform the
Immediate AND Operation 0000010 With ACC
value 1101111 B
1
1 0 1 1 1 1 1
0
0 0 0 0 0 1 0
0
0 0 0 0 0 1 0
If no zero Jump To sw1
ELECTRONIC QUIZ TABLE
WORK FLOW
SWITCH ON LED ONE and Sound Buzzer
move the data to Acc 1111 1110 B
Call the Delay Program
In Delay
Move the Acc value to C Register
And load the OF H (0000 11111 B)value to DE
register Pair
Perform the logical ORA Operation
Then Jump Down
ELECTRONIC QUIZ TABLE
WORK FLOW
In Jump
Move C register Value to Accumulator
Perform the Immediate AND Operation with
the value(0F H)
Finally Reset the Acc Value with 1101111 B
Like Wise all the switches are tested.
ELECTRONIC QUIZ TABLE
Initially all LEDs set to of
ELECTRONIC QUIZ TABLE
essor Found the switch then the led will glow and buzzer is on
ELECTRONIC QUIZ TABLE
or Found the pressed switch then the led will glow and buzzer is
e 7 Segment LED
SEVEN DEGMENT LED
ELECTRONIC QUIZ TABLE
The End