Interfacing PIC16F887 with LCD display – CCS C compiler

PIC16F887 LCD Example (Hello world!)
PIC16F887 LCD hardware circuit

This post shows a simple example for interfacing PIC16F887 microcontroller with 16×2 and 20×4 LCDs using CCS C compiler. CCS C has a driver which allows us to control LCDs that have HD44780 or compliant controller.

Required Components:

  • PIC16F887 Microcontroller
  • 1602 (16×2) or 2004 (20×4) or any LCD compatible with HD44780 controller
  • 10K Potentiometer
  • 0.1µF Ceramic capacitor (optional)
  • +5V Power source
  • Breadboard
  • Jumper wires

Interfacing PIC16F887 with LCD display circuit:
Circuit diagram of the example is shown below.

PIC16F887 LCD circuit

Note that the internal oscillator of the microcontroller is used and MCLR (pin 1) pin is configured as an input pin.

Interfacing PIC16F887 with LCD display CCS C code:

Simulation video:
This video shows the simulation using Proteus software.

Source code, hex and simulation files can be downloaded from the following link:
Download

2 comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.