This project demonstrates a simple Up-Down Counter using the AT89C51 Microcontroller, part of the 8051 MCU 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, and the circuit is simulated using Proteus (Version 8.9). This repository includes:
The project has been successfully tested on both simulation and real hardware.
AT89C51 Microcontroller | 8051 | Assembly Language | Simulation | Proteus | Microcontroller Programming
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.
git clone https://github.com/gmostofabd/8051_Up_Down_Counter_SSD.git
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.
Simulate in Proteus: Open Proteus Design Suite, load the provided simulation file, and run the simulation to observe the counter’s behavior.
Program the Microcontroller: For real hardware, upload the HEX file to the AT89C51 microcontroller using a programmer.
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.
For a deeper understanding of the circuit and code, explore the Proteus simulation and the comments in the assembly source file.
We welcome contributions! Feel free to submit pull requests or open issues for any bug fixes, feature enhancements, or optimizations to the assembly code.
For any inquiries or assistance, reach out at mostofa.melab@gmail.com.
If you found this project helpful, give it a ⭐ on GitHub!