This document describes a program written for an 8051 microcontroller to control a simplified traffic light system. The program uses LEDs and switches to simulate traffic lights and buttons. It begins with simple programs to turn an LED on and off, then adds blinking and reading input switches. The switches represent a walk button and car sensor, and control the corresponding LEDs. The program is improved by adding a subroutine for debouncing the switches. Finally, the program is modified to control the LEDs as traffic lights based on the switch states, with one LED representing green and the other red. Experimental results showing the traffic light simulation on an MDE development board are discussed.