Traffic light controller using microprocessor

Traffic Light Controller Using 8085 Microprocessor


The main aim of this project is to design a Traffic light controller using 8085 microprocessor, interfacing with peripheral device 8085, and program implementing the process.


The 8085 Microprocessor is a popular Microprocessor used in Industries for various applications. Such as traffic light control, temperature control, stepper motor control, etc. In this project, the traffic lights are interfaced to Microprocessor system through buffer and ports of programmable peripheral Interface 8255. So the traffic lights can be automatically switched ON/OFF in desired sequence. The Interface board has been designed to work with parallel port of Microprocessor system.

The hardware of the system consists of two parts. The first part is Microprocessor based system with 8085. Microprocessor as CPU and the peripheral devices like EPROM, RAM, Keyboard & Display Controller 8279, Programmable as Peripheral Interface 8255, 26 pin parallel port connector, 21 keys Hexa key pad and six number of seven segment LED’s.

The second part is the traffic light controller interface board, which consist of 36 LED’s in which 20 LED’s are used for vehicle traffic and they are connected to 20 port lines of 8255 through Buffer. Remaining LED’s are used for pedestrian traffic. The traffic light interface board is connected to Main board using 26 core flat cables to 26-pin Port connector. The LED’s can be switched ON/OFF in the specified sequence by the Microprocessor.

The normal function of traffic lights requires sophisticated control and coordination to ensure that traffic moves as smoothly and safely as possible and that pedestrians are protected when they cross the roads. A variety of different control systems are used to accomplish this, ranging from simple clockwork mechanisms to sophisticated computerized control and coordination systems that self-adjust to minimize delay to people using the road.

Traffic Controller Systems

A traffic signal is typically controlled by a controller inside a cabinet mounted on a concrete pad. Although some electro-mechanical controllers are still in use (New York City still has 4,800), modern traffic controllers are solid state. The cabinet typically contains a power panel, to distribute electrical power in the cabinet; a detector interface panel, to connect to loop detectors and other detectors; detector amplifiers; the controller itself; a conflict monitor unit; flash transfer relays; a police panel, to allow the police to disable the signal; and other components.

Fixed Time Control

The simplest control system uses a timer (fixed-time): each phase of the signal lasts for a specific duration before the next phase occurs; this pattern repeats itself regardless of traffic. Many older traffic light installations still use these, and timer-based signals are effective in one way grids where it is often possible to coordinate the traffic lights to the posted speed limit. They are however disadvantageous when the signal timing of an intersection would profit from being adapted to the dominant flows changing over the time of the day.

Dynamic Control

Dynamic, or actuated, signals are programmed to adjust their timing and phasing to meet changing traffic conditions. The system adjusts signal phasing and timing to minimize the delay of people going through the intersection. It is also commonplace to alter the control strategy of a traffic light based on the time of day and day of the week, or for other special circumstances such as a major event causing unusual demand at an intersection.

The controller uses input from detectors, which are sensors that inform the controller processor whether vehicles or other road users are present, to adjust signal timing and phasing within the limits set by the controllers

programming. It can give more time to an intersection approach that is experiencing heavy traffic, or shorten or even skip a phase that has little or no traffic waiting for a green light. Detectors can be grouped into three classes: in-pavement detectors, non-intrusive detectors, and detection for non-motorized road users.

Working Program

Design of a microprocessor system to control traffic lights. The traffic light arrangement is as shown in Fig. The traffic should be controlled in the following manner.

1) Allow traffic from W to E and E to W transition for 20 seconds. 2) Give transition period of 5 seconds (Yellow bulbs ON) 3) Allow traffic from N to 5 and 5 to N for 20 seconds 4) Give transition period of 5 seconds (Yellow bulbs ON) 5) Repeat the process.

Source Program:

MVI A, 80H: Initialize 8255, port A and port B

OUT 83H (CR): in output mode


OUT 80H (PA): Send data on PA to glow R1 and R2

MVI A, 24H

OUT 81H (PB): Send data on PB to glow G3 and G4

MVI C, 28H: Load multiplier count (40ıο) for delay

CALL DELAY: Call delay subroutine

MVI A, 12H

OUT (81H) PA: Send data on Port A to glow Y1 and Y2

OUT (81H) PB: Send data on port B to glow Y3 and Y4

MVI C, 0AH: Load multiplier count (10ıο) for delay

CALL: DELAY: Call delay subroutine

MVI A, 24H

OUT (80H) PA: Send data on port A to glow G1 and G2

MVI A, 09H

OUT (81H) PB: Send data on port B to glow R3 and R4

MVI C, 28H: Load multiplier count (40ıο) for delay

CALL DELAY: Call delay subroutine

MVI A, 12H

OUT PA: Send data on port A to glow Y1 and Y2

OUT PB: Send data on port B to glow Y3 and Y4

MVI C, 0AH: Load multiplier count (10ıο) for delay

CALL DELAY: Call delay subroutine


Delay Subroutine:

DELAY: LXI D, Count: Load count to give 0.5 sec delay

BACK: DCX D: Decrement counter


ORA E: Check whether count is 0

JNZ BACK: If not zero, repeat

DCR C: Check if multiplier zero, otherwise repeat


RET: Return to main program






v U.S.Shah, Microprocessor and its applications, Tech- Max Pulications, Pune.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our Guarantees

Money-back Guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism Guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision Policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy Policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation Guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more