Interfacing LCD and Keypad with PIC16F877A Microcontroller




Interfacing LCD and Keypad are one of the important interfacing concepts of PIC microcontroller since both the input and output element can form a complete embedded system design. This tutorial is about teaching you how to get input input values from keypad by polling method and display the input into a 16×2 LCD.Interfacing LCD and Keypad with PIC16F877A Microcontroller

16×2 LCD:

This type of LCD is widely used to display the status of the system and to display the obtain output. This LCD consists of 16 columns and 2 rows, therefore named as 16×2 LCD. Usually a LCD consists of two built in registers known as Data and Command register. Command reg is meant for giving commands such as blink on, cursor on/off etc while Data reg is to display the input character.

You have to follow these steps to write a command or data into the LCD.

  • Place the Data/Command in the pins D0-D7 of the LCD.
  • If you are intended to write command you gotta make the RS(register select) pin of the LCD low, that is RS=0
  • Whereas for writing data you have to make this RS high, that is RS=1
  • Then the EN of the LCD must undergo a high to low logic transition with some delay in between them, that is EN=1 to EN=0 with specific delay.
  • The R/W pin should remain in the Logic 0.

Schematic Interfacing LCD and Keypad with PIC16F877A Microcontroller

4×3 Keypad:

We have used a 4×3 keypad which means it has four rows and three columns in it. The keypad was scanned for any key inputs and this was done by means of a method called polling. The scanning takes place by keeping a specific Row low at a time and read the status of the column pins as input at that instant. This chain goes on through all the rows and by this way input is read by Microcontroller.

READ  pic18f2550 Microcontroller Project Board

For more detail: Interfacing LCD and Keypad with PIC16F877A Microcontroller




Current Project / Post can also be found using:

  • 16f877 lcd keypad code
  • interfacing lcd with pic16f877
  • lcd display and keypad microcontroller
  • lcd gsm interface with pic 16f877 microcontroler

Leave a Comment

*
= 5 + 8

Read previous post:
synchronous step-down DC DC
150V synchronous step-down DC/DC includes surge protection

Features Wide VIN Range: 4V to 140V (150V Abs Max) Wide Output Voltage Range: 0.8V to 60V Adjustable Gate Drive...

Close
Scroll to top