Skip to content

gmostofabd/8051-Up-Down-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โš™๏ธ 8051 Up-Down Counter using Seven-Segment Display (SSD)

AT89C51 UP DN COUNTER 7 Segment


๐Ÿ“– Overview

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.


๐Ÿ”‘ Keywords

AT89C51 Microcontroller | 8051 | Assembly Language | Simulation | Proteus | Microcontroller Programming


โš™๏ธ 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

7 Segment Display (Common Cathode)

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:

    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 mostofa.melab@gmail.com.


Contact Graphic

If you found this project helpful, give it a โญ on GitHub!

About

๐Ÿ› ๏ธ 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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors