MICROPROCESSORS
MINI PROJECT
SUBMITTED BY
Tanuj Kumar
(12104025)
Electrical Department
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
CONCEPT
Continue
CONCEPT
Continue
BLOCK DIAGRAM
FLOW CHART
SOURCE CODE
0000
0000
0000
0000
0000
4100
4102
4104
4106
MVI A,94H
OUT REG
MVI A,11011111B
OUT PORTB
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
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
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
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
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.
essor Found the switch then the led will glow and buzzer is on
or Found the pressed switch then the led will glow and buzzer is
e 7 Segment LED
The End