SlideShare a Scribd company logo
Department of Computer Science & Engineering
Course Title: Microprocessor &Assembly Language
Report On: Traffic-Lights-System-2
Report NO. 1
Submitted To:
Ahmed Al Marouf
Lecturer Daffodil International University
Submitted By:
M M Rayhan Parvez 143-15-4617
Tuhin Suad 143-15-4614
Jiya Uddin ahmed 143-15-4593
Asif Ahmed 143-15-4664
Fazle Karim 143-15-4492
Section: F
Submission Date: 5-4-2016
Traffic lights 2
1. ABSTRACT
On this paper we are going to discuss about
emu8086 example project the Traffic Lights 2 and
how it works. The aim of this project is to control
traffic system. The project is done by assembly
language which work on 8086 micro-processors. The
function of traffic lights is to provide sophisticated
control and coordination to ensure that traffic moves
as smoothly and safely as possible.
2. INTRODUCTION
Traffic signals are used to control the flow of
vehicles. In the recent years,the need of transportation
has gain immense importance for logistics as well as
for common human. This has given rise to the number
of vehicles on the road. Due to this reason, traffic jams
and road accidents are a common sight in any busy
city. Traffic Signals provide an easy,cheap, automatic
and justified solution to the road points where the
vehicles may turn to otherdirections e.g. roundabouts,
culverts, busy walk throughs etc.
Basic Idea The project we have chosen is an
8-lane traffic controller. The basic idea behind the
design is to avoid the collision of vehicles by
providing appropriate signals to different directions
for a limited time slot, after which the next waiting
drivers will be given same treatment. In This way a
cycle will be established which will control the traffic.
Control Signals The control signals are 3-
lights. Top light is Red(Stop), Middle light is
Yellow(Wait) Bottom light is Green(Go). States
of Traffic Flow There are 8-lanes and at most two
ways can be safely open. In this way a minimum of 4-
states are possible for which different vehicles will
pass through
2.1 WORKING PROCESS
In emu8086 We use some register and
segment to generate a code.We also use some built-in
default instruction to execute the desired output.
In here we use #start=Traffic_Lights.exe# for running
the whole code from c drive. The whole code is written
below with the comment of each line describe how the
code work as traffic light 2.
name "traffic2"; name the emulator ‘traffic2’
yellow_and_green equ 0000_0110b ;Assigns the
value 0000_0110b to the symbol yellow_and_green.
red equ 0000_0001b ;Assigns the value
0000_0110b to the symbol red.
yellow_and_red equ 0000_0011b ;Assigns the
value 0000_0110b to the symbol yellow and red.
green equ 0000_0100b ;Assigns the value
0000_0110b to the symbol green.
all_red equ 0010_0100_1001b ;Assigns the
value 0000_0110b to the symbol all_red.
start: ;label named start
nop ; do nothing
; 0,1,2
mov ax, green ;copy value of green symbol to ax
out 4, ax ;turn on green
mov ax, yellow_and_green ;copy value of
yellow_and_green symbol to ax
out 4, ax ;turn on yellow and green
mov ax,red ;copy value of red symbol to ax
out 4, ax ;turn on red
mov ax, yellow_and_red ;copy value of
yellow_and_red symbol to ax
out 4, ax ;turn on yellow and red
; 3,4,5
mov ax, green << 3 ;copy value of green symbol to
ax for 3,4,5 lights
out 4, ax ;turn on green
mov ax, yellow_and_green << 3 ;copy value of
yellow_and_green symbol to ax for 3,4,5 lights.
out 4, ax ;turn on yellow and green
mov ax,red << 3 ;copy value of red symbol to ax for
3,4,5 lights.
out 4, ax ;turn on red
mov ax, yellow_and_red << 3 ;copy value of
yellow_and_red symbol to ax for 3,4,5 lights
out 4, ax ;turn on yellow and red
; 6,7,8
mov ax, green << 6 ;copy value of green symbol to
ax for 6,7,8 lights
out 4, ax ;turn on green
mov ax, yellow_and_green << 6 ;copy value of
yellow_and_green symbol to ax for 6,7,8 lights
out 4, ax ;turn on yellow and green
mov ax,red << 6 ;copy value of red symbol to ax for
6,7,8 lights
out 4, ax ;turn on red
mov ax, yellow_and_red << 6 ;copy value of
yellow_and_red symbol to ax for 6,7,8 lights
out 4, ax ;turn on yellow and red
; 9,A,B
mov ax, green << 9 ;copy value of green symbol to
ax for 9,A,B lights
out 4, ax ;turn on green
mov ax, yellow_and_green << 9 ;copy value of
yellow_and_green symbol to ax for 9,A,B lights
out 4, ax ;turn on yellow and green
mov ax,red << 9 ;copy value of red symbol to ax for
9,A,B lights
out 4, ax ;turn on red
mov ax, yellow_and_red << 9 ;copy value of
yellow_and_red symbol to ax for 9,A,B lights
out 4, ax ;turn on yellow and red
; all
mov ax, all_red ;copy value of all_red symbol to ax
for all lights
out 4, ax ;turn on all red
mov ax, all_red << 1 ; all yellow
out 4, ax ;turn on all yellow
mov ax, all_red << 2 ; all green
out 4, ax ;turn on all green
jmp start ; jump to the start label
3.SYSTEM ARCHITECTURE
In this pro0ject we use a Traffic Light
Diagram and showing the functions of Traffic Light.
Fig1: Vehicles are going in Root1 when the Light is
Green.
Fig1: Vehicles are going in Root1 when the Light is
Green & Yellow.
Fig1: Vehicles are stop in Root1 when the Light is
Red.
Root1
Root3
Root2
Root4
Fig1: Vehicles are stop in all when the all Lights are
Red.
Fig1: Vehicles are stop in all when the all Lights are
Green.
4.CODE KEYWORDS (PROCEDURE
/MACROS/
FUNCTIONS/INSTRUCTION/LABEL)
Description of code keywords is given bellow: -
4.1 In " #start=Traffic_Lights.exe# " it runs an .exe
file of traffic lights 2 assembly code.
4.2 LABEL:
4.2.1 START:
In this label program start with copying the symbol of
green into the ax register. Then its moved out 4.
Similarly, Red & Green symbol copying in the register
then moved out. For every lights this process is
happening. At last all the similar lights fulfill the
condition. Again jump to the Start label. This process
is continuing until the program exit.
4.3 Instructions:(Describe Chronologically)
4.3.1 MOV: Copy operand2 to operand1.
The MOV instruction cannot:
 set the value of the CS and IP registers.
 copy value of one segment register to another
segment register.
 copy immediate value to segment register
4.3.2 OUT: Output from AL or AX to port.
First operand is a port number. If required to access
port number over 255 - DX register should be used.
4.3.3 JMP: Unconditional Jump. Transfers control to
another part of the program. 4-byte address may be
entered in this form: 1234h:5678h, first value is a
segment second value is an offset.
Algorithm:
always jump
4.3.4 NOP: No Operation.
Algorithm:
 Do nothing
Example:
; do nothing,3 times:
NOP
NOP
NOP
RET
C Z S O P A
unchanged
5. SPECIAL INSTRUCTION
In this project basically we don’t use many
instructions. Among them we use OUT instruction
specially because we use themfor port value.
5.1 OUT INSTRUCTION:
Operand:
im.byte,AL
im.byte,AX
DX,AL
DX, AX
Effect on Flags:
C Z S O P A
Unchanged
6. OUTCOME OF THE PRODUCT
Outcome of this project is knowing the basic of
Traffic light control and using the assembly
programming language syntax writing the logic of
Traffic light controlling and showit by a special
diagram.
7. WHAT’S NEW?
1. Use of graphical interface in assembly language.
2. Accessing .exe file using start instruction.
3. NOP instruction and its function
4.OUT instruction and its function
8. CONCLUSION
This is a program that maintain the traffic control. In
this project we compare different root vehicles
number. If the Light is Green of any root then that’s
root vehicles are running. If the Light is Red of any
root then that’s root vehicles are stop. If the Light is
Yellow ofany root then that’s root vehicles are waiting
for the next instructions.
REFERENCES
1. Google
2. Emu8086 Tutorial
3. Emu8086 Instruction Set
M M Rayhan Parvez
20%
Asif Ahmed
20%
Fazle Karim
20%
MD Tuhin Saud
20%
Jiya Uddin Ahmad
20%
CONTRIBUTION
Traffic lights-system-2(Microprocessor &Assembly Language)

More Related Content

What's hot

Bit manipulation
Bit manipulationBit manipulation
Bit manipulation
Priyanka Yadav
 
Chapter 02 Logic Functions and Gates
Chapter 02 Logic Functions and GatesChapter 02 Logic Functions and Gates
Chapter 02 Logic Functions and Gates
SSE_AndyLi
 
Clean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
Clean Code - Design Patterns and Best Practices at Silicon Valley Code CampClean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
Clean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
Theo Jungeblut
 
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Hardik Trivedi
 
The lazy programmer's guide to writing thousands of tests
The lazy programmer's guide to writing thousands of testsThe lazy programmer's guide to writing thousands of tests
The lazy programmer's guide to writing thousands of tests
Scott Wlaschin
 
Multiplexer and De-Multiplexer
Multiplexer and De-MultiplexerMultiplexer and De-Multiplexer
Multiplexer and De-Multiplexer
Allied TS
 
Python functions
Python functionsPython functions
Python functions
Prof. Dr. K. Adisesha
 
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
FabMinds
 
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions | Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
FabMinds
 
Algorithm: priority queue
Algorithm: priority queueAlgorithm: priority queue
Algorithm: priority queueTareq Hasan
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphism
kiran Patel
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
rfojdar
 
Exception Handling in C++
Exception Handling in C++Exception Handling in C++
Exception Handling in C++
Deepak Tathe
 
Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Ahmed Khateeb
 
K map
K mapK map
Loops in Python
Loops in PythonLoops in Python
Loops in Python
Arockia Abins
 
Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())
Sameer Rathoud
 
Digital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdfDigital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdf
Kannan Kanagaraj
 
Affine Cypher Encryption - Decryption
Affine Cypher Encryption - DecryptionAffine Cypher Encryption - Decryption
Affine Cypher Encryption - Decryption
Zakriya Ali Sabir
 

What's hot (20)

Bit manipulation
Bit manipulationBit manipulation
Bit manipulation
 
Chapter 02 Logic Functions and Gates
Chapter 02 Logic Functions and GatesChapter 02 Logic Functions and Gates
Chapter 02 Logic Functions and Gates
 
Clean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
Clean Code - Design Patterns and Best Practices at Silicon Valley Code CampClean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
Clean Code - Design Patterns and Best Practices at Silicon Valley Code Camp
 
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017Introduction to kotlin for android app development   gdg ahmedabad dev fest 2017
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
 
The lazy programmer's guide to writing thousands of tests
The lazy programmer's guide to writing thousands of testsThe lazy programmer's guide to writing thousands of tests
The lazy programmer's guide to writing thousands of tests
 
Multiplexer and De-Multiplexer
Multiplexer and De-MultiplexerMultiplexer and De-Multiplexer
Multiplexer and De-Multiplexer
 
Python functions
Python functionsPython functions
Python functions
 
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
 
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions | Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
 
Algorithm: priority queue
Algorithm: priority queueAlgorithm: priority queue
Algorithm: priority queue
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphism
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
 
Exception Handling in C++
Exception Handling in C++Exception Handling in C++
Exception Handling in C++
 
Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)
 
K map
K mapK map
K map
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
 
Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())
 
Digital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdfDigital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdf
 
Affine Cypher Encryption - Decryption
Affine Cypher Encryption - DecryptionAffine Cypher Encryption - Decryption
Affine Cypher Encryption - Decryption
 

Similar to Traffic lights-system-2(Microprocessor &Assembly Language)

Handout#10
Handout#10Handout#10
Handout#10
Sunita Milind Dol
 
Traffic Light Controller Using Fpga
Traffic Light Controller Using FpgaTraffic Light Controller Using Fpga
Traffic Light Controller Using Fpga
IJERA Editor
 
