TRAFFIC
LIGHT
AIM:
USING 8255 SIMULATE THE TRAFFIC LIGHT FOR THE FOLLOWING STATES USING
8085.
State: 1-Vehicles from south should move
to north, west and east directions
State: 2-Vehicles from east should move to
west, north and south directions
State: 3-Vehicles from west should move
to north, south and east directions
State: 4-Vehicles from north should move
to south, west and east directions
Generate states opcode and simulate.
ADDRESS
|
OPCODE
|
LABEL
|
MNEMONICS
|
OPERAND
|
COMMENT
|
8800
|
|
|
MVI A
|
80
|
|
8801
|
|
|
|
|
|
8802
|
|
|
OUT
|
43H
|
|
8803
|
|
|
|
|
|
8804
|
|
AGAIN
|
MVI C
|
04H
|
|
8805
|
|
|
|
|
|
8806
|
|
|
LXI H
|
8850
|
|
8807
|
|
|
|
|
|
8808
|
|
|
|
|
|
8809
|
|
NEXT
|
MOV
|
A,M
|
|
880A
|
|
|
OUT
|
40H
|
|
880B
|
|
|
|
|
|
880C
|
|
|
INX
|
H
|
|
880D
|
|
|
MOV
|
A,M
|
|
880E
|
|
|
OUT
|
41H
|
|
880F
|
|
|
|
|
|
8810
|
|
|
INX
|
H
|
|
8811
|
|
|
MOV
|
A,M
|
|
8812
|
|
|
OUT
|
42H
|
|
8813
|
|
|
|
|
|
ADDRESS
|
OPCODE
|
LABEL
|
MNEMONICS
|
OPERAND
|
COMMENT
|
8814
|
|
|
INX
|
H
|
|
8815
|
|
|
CALL
|
DELAY
|
|
8816
|
|
|
|
|
|
8817
|
|
|
|
|
|
8818
|
|
|
DCR
|
C
|
|
8819
|
|
|
JNZ
|
NEXT
|
|
881A
|
|
|
|
|
|
881B
|
|
|
|
|
|
881C
|
|
|
JMP
|
AGAIN
|
|
881D
|
|
|
|
|
|
881E
|
|
|
|
|
|
881F
|
|
DELAY
|
MVI
|
B,0FH
|
|
8820
|
|
|
|
|
|
8821
|
|
D1
|
LXI
|
D,FFFF
|
|
8822
|
|
|
|
|
|
8823
|
|
|
|
|
|
8824
|
|
D2
|
NOP
|
|
|
8825
|
|
|
NOP
|
|
|
8826
|
|
|
DCX
|
D
|
|
8827
|
|
|
MOV
|
A,D
|
|
8828
|
|
|
ORA
|
E
|
|
8829
|
|
|
JNZ
|
D2
|
|
882A
|
|
|
|
|
|
882B
|
|
|
|
|
|
882C
|
|
|
DCR
|
B
|
|
882D
|
|
|
JNZ
|
D1
|
|
882E
|
|
|
|
|
|
882F
|
|
|
|
|
|
8830
|
|
|
RET
|
|
|
DATA
ADDRESS
|
OPCODE
|
LABEL
|
MNEMONICS
|
OPERAND
|
COMMENT
|
8850
|
|
|
|
88
|
STATE 1
|
8851
|
|
|
|
83
|
''
|
8852
|
|
|
|
F2
|
''
|
8853
|
|
|
|
83
|
STATE 2
|
8854
|
|
|
|
88
|
‘’
|
8855
|
|
|
|
F8
|
‘’
|
8856
|
|
|
|
88
|
STATE 3
|
8857
|
|
|
|
38
|
‘’
|
8858
|
|
|
|
F1
|
‘’
|
8859
|
|
|
|
38
|
STATE 4
|
885A
|
|
|
|
88
|
‘’
|
885B
|
|
|
|
F4
|
‘’
|
OBSERVATION:
No comments:
Post a Comment