AT89C51_Basic_Calculator_Assembly_Proteus

⚙️ AT89C51_Basic_Calculator_Assembly_Proteus

A simple 2-bit calculator using the AT89C51 Microcontroller with Assembly Language Programming.

AT89C51 Calculator


📖 Overview

This project demonstrates a Basic Calculator using the AT89C51 Microcontroller, part of the 8051 MCU family. The calculator performs basic arithmetic operations and displays results on an LCD. It is controlled via a 4x4 keypad, making it a practical example for educational purposes and embedded systems projects.

The program is written in Assembly language, optimized for efficiency and speed, 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 setups, ensuring reliability and accuracy.


🔑 Keywords

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


⚙️ Key Features

| Feature | Description | |-------------------------------|-----------------------------------------------------------------------------| | ➕ **Basic Arithmetic Operations** | Performs addition, subtraction, multiplication, and division | | 🎛️ **User Interface** | Controlled via a user-friendly 4x4 keypad interface | | 🖥️ **Proteus Simulation** | Ready-to-use simulation circuit compatible with Proteus 8.9 | | 💾 **Assembly Programming** | Optimized assembly code for efficient execution on the AT89C51 | | 🛠️ **Real Hardware Support** | Successfully tested on actual hardware for reliable performance |

📦 Contents

| File | Description | |-------------------------------|-----------------------------------------------------------------------------| | `AT89C51_Basic_Calculator.asm` | Assembly source code for the AT89C51 microcontroller | | `AT89C51_Basic_Calculator.hex` | Precompiled HEX file for direct microcontroller upload | | `Proteus_Simulation.pdsprj` | Proteus Design Suite simulation file | | **Screenshots** | Visual demonstrations from the Proteus simulation |

🛠️ Hardware & Circuit Information

| Hardware Component | Description | |---------------------------------|-----------------------------------------------------------------------------| | **AT89C51 Microcontroller** | Central unit managing calculator operations and display | | **LCD** | 16x2 LCD for visual output of calculation results | | **4x4 Keypad** | Input interface for entering numbers and operations | | **Transistors (e.g., NPN)** | Used to interface the microcontroller with the LCD and other components | | **Resistors** | Current-limiting resistors to protect components from overcurrent | | **Power Supply** | A 5V DC power supply for the microcontroller and LCD circuit |

Circuit Explanation:

The LCD displays the results of the calculations, while the microcontroller processes inputs from the 4x4 keypad to perform arithmetic operations. The LCD provides a clear readout, making it easy for users to view results.

Each control component, such as the keypad, is connected to input pins on the microcontroller. Resistors ensure proper current control, preventing damage to the microcontroller and display.


🖥️ Installation & Usage

Step-by-Step Guide:

  1. Clone this repository:
    git clone https://github.com/gmostofabd/AT89C51_Basic_Calculator.git
    
  2. Compile the Assembly Code: Open the AT89C51_Basic_Calculator.asm file in MIDE-51 or any 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 calculator’s functionality.

  4. Program the Microcontroller: For real hardware applications, upload the HEX file to the AT89C51 microcontroller using a compatible programmer.

  5. Test the Circuit: Assemble the hardware according to the provided circuit diagram, power it on, and verify functionality by performing calculations using the keypad.

🔗 Additional Information

LCD Display:

The 16x2 LCD displays the calculation results processed by the microcontroller. The data is updated in real time, providing immediate feedback on calculations.

4x4 Keypad Functionality:

For a deeper understanding of the circuit and code, explore the Proteus simulation and review comments within the assembly source file for explanations of specific code sections.


🤝 Contributing

We welcome contributions! If you have suggestions for improvements or additional features, feel free to submit pull requests or open issues regarding any bug fixes, feature enhancements, or optimizations to the assembly code.


📧 Contact

For any inquiries, feedback, or assistance, please reach out at mostofa.melab@gmail.com.


Contact Graphic

If you found this project helpful, please give it a ⭐ on GitHub! ```