Parking Control System using PLC
Parking Control System using PLCParking Control System using PLC
Parking Control System using PLC
ZunAib Ali
 
C++ Program Auto workshop service system
C++ Program Auto workshop service systemC++ Program Auto workshop service system
C++ Program Auto workshop service system
Shahzaib Farooq
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
Roman Okolovich
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSPIMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
IAEME Publication
 
IRJET- Design & Implementation of Black Box in Automobiles System
IRJET-  	  Design & Implementation of Black Box in Automobiles SystemIRJET-  	  Design & Implementation of Black Box in Automobiles System
IRJET- Design & Implementation of Black Box in Automobiles System
IRJET Journal
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
Mayank Garg
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
Archita Misra
 
IRJET- Asic Implementation of Efficient Error Detection for Floating Poin...
IRJET-  	  Asic Implementation of Efficient Error Detection for Floating Poin...IRJET-  	  Asic Implementation of Efficient Error Detection for Floating Poin...
IRJET- Asic Implementation of Efficient Error Detection for Floating Poin...
IRJET Journal
 
Group project dld assignement
Group project dld assignementGroup project dld assignement
Group project dld assignement
Akhtarzeb Khan
 
Modul PLC Programming.pdf
Modul PLC Programming.pdfModul PLC Programming.pdf
Modul PLC Programming.pdf
MOCHAMAD RIZKY BINTANG ARDYANSYAH
 
MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
RAHUL RANJAN
 
Computer Architecture Assignment Help
Computer Architecture Assignment HelpComputer Architecture Assignment Help
Computer Architecture Assignment Help
Architecture Assignment Help
 
Dsp Datapath
Dsp DatapathDsp Datapath
Dsp Datapath
Abhishek Tiwari
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
NetProtocol Xpert
 
Testing tool for an automated ticketing system
Testing tool for an automated ticketing systemTesting tool for an automated ticketing system
Testing tool for an automated ticketing system
VladimirZitoli
 

Similar to Traffic lights-system-2(Microprocessor &Assembly Language) (20)

Handout#10
Handout#10Handout#10
Handout#10
 
Traffic Light Controller Using Fpga
Traffic Light Controller Using FpgaTraffic Light Controller Using Fpga
Traffic Light Controller Using Fpga
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Parking Control System using PLC
Parking Control System using PLCParking Control System using PLC
Parking Control System using PLC
 
C++ Program Auto workshop service system
C++ Program Auto workshop service systemC++ Program Auto workshop service system
C++ Program Auto workshop service system
 
ECG BASED REPORT.
ECG BASED REPORT.ECG BASED REPORT.
ECG BASED REPORT.
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
 
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSPIMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
IMPLEMENTATION OF FRACTIONAL ORDER TRANSFER FUNCTION USING LOW COST DSP
 
IRJET- Design & Implementation of Black Box in Automobiles System
IRJET-  	  Design & Implementation of Black Box in Automobiles SystemIRJET-  	  Design & Implementation of Black Box in Automobiles System
IRJET- Design & Implementation of Black Box in Automobiles System
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
 
IRJET- Asic Implementation of Efficient Error Detection for Floating Poin...
IRJET-  	  Asic Implementation of Efficient Error Detection for Floating Poin...IRJET-  	  Asic Implementation of Efficient Error Detection for Floating Poin...
IRJET- Asic Implementation of Efficient Error Detection for Floating Poin...
 
Group project dld assignement
Group project dld assignementGroup project dld assignement
Group project dld assignement
 
Modul PLC Programming.pdf
Modul PLC Programming.pdfModul PLC Programming.pdf
Modul PLC Programming.pdf
 
MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
 
Computer Architecture Assignment Help
Computer Architecture Assignment HelpComputer Architecture Assignment Help
Computer Architecture Assignment Help
 
Dsp Datapath
Dsp DatapathDsp Datapath
Dsp Datapath
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
 
Testing tool for an automated ticketing system
Testing tool for an automated ticketing systemTesting tool for an automated ticketing system
Testing tool for an automated ticketing system
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 

