https://github.com/sulaimanniazi/pic-simple-calculator
A simple calculator made using PIC16F877A and displaying values on LCD display LM016L
https://github.com/sulaimanniazi/pic-simple-calculator
button-control buttons calculator lcd lcd-display lcd-screen lcd1602 lcd16x2 lm016l microchip-pic microcontroller microcontrollers mplab mplab-ide mplabx mplabxide pic pic16f877a proteus proteus-simulation
Last synced: 8 months ago
JSON representation
A simple calculator made using PIC16F877A and displaying values on LCD display LM016L
- Host: GitHub
- URL: https://github.com/sulaimanniazi/pic-simple-calculator
- Owner: SulaimanNiazi
- Created: 2025-02-15T08:57:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T16:36:34.000Z (8 months ago)
- Last Synced: 2025-02-22T17:29:32.382Z (8 months ago)
- Topics: button-control, buttons, calculator, lcd, lcd-display, lcd-screen, lcd1602, lcd16x2, lm016l, microchip-pic, microcontroller, microcontrollers, mplab, mplab-ide, mplabx, mplabxide, pic, pic16f877a, proteus, proteus-simulation
- Language: C
- Homepage:
- Size: 285 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PIC Simple Calculator
This project is a firmware application designed for the PIC16F877A microcontroller to function as a calculator. It displays the results on an LM016L LCD display. The firmware is developed using the MPLAB X IDE and the XC8 compiler.
## Table of Contents
- [Prerequisites](#prerequisites)
- [Building the Project](#building-the-project)
- [Apparatus](#apparatus)
- [Uploading to the Microcontroller](#uploading-to-the-microcontroller)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)## Prerequisites
- MPLAB X IDE
- XC8 Compiler
- PIC16F877A Microcontroller## Building the Project
1. Open the project in MPLAB X IDE.
2. Ensure the XC8 compiler is selected.
3. Build the project to generate the `.hex` or `.cof` file.
4. Alternatively, you can build the project using Visual Studio Code with the MPLAB extension. Set the project output file path, name, and extension using `Ctrl+Shift+P` and selecting "Edit Project Properties".## Apparatus
Necessary components that can't be changed:
1. PIC16F877A microcontroller: To run the program.
1. LM016L LCD display: To display output.
1. Quartz Crystal and 2 1nF non-polarized capacitors.Optional components depending on your circuit:
1. 16 Buttons
1. 9 Resistors## Uploading to the Microcontroller
After building the project, upload the generated `.hex` or `.cof` file to the PIC16F877A microcontroller using a suitable programmer. The file can be found in either of the following paths:
1. In case of using MPLAB X IDE: [dist\default\debug\PIC_Calculator.X.debug.cof](./dist/default/debug/PIC_Calculator.X.debug.cof)
2. In case of using Visual Studio Code (if the file name was set as default): [out\PIC_Simple_Calculator\default.hex](./out/PIC_Simple_Calculator/PIC_Calculator.hex)## Usage
1. Connect the microcontroller and the necessary components as per the circuit diagram.
2. Power on the system.
3. The LCD will display the current input and results.
4. Use the buttons to input numbers and operations.## Troubleshooting
- Ensure all connections are secure and correct.
- Verify the microcontroller is programmed with the correct `.hex` or `.cof` file.
- Check the power supply to the microcontroller and other components.
- If the LCD does not display correctly, check the connections and contrast settings.