Programming Embedded Systems using Assembly Language




This is stated for each of the tasks in the assessment.


Task 1 


Traffic light Simulation using ‘Assembly’ language

In this lab activity, you are requested to simulate a real traffic light environment using Assembly.


Take the following steps to implement the required task:


  • Obtain an Arduino Uno or Mega Board and connect it to the PC.
  • From the computing programmes select Arduino program.
  • Using Microsoft Visio, develop and draw a flowchart of a simple four-phase traffic light.

You can install Visio on your home devices using Microsoft Imagine. Use the link below.


  • Implement the developed algorithm and write a programme in “assembly” to simulate the four phase traffic light and test its functionality.


Figure 1 – four phase traffic lights

  • Modify the developed algorithm and produce a new flowchart to provide a solution for the operation of a junction with two four-phase traffic lights.


  • Implement the modified algorithm in “Assembly” to show its operation.


  • Modify the flowchart for the Junction and provide a new flowchart which provides a pedestrian crossing by using a single green LED (or both RED and green if you prefer). 


  • Write an “Assembly” program to implement the flowchart




  1. Write a function to control each of the traffic lights in assembly


  1. Use the serial port to simulate the pedestrian pressing the button


  1. Both sets of traffic lights should be red in order for the pedestrians to cross safely.


  1. The pedestrian green LED should flash as a warning that the main lights are about to start up


  1. The main lights should sequence to and from pedestrian crossing mode in a safe and tidy sequence.


  1. The state of the lights should be written to the serial port

E.g. L1 = ON, ON, OFF   L2 = OFF, ON, OFF      PED = ON,OFF means traffic light 1 is RED/AMBER, traffic light 2 is AMBER, a pedestrian crossing is RED