Traffic lights-system-2(Microprocessor &Assembly Language)

  • 1. Department of Computer Science & Engineering Course Title: Microprocessor &Assembly Language Report On: Traffic-Lights-System-2 Report NO. 1 Submitted To: Ahmed Al Marouf Lecturer Daffodil International University Submitted By: M M Rayhan Parvez 143-15-4617 Tuhin Suad 143-15-4614 Jiya Uddin ahmed 143-15-4593 Asif Ahmed 143-15-4664
  • 2. Fazle Karim 143-15-4492 Section: F Submission Date: 5-4-2016 Traffic lights 2 1. ABSTRACT On this paper we are going to discuss about emu8086 example project the Traffic Lights 2 and how it works. The aim of this project is to control traffic system. The project is done by assembly language which work on 8086 micro-processors. The function of traffic lights is to provide sophisticated control and coordination to ensure that traffic moves as smoothly and safely as possible. 2. INTRODUCTION Traffic signals are used to control the flow of vehicles. In the recent years,the need of transportation has gain immense importance for logistics as well as for common human. This has given rise to the number of vehicles on the road. Due to this reason, traffic jams and road accidents are a common sight in any busy city. Traffic Signals provide an easy,cheap, automatic and justified solution to the road points where the vehicles may turn to otherdirections e.g. roundabouts, culverts, busy walk throughs etc. Basic Idea The project we have chosen is an 8-lane traffic controller. The basic idea behind the design is to avoid the collision of vehicles by providing appropriate signals to different directions for a limited time slot, after which the next waiting drivers will be given same treatment. In This way a cycle will be established which will control the traffic. Control Signals The control signals are 3- lights. Top light is Red(Stop), Middle light is Yellow(Wait) Bottom light is Green(Go). States of Traffic Flow There are 8-lanes and at most two ways can be safely open. In this way a minimum of 4- states are possible for which different vehicles will pass through 2.1 WORKING PROCESS In emu8086 We use some register and segment to generate a code.We also use some built-in default instruction to execute the desired output. In here we use #start=Traffic_Lights.exe# for running the whole code from c drive. The whole code is written below with the comment of each line describe how the code work as traffic light 2. name "traffic2"; name the emulator ‘traffic2’ yellow_and_green equ 0000_0110b ;Assigns the value 0000_0110b to the symbol yellow_and_green. red equ 0000_0001b ;Assigns the value 0000_0110b to the symbol red.
  • 3. yellow_and_red equ 0000_0011b ;Assigns the value 0000_0110b to the symbol yellow and red. green equ 0000_0100b ;Assigns the value 0000_0110b to the symbol green. all_red equ 0010_0100_1001b ;Assigns the value 0000_0110b to the symbol all_red. start: ;label named start nop ; do nothing ; 0,1,2 mov ax, green ;copy value of green symbol to ax out 4, ax ;turn on green mov ax, yellow_and_green ;copy value of yellow_and_green symbol to ax out 4, ax ;turn on yellow and green mov ax,red ;copy value of red symbol to ax out 4, ax ;turn on red mov ax, yellow_and_red ;copy value of yellow_and_red symbol to ax out 4, ax ;turn on yellow and red ; 3,4,5 mov ax, green << 3 ;copy value of green symbol to ax for 3,4,5 lights out 4, ax ;turn on green mov ax, yellow_and_green << 3 ;copy value of yellow_and_green symbol to ax for 3,4,5 lights. out 4, ax ;turn on yellow and green mov ax,red << 3 ;copy value of red symbol to ax for 3,4,5 lights. out 4, ax ;turn on red mov ax, yellow_and_red << 3 ;copy value of yellow_and_red symbol to ax for 3,4,5 lights out 4, ax ;turn on yellow and red ; 6,7,8 mov ax, green << 6 ;copy value of green symbol to ax for 6,7,8 lights out 4, ax ;turn on green mov ax, yellow_and_green << 6 ;copy value of yellow_and_green symbol to ax for 6,7,8 lights out 4, ax ;turn on yellow and green mov ax,red << 6 ;copy value of red symbol to ax for 6,7,8 lights out 4, ax ;turn on red mov ax, yellow_and_red << 6 ;copy value of yellow_and_red symbol to ax for 6,7,8 lights out 4, ax ;turn on yellow and red ; 9,A,B mov ax, green << 9 ;copy value of green symbol to ax for 9,A,B lights out 4, ax ;turn on green mov ax, yellow_and_green << 9 ;copy value of yellow_and_green symbol to ax for 9,A,B lights out 4, ax ;turn on yellow and green mov ax,red << 9 ;copy value of red symbol to ax for 9,A,B lights out 4, ax ;turn on red mov ax, yellow_and_red << 9 ;copy value of yellow_and_red symbol to ax for 9,A,B lights out 4, ax ;turn on yellow and red ; all mov ax, all_red ;copy value of all_red symbol to ax for all lights out 4, ax ;turn on all red mov ax, all_red << 1 ; all yellow out 4, ax ;turn on all yellow mov ax, all_red << 2 ; all green out 4, ax ;turn on all green jmp start ; jump to the start label 3.SYSTEM ARCHITECTURE In this pro0ject we use a Traffic Light Diagram and showing the functions of Traffic Light.
  • 4. Fig1: Vehicles are going in Root1 when the Light is Green. Fig1: Vehicles are going in Root1 when the Light is Green & Yellow. Fig1: Vehicles are stop in Root1 when the Light is Red. Root1 Root3 Root2 Root4
  • 5. Fig1: Vehicles are stop in all when the all Lights are Red. Fig1: Vehicles are stop in all when the all Lights are Green. 4.CODE KEYWORDS (PROCEDURE /MACROS/ FUNCTIONS/INSTRUCTION/LABEL) Description of code keywords is given bellow: - 4.1 In " #start=Traffic_Lights.exe# " it runs an .exe file of traffic lights 2 assembly code. 4.2 LABEL: 4.2.1 START: In this label program start with copying the symbol of green into the ax register. Then its moved out 4. Similarly, Red & Green symbol copying in the register then moved out. For every lights this process is happening. At last all the similar lights fulfill the condition. Again jump to the Start label. This process is continuing until the program exit. 4.3 Instructions:(Describe Chronologically) 4.3.1 MOV: Copy operand2 to operand1. The MOV instruction cannot:  set the value of the CS and IP registers.  copy value of one segment register to another segment register.  copy immediate value to segment register 4.3.2 OUT: Output from AL or AX to port. First operand is a port number. If required to access port number over 255 - DX register should be used. 4.3.3 JMP: Unconditional Jump. Transfers control to another part of the program. 4-byte address may be entered in this form: 1234h:5678h, first value is a segment second value is an offset. Algorithm: always jump 4.3.4 NOP: No Operation. Algorithm:  Do nothing
  • 6. Example: ; do nothing,3 times: NOP NOP NOP RET C Z S O P A unchanged 5. SPECIAL INSTRUCTION In this project basically we don’t use many instructions. Among them we use OUT instruction specially because we use themfor port value. 5.1 OUT INSTRUCTION: Operand: im.byte,AL im.byte,AX DX,AL DX, AX Effect on Flags: C Z S O P A Unchanged 6. OUTCOME OF THE PRODUCT Outcome of this project is knowing the basic of Traffic light control and using the assembly programming language syntax writing the logic of Traffic light controlling and showit by a special diagram. 7. WHAT’S NEW? 1. Use of graphical interface in assembly language. 2. Accessing .exe file using start instruction. 3. NOP instruction and its function 4.OUT instruction and its function 8. CONCLUSION
  • 7. This is a program that maintain the traffic control. In this project we compare different root vehicles number. If the Light is Green of any root then that’s root vehicles are running. If the Light is Red of any root then that’s root vehicles are stop. If the Light is Yellow ofany root then that’s root vehicles are waiting for the next instructions. REFERENCES 1. Google 2. Emu8086 Tutorial 3. Emu8086 Instruction Set M M Rayhan Parvez 20% Asif Ahmed 20% Fazle Karim 20% MD Tuhin Saud 20% Jiya Uddin Ahmad 20% CONTRIBUTION