https://github.com/thebeachmaster/pic-lcd
Sample PIC routine with LCD Display
https://github.com/thebeachmaster/pic-lcd
Last synced: 4 months ago
JSON representation
Sample PIC routine with LCD Display
- Host: GitHub
- URL: https://github.com/thebeachmaster/pic-lcd
- Owner: TheBeachMaster
- License: apache-2.0
- Created: 2018-03-17T12:45:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T23:58:31.000Z (over 7 years ago)
- Last Synced: 2025-06-20T20:09:18.476Z (4 months ago)
- Language: Makefile
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pic-lcd
Getting Started with MPLAB-X-IDE - PIC16F877A LCD Sample
## Prep-work
+ Download and install [MPLAB-X-IDE](https://www.microchip.com/mplab/mplab-x-ide)
+ Download and setup [XC-N[8,16,32]](https://www.microchip.com/mplab/compilers) Compilers. Ensure all are added to path.## Create a PIC16F877A project
+ On your new MPLAB X-IDE **Create A New Project** by clicking on the *File* option or use **Ctrl+Shift+N** key options.
+ Select **Standalone Project**
+ On Clicking *Next* Select the **Mid-Range 8-bit MCUs (PIC10/12/16/MCP)** Familiy of MCUs.
+ Under *Device* scroll or put in **PIC16F877A**
+ Select **PICkit3** under *Tools* on clicking *Next*
+ On the next window select the **XC8** compiler
+ Finish off by specifying your project directory## Compile Library
```bash
> xc8 --chip=16F877a --output=lpp .\lib\lcd.c --outdir=lib... For Windows
```
```bash
$ xc8 --chip=16F877a --output=lpp ./src/lcd.c --outdir=./lib
... Unix-like
```# Include prebuilt library into project
+ Right-click on project and Select **Properties>Libraries>Add Library/Object File**
+ Select the `.lpp` that was generated above
+ Go back to project window and right-click on **Source Files>Add Existing Item** and select the library source file `.c` . Ensure *Store path* is set to **Auto** or **Relative** depending on which you're comfortable with.
+ Under the same Source Files options Right click to add a **New>main.c** file
+ Right-click on the **Header Files** option to **Add Existing Item**
+ Select the header files for the libary `.h`
+ That's it, ensure to include your library files in the `.c` file as well.
```c
#include "path_to_lib_file.h"
```
+ **Build**> Generated `.hex` code is found in the `dist` folder
> Project details can be obtained from [this link](https://electrosome.com/automatic-power-factor-controller-using-microcontroller/) 