0% found this document useful (0 votes)
3 views19 pages

IST2010-Week13-Sample Project Traffic Light System

This document details the development of a traffic light control system using assembly language, specifically for the 8086 microprocessor, simulated with emu8086. It outlines the objectives, types of traffic signals, benefits, and the procedure followed to create the program, emphasizing its real-life applicability and efficiency in managing traffic. The results demonstrate accurate coordination of vehicles with traffic signals, while suggestions for improvements include incorporating pedestrian signals and optimizing traffic flow.

Uploaded by

rickyjunior814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views19 pages

IST2010-Week13-Sample Project Traffic Light System

This document details the development of a traffic light control system using assembly language, specifically for the 8086 microprocessor, simulated with emu8086. It outlines the objectives, types of traffic signals, benefits, and the procedure followed to create the program, emphasizing its real-life applicability and efficiency in managing traffic. The results demonstrate accurate coordination of vehicles with traffic signals, while suggestions for improvements include incorporating pedestrian signals and optimizing traffic flow.

Uploaded by

rickyjunior814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

TRAFFIC LIGHT

SYSTEM USING
ASSEMBLY LANGUAGE
ABSTRACT

• This report is made to cover all the aspects on the program of the traffic
light system made. It has explained what kind of signals are there and
for what purpose it’s there.

• There are different kind of signals for cars, pedestrians and also
equestrians.

• The apparatus used was emu8086 and the procedure to create the
program is evaluated using a flowchart. It covers the whole overview of
the process.

• This program is made so that it can be implemented in real life scenarios


OBJECTIVES

• To create a program that controls traffic lights applicable to


real life scenarios.

• To control traffic lights efficiently and effectively.

• To analyze the effect of delay time on performance of traffic


lights control system.
INTRODUCTION

• The project was carried out to come up with a traffic lights control system
using assembly language program.
• It was simulated using an emulator.
• Assembly language is a low-level programming language for a particular
computer architecture in contrast to most high-level programming
languages, which are generally portable across multiple systems.
• Assembly language is converted into executable machine code by a utility
program referred to as an assembler like NASM, MASM.
INTRODUCTION

• In this project emulators used is known as emu8086.

• For assembly language there are advantages and disadvantages, some of the advantages are
that it requires less memory during execution and time is likewise less used.

• It also allows optimization of systems to user’s preference.

• One disadvantage of assembly language is lack of portability. Written assembly language


codes are based on specific machines.

• Therefore, for the project assembly language of 8086 microprocessor was used to achieve the
results.
TYPES OF TRAFFIC LIGHTS

• Traffic lights is a set of automatically operated colored lights typically


red, amber (yellow), and green, for controlling traffic at road
junctions, pedestrian crossings, and roundabouts.

• The following are examples of different types of traffic lights:

Signals for Equestrians; These signals consist of


Red and Green lights, but with a silhouette of a
horse and rider.
TYPES OF TRAFFIC LIGHTS

• Pedestrian Signals; These signals consist of Red and Green lights, but with a
silhouette of a man standing for the red, and a walking figure for the green.
• Wig-wag signals are traffic signals consisting of a set of three lamps mounted on
a rectangular board, with an upper pair of horizontally aligned red lamps which
flash alternately ('wig-wag') when in operation.
• Installation of the traffic sensor nodes into small holes centered in each lane in the
roadbed.
• Data collected by the nodes is used to compare the numbers of cars between the
lanes and access is granted based on the number of cars in each lane. It has the
usual green to red lights.
BENEFITS

• Creating a program that controls traffic lights


• Provision for the side street vehicles
which can be implemented in real life scenarios.
to enter the traffic stream.
• It helps reduce traffic around junctions.
• Providing pedestrians to cross the
• Reduce the work for police because they won't
street safely.
have to stand all day to control the traffic.
• Potential reduction of accidents.
• Ensures orderly movement of traffic in all
• Reduces conflicts hence ensuring
directions.
safety.
• Provisions for the progressive flow of traffic in
a signal system corridor. • Possible reduction in delays.
• Possible improvements in capacity
APPARATUS

• The project required simulation of the traffic lights and


emulator 8086 was used.

• The program consisted of assembly language code for


8086 microprocessor to be executed.
PROCEDURE

• The first step was to come up with different situations that are possible
in traffic signals.

• A flow chart was drawn to illustrate the procedures followed by the


program.

• Based on the flow chart, the program began execution with a delay of 5
seconds before all the red lights in each lane turned red.

• After another 5 seconds the north and south lanes get ready before the
lights turned green for the cars to move.
FLOW CHART

 The process is repeated


starting with the east and west
lane moving while north and
south lanes are red.
 The program was in
continuous mode until exit
was triggered by ending the
program.
PROCEDURE

• The program was created using assembly language.


• In the program variables were declared to define the different
types of situations executed by the program;
sit1 equ 0011_0000_1100b
sit2 equ 1000_0110_0001b
sit3 equ 0110_1001_1010b
sit4 equ 0100_1101_0011b
all_red equ 0010_0100_1001b
PROCEDURE

• A function to display the led lights was created with the help of the
different situations.

• A situation was called depending on the lights to be flashed.

• Created a 5 seconds wait duration between the lights with the use of
hexadecimal digits to represent the time taken.

• The program displayed all the lights with cars moving across the lanes
effectively.
REGISTER RESULTS

Instruction AX BX CX DX
mov ax, 0000 0000 0045 0000
all_red
out 4, ax 0249 0000 0045 0000
mov ax, sit1 0249 0000 0045 0000
out 4,ax 030C 0000 0045 0000
mov cx, 4Ch 030C 0000 0045 0000
mov dx, 030C 0000 004C 0000
4B40h
mov ah, 86h 030C 0000 004C 4B40
int 15h 860C 0000 004C 4B40
PROGRAM RESULTS

• The results were accurate and showed how the cars coordinated with the signals-

if the lights turned red, the cars stopped, if they turned amber then the car got

ready to move and finally when the lights turned green, the cars started moving.

• The signal lights kept changing after every 5 seconds.


DELAY TESTS
For 10 sec;
Value for ax changes from 0000 to 860C
We then tested the same program with Value of bx changes from 0000 to 0000
different delay time. The results are Value of cx changes from 0045 to 0098
shown below: Value of dx changes from 0000 to 9680

• For 5 sec;
For 20 sec;
Value for ax changes from 0000 to 8661
Value for ax changes from 0000 to 860C
Value of bx changes from 0000 to 0000 Value of bx changes from 0000 to 0000

Value of cx changes from 0045 to 004C Value of cx changes from 0045 to 0131
Value of dx changes from 0000 to 2D00
Value of dx changes from 0000 to 4B40
IMPROVEMENTS

• Some improvement can be made in the project whereby it incorporates


pedestrian signals in the project and whereby there is a simulation of a
figure acting as a pedestrian crossing the road safely with the proper
signals being lit up.

• Furthermore we can improve on having more cars per lane and looking
at the results of the traffic timers then along with different delay times to
see the movement when there is traffic.
CODE USED
CONCLUSION

• The program created for the traffic lights worked well and it was made in order to help

improve the traffic system in the real world. Once this method is applied it will reduce

the unnecessary traffic everywhere.

• The above problem/project operates similarly to the real life situation, i.e. the traffic light

colors and their individual operations.

• In addition, it also responds to different delay times to show that the program code is

correct and provides a smooth operation. However, the program can be modified to

increase the number of cars passing through as well as for emergency services i.e.

special access.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy