SlideShare a Scribd company logo
1 of 8
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

Micro project list dms- 22319
Micro project list dms- 22319Micro project list dms- 22319
Micro project list dms- 22319ARVIND SARDAR
 
Binary expression tree
Binary expression treeBinary expression tree
Binary expression treeShab Bi
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentationPrionto Abdullah
 
Online Voting System Project Proposal ( Presentation Slide).pptx
Online Voting System Project Proposal ( Presentation Slide).pptxOnline Voting System Project Proposal ( Presentation Slide).pptx
Online Voting System Project Proposal ( Presentation Slide).pptxKhondokerAbuNaim
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051daniemol
 
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...NaveenPeter8
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Data Structure and Algorithms Merge Sort
Data Structure and Algorithms Merge SortData Structure and Algorithms Merge Sort
Data Structure and Algorithms Merge SortManishPrajapati78
 
Online Voting System - Project
Online Voting System - ProjectOnline Voting System - Project
Online Voting System - ProjectSubhashis Das
 
Huffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationHuffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationAkm Monir
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu Piyush Rochwani
 
C bitwise operators
C bitwise operatorsC bitwise operators
C bitwise operatorsSuneel Dogra
 
Computer notes - Expression Tree
Computer notes - Expression TreeComputer notes - Expression Tree
Computer notes - Expression Treeecomputernotes
 
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMSCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMAbdul Khaliq
 
17. Trees and Graphs
17. Trees and Graphs17. Trees and Graphs
17. Trees and GraphsIntro C# Book
 

What's hot (20)

Micro project list dms- 22319
Micro project list dms- 22319Micro project list dms- 22319
Micro project list dms- 22319
 
Binary expression tree
Binary expression treeBinary expression tree
Binary expression tree
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentation
 
Online Voting System Project Proposal ( Presentation Slide).pptx
Online Voting System Project Proposal ( Presentation Slide).pptxOnline Voting System Project Proposal ( Presentation Slide).pptx
Online Voting System Project Proposal ( Presentation Slide).pptx
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
 
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Data Structure and Algorithms Merge Sort
Data Structure and Algorithms Merge SortData Structure and Algorithms Merge Sort
Data Structure and Algorithms Merge Sort
 
Online Voting System - Project
Online Voting System - ProjectOnline Voting System - Project
Online Voting System - Project
 
Huffman Coding Algorithm Presentation
Huffman Coding Algorithm PresentationHuffman Coding Algorithm Presentation
Huffman Coding Algorithm Presentation
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
 
linear probing
linear probinglinear probing
linear probing
 
E voting
E voting E voting
E voting
 
pipelining
pipeliningpipelining
pipelining
 
C bitwise operators
C bitwise operatorsC bitwise operators
C bitwise operators
 
Computer notes - Expression Tree
Computer notes - Expression TreeComputer notes - Expression Tree
Computer notes - Expression Tree
 
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTMSCSJ3553 - Artificial Intelligence Final Exam paper - UTM
SCSJ3553 - Artificial Intelligence Final Exam paper - UTM
 
Shift Register
Shift RegisterShift Register
Shift Register
 
Ch12 microprocessor interrupts
Ch12 microprocessor interruptsCh12 microprocessor interrupts
Ch12 microprocessor interrupts
 
17. Trees and Graphs
17. Trees and Graphs17. Trees and Graphs
17. Trees and Graphs
 

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

Traffic Light Controller Using Fpga
Traffic Light Controller Using FpgaTraffic Light Controller Using Fpga
Traffic Light Controller Using FpgaIJERA Editor
 
Parking Control System using PLC
Parking Control System using PLCParking Control System using PLC
Parking Control System using PLCZunAib Ali
 
C++ Program Auto workshop service system
C++ Program Auto workshop service systemC++ Program Auto workshop service system
C++ Program Auto workshop service systemShahzaib Farooq
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Shipra 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 DSPIAEME 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 SystemIRJET Journal
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing ModesMayank Garg
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical fileArchita 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 assignementAkhtarzeb Khan
 
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 systemVladimirZitoli
 

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

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 

Recently uploaded (20)

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 

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