✨ A traffic light system simulation for a four-way intersection using PIC16F887 microcontroller.
Supports 3 flexible operating modes: automatic, manual control, and night warning.
Overview • Project Structure • How to Use • Features • Real Product
This is a traffic light system simulation for a four-way intersection using PIC16F887 microcontroller. The system supports 3 flexible operating modes that can be selected using buttons or switches.
Each mode accurately simulates how real traffic lights work:
- Mode 1 - Automatic: Red, yellow, and green lights cycle in sequence.
- Mode 2 - Manual Control: Users press buttons to turn lights on and off manually.
- Mode 3 - Night Warning: All 4 yellow lights blink continuously as a warning.
Den_Giao_Thong_Nga_Tu/
│
├── Traffic_light.c # CCS C source code
│
├── Traffic_light.pdsprj # Proteus simulation file
│
└── README.md # Project description-
CCS C Compiler – To compile the .c source code
-
Proteus Design Suite – To simulate the .pdsprj circuit
- Download the repository:
git clone https://github.com/LucPac/PIC16F887_Traffic_light.git-
Open Traffic_light.c file with CCS C to view, edit, or compile the source code.
-
Open Traffic_light.pdsprj file with Proteus to simulate the circuit.
-
Select a mode and observe the traffic light changes in Proteus.
| Mode | Description |
| -------------------- | -------------------------------------------------------------------------- |
| 1 - Automatic | Lights cycle through: red → green → yellow. Each has a preset time. |
| 2 - Manual Control | All lights are off. Users press individual buttons to turn lights on/off. |
| 3 - Night Warning | All 4 yellow lights in all directions blink continuously. |- PCB
- Simulation Video
Thank you for visiting! I hope this repository is helpful for your learning and research. 😊


