PIC16F877 LCD interfacing code (In 4bit mode) and Proteus simulation

PIC16F877 LCD interfacing (1)

This PIC16F877 microcontroller tutorial answers the question,
“How to interface LCD[1]  in 4bit mode with PIC16F877″ ?

PIC16F877 LCD interfacing (1)

Also, using PIC16 simulator (Proteus) you can verify this LCD code and change it according to your needs. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the ‘Downloads‘ section at the bottom of this page.

It is assumed that you know how to blink an LED with PIC16F877 microcontroller. If you don’t then please read this page first, before proceeding with this article.

The following diagram (made in Proteus) shows the PIC microcontroller circuit diagram.

PIC16F877 LCD interfacing schematic

In the above figure, RB0 pin is being used as Enable pin for LCD. RB1 pin is used as RS pin and PORTB (RB4 to RB7) pins are used as Data bus for the LCD. When code starts running then ‘Hello World!‘ is displayed on the LCD.

Leave a Comment

Your email address will not be published. Required fields are marked *