Interfacing PIC16F877A with LCD using CCS C compiler

PIC16F877A LCD example
PIC16F877A LCD example hardware circuit 

This topic shows a simple example for interfacing LCD display (with HD44780 or compliant controller) with PIC16F877A microcontroller using CCS PIC C compiler. 
In 4-bit mode there are 7 data lines between the PIC microcontroller and the LCD which are: RS, R/W, E, D4, D5, D6 and D7.

Interface PIC16F877A with LCD circuit:
PIC16F877A LCD example circuit schematic diagram is shown below.
PIC16F877A LCD example circuit
In this example the PIC16F877A microcontroller runs with 8MHz crystal oscillator and it must be supplied with 5V between pins VDD (#11) and VSS (#12).

Interface PIC16F877A with LCD display C code:
The C code below was tested with CCS C compiler version 5.051.

Interface PIC16F877A with LCD video:

Leave a Reply

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