Skip to content

LucPac/PIC16F887_Traffic_light

Repository files navigation

🚦 Traffic Light System - PIC16F887 🚦

✨ A traffic light system simulation for a four-way intersection using PIC16F887 microcontroller.

Supports 3 flexible operating modes: automatic, manual control, and night warning.

PIC16F887 Badge CCS C Badge Proteus Badge


OverviewProject StructureHow to UseFeaturesReal Product



🚀 Overview

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:

  1. Mode 1 - Automatic: Red, yellow, and green lights cycle in sequence.
  2. Mode 2 - Manual Control: Users press buttons to turn lights on and off manually.
  3. Mode 3 - Night Warning: All 4 yellow lights blink continuously as a warning.

📁 Project Structure

Den_Giao_Thong_Nga_Tu/
│
├── Traffic_light.c          # CCS C source code
│          
├── Traffic_light.pdsprj     # Proteus simulation file
│  
└── README.md                # Project description

🛠️ How to Use

🔧 Required Software

  1. CCS C Compiler – To compile the .c source code

  2. Proteus Design Suite – To simulate the .pdsprj circuit

📥 Steps

  1. Download the repository:
git clone https://github.com/LucPac/PIC16F887_Traffic_light.git
  1. Open Traffic_light.c file with CCS C to view, edit, or compile the source code.

  2. Open Traffic_light.pdsprj file with Proteus to simulate the circuit.

  3. Select a mode and observe the traffic light changes in Proteus.


⚙️ Features

| 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.                 |

🚩 Real Product

  • PCB

image

image

  • Simulation Video

image




Thank you for visiting! I hope this repository is helpful for your learning and research. 😊

About

No description or website provided.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages