PIC16F84A LCD interfacing code (In 8bit mode) + Proteus simulation

Summary of PIC16F84A LCD interfacing code (In 8bit mode) + Proteus simulation


This article details LCD interfacing with a PIC16F84A microcontroller using C language in MPLAB with the HI-TECH C compiler. It covers circuit connections where RA0 serves as Enable, RA1 as RS, and PORTB as the data bus. The code displays "Hello" upon startup and includes pin selection configurations.

Parts used in the PIC16F84A LCD Interfacing Project:

  • PIC16F84A microcontroller
  • LCD display
  • MPLAB IDE
  • HI-TECH C compiler
  • Proteus simulation software

This post provides the LCD[1] interfacing code using PIC16F84A microcontroller. 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.

PIC16F84A LCD interfacing 8bit mode

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

LCD interfacing circuit with PIC16F84A is shown below.

In the above figure, RA0 pin is being used as Enable pin for LCD. RA1 pin is used as RS pin and PORTB is used as Data bus for the LCD. When code starts running then Hello is displayed on the LCD.

PIC16F84A LCD interfacing 8bit mode schematic

Code

In the code you can easily select pins to be used for interfacing with the LCD. Following figure shows the pin selection code.

Downloads

LCD interfacing code using PIC16F84A was compiled in MPLAB v8.85 with HI-TECH C v9.83 compiler and simulation was made in Proteus v7.10. To download code and Proteus simulation click here.

 

For more detail: PIC16F84A LCD interfacing code (In 8bit mode) + Proteus simulation

Quick Solutions to Questions related to PIC16F84A LCD Interfacing:

  • What language is used for the LCD interfacing code?
    The code is written in C language.
  • Which pins are used for the Enable and RS functions?
    RA0 pin is used as the Enable pin and RA1 pin is used as the RS pin.
  • How is the data bus connected to the LCD?
    PORTB is used as the Data bus for the LCD.
  • What text appears on the LCD when the code starts running?
    Hello is displayed on the LCD when the code starts running.
  • Can I select different pins for interfacing in the code?
    Yes, you can easily select pins to be used for interfacing with the LCD in the code.
  • Which version of MPLAB was used to compile the code?
    The code was compiled in MPLAB v8.85.
  • Which compiler was used for this project?
    HI-TECH C v9.83 compiler was used.
  • What software was used for simulation?
    Simulation was made in Proteus v7.10.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter