Skip to content

ahmedFarouk2020/Traffic-light-system-assembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic light system using 8051 assembly ISA

Schematic

image

Components

  1. 8051 MCU
  2. Two 7-segment displays
  3. Two push button
  4. Two LEDs

Features

1.Display time left

This happens by using main two functions that control the displaying numbers on 7-segments. They use look-up table and decremented until reach the lower value (value 0) then return to the end (value 9).

image image

2.Changing delay between counts

This feature aims to control the frequency of change of 7-segments values. This is done using a variable that is incremented by a switch and another switch to just return the variable to a pre-defined value.

image image image

‘SWITCH’ function sets flags in case of pressing on reset or delay buttons
‘INCREMENT’ function executes the functions according to flags values

3.Controlling maximum value displayed on 7-segments

This is done by incrementing ‘MAX’ variable. The same logic as the above (SWITCH’ function sets flags and SWITCH’ function sets flags)
image image

4.Toggle LEDs when “0 0” value displayed

image image image

The two flags is set in initialization
When each of 7-segments reaches zero -> the the flag 
‘LED’ function is continuously called in main and check for the flag 
If the condition is verified then toggle LEDs

DEMO: Link

Releases

No releases published

Packages

No packages published