Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gmostofabd/8051-up-down-counter
π οΈ A simple Up Down Counter using 8051 MCU, Seven Segment Display (SSD) and Push Buttons to Inc, Dec and Reset the value of the counter.
https://github.com/gmostofabd/8051-up-down-counter
8051 anode assembly cathode circuit common languageb microcontrollers programming proteus schematic seven-segments-display simulation ssd
Last synced: 24 days ago
JSON representation
π οΈ A simple Up Down Counter using 8051 MCU, Seven Segment Display (SSD) and Push Buttons to Inc, Dec and Reset the value of the counter.
- Host: GitHub
- URL: https://github.com/gmostofabd/8051-up-down-counter
- Owner: gmostofabd
- Created: 2022-11-24T12:15:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-22T15:56:28.000Z (5 months ago)
- Last Synced: 2024-11-19T01:40:30.530Z (3 months ago)
- Topics: 8051, anode, assembly, cathode, circuit, common, languageb, microcontrollers, programming, proteus, schematic, seven-segments-display, simulation, ssd
- Language: Assembly
- Homepage: https://gmostofabd.github.io/8051-Up-Down-Counter/
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# βοΈ **8051 Up-Down Counter using Seven-Segment Display (SSD)**
![]()
---
## π **Overview**
This project demonstrates a **simple Up-Down Counter** using the **[AT89C51](https://www.atmel.com/products/microcontrollers/8051.aspx)** Microcontroller, part of the **[8051 MCU](https://en.wikipedia.org/wiki/Intel_MCS-51)** family. The counter output is displayed on a **Seven-Segment Display (SSD)** and controlled by external **push buttons** for incrementing, decrementing, and resetting.
The program is written in **[Assembly language](https://en.wikipedia.org/wiki/Assembly_language)**, and the circuit is simulated using **[Proteus](https://www.labcenter.com/)** (Version 8.9). This repository includes:
- **[Assembly Code](https://en.wikipedia.org/wiki/Assembly_language)**
- **Precompiled HEX File**
- **[Proteus Simulation Circuit](https://www.labcenter.com/)**The project has been successfully tested on both simulation and real hardware.
---
## π **Keywords**
**[AT89C51 Microcontroller](https://www.atmel.com/products/microcontrollers/8051.aspx)** |
**[8051](https://en.wikipedia.org/wiki/Intel_MCS-51)** |
**[Assembly Language](https://en.wikipedia.org/wiki/Assembly_language)** |
**[Simulation](https://www.labcenter.com/)** |
**[Proteus](https://www.labcenter.com/)** |
**[Microcontroller Programming](https://en.wikipedia.org/wiki/Microcontroller)**---
## βοΈ **Key Features**
| Feature | Description |
|-------------------------------|-----------------------------------------------------------------------------|
| π’ **Up-Down Counter** | Real-time counting with a 7-segment display |
| ποΈ **Push Button Controls** | Buttons for incrementing, decrementing, and resetting the counter |
| π₯οΈ **Proteus Simulation** | Ready-to-use simulation circuit (Proteus 8.9 compatible) |
| πΎ **Assembly Programming** | Written entirely in **Assembly language** for the AT89C51 |
| π οΈ **Real Hardware Support** | Tested successfully on physical hardware |---
---
## π¦ **Contents**
| File | Description |
|-------------------------------|-----------------------------------------------------------------------------|
| `AT89C51_Up_Down_Counter.asm` | Assembly source code for the AT89C51 microcontroller |
| `AT89C51_Up_Down_Counter.hex` | Precompiled HEX file for direct microcontroller upload |
| `Proteus_Simulation.pdsprj` | Proteus Design Suite simulation file |
| **Screenshots** | Demonstrations from the Proteus simulation |---
## π οΈ **Hardware & Circuit Information**| Hardware Component | Description |
|---------------------------------|-----------------------------------------------------------------------------|
| **AT89C51 Microcontroller** | Core of the project, controlling the up-down counting |
| **Seven-Segment Display (SSD)** | A common cathode display for output |
| **Push Buttons** | Used for incrementing, decrementing, and resetting the counter |
| **Transistors (e.g., NPN)** | To drive the SSD segments |
| **Resistors** | For current-limiting to protect the microcontroller and SSD |
| **Power Supply** | A 5V DC power supply for the microcontroller and SSD circuit |---
![]()
### **Circuit Explanation**:
The **Seven-Segment Display** in this project is a **common cathode** type, meaning all cathodes are connected to ground. The microcontroller sends signals to the anode pins through **transistor drivers** to control which segments are illuminated, forming numbers 0β9.
Each push button is connected to an input pin on the microcontroller, allowing the counter value to be incremented, decremented, or reset. **Resistors** ensure proper current control to prevent damage to the microcontroller and display.
---
## π₯οΈ **Installation & Usage**
### **Step-by-Step Guide:**
1. **Clone this repository**:
```bash
git clone https://github.com/gmostofabd/8051_Up_Down_Counter_SSD.git
```2. **Compile the Assembly Code**:
Open the `AT89C51_Up_Down_Counter.asm` file in **MIDE-51** or a compatible IDE, and compile it to generate the **HEX file**.3. **Simulate in Proteus**:
Open **Proteus Design Suite**, load the provided simulation file, and run the simulation to observe the counterβs behavior.4. **Program the Microcontroller**:
For real hardware, upload the **HEX file** to the AT89C51 microcontroller using a programmer.5. **Test the Circuit**:
Assemble the hardware based on the provided circuit diagram, power it on, and test the push buttons for incrementing, decrementing, and resetting the counter.---
## π **Additional Information**
### **Seven-Segment Display**:
The **common cathode** display has 8 LEDs (7 segments and 1 decimal point) to represent digits 0-9. The microcontroller drives the LEDs through combinations of HIGH/LOW signals.### **Push Button Controls**:
- **Increment Button**: Increases the counter by 1.
- **Decrement Button**: Decreases the counter by 1.
- **Reset Button**: Resets the counter to 0.For a deeper understanding of the circuit and code, explore the **Proteus simulation** and the comments in the assembly source file.
---
## π€ **Contributing**
We welcome contributions! Feel free to submit pull requests or open issues for any bug fixes, feature enhancements, or optimizations to the assembly code.
---
## π§ **Contact**
For any inquiries or assistance, reach out at [[email protected]](mailto:[email protected]).
---
![]()
If you found this project helpful, give it a β on GitHub!