lcd and keypad interfacing code for pic 18f452
#1

I am looking for a full project that uses LCD as an output and a Keypad as an Input ..

for Pic 18f4520
Reply
#2

Abstract

A keypad consists of 3 columns and 4 rows, hence the name, whenever the user taps one button, the column and the row corresponding to that button are shorted, for example, if a user chooses to tap the "5" button, col2 and row2 are shorted, if a users picks "0" button, col2 and row4 are shorted, and so on.

So how do you read a keypad using a Microcontroller?
the method used to read such input is called Scanning, you connect the rows and the columns to the microcontroller, you set the columns as outputs, rows as inputs (or vice versa) and you start feeding a pattern of inputs to the columns while checking the readings of the rows.

For example, if you tied all rows through pull-up resistors to Vcc, all row inputs are typically 1s (1111), now if you start feeding columns with the following pattern, 011, 101, 110, you can check which row conducts the 0 signal to the controller, thus, you'll detect the shorted row and column.
example: if a user presses button "6", when I feed the columns by 011, the rows output would be 1111, when I feed it by 101, the rows output would be also 1111, but when I feed it by 110, button "6" will conduct the 0 signal, thus my rows output would be 1011, Knowing that I used col3 to conduct the 0 signal, and I got the 0 signal at row2, I'll know the pressed button is "6".

Using PIC-C to Read a Keypad:
PIC-C provides a common library for reading keypads named kbd.c, all you have to do is to include the kbd.c library in your code, and use the function kbd_getc() to scan the keypad.
kbd.c library uses either port D or port B to interface the keypad, you'll find the schematic for the interface further below, but if you need to use other ports to interface your keypad, you'll have to use a user defined library, you can find those on ccsinfo.com forum, or you can write your own library (which is pretty simple).

Note: the kbd_getc(); function returns the ASCII code of the pressed button (returns a character).


The Alphanumeric LCD:
An alphanumeric LCD is a type of LCDs that only displays English letters, numbers and some ASCII characters, those LCDs contains a controller unit that processes the input and forms the displayed character on the LCD, most alphanumeric LCDs have a parallel interface, some other LCDs have a serial interface to minimize the construction complicity.
Alphanumeric LCDs comes in different sizes, the size describes the number of characters an LCD can display, common sizes are 16x2, 20x2, 16x4, 20x4 ..etc. a 16x2 has 2 rows and can display 16 characters on each row.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: lcd interfacing with arm and code, viva questions related to keypad interfacing, interfacing of lcd keypad and at89s52, flowchart of 4 3 keypad interfacing, pic 16f628 lcd frequency counter, sim900a interfacing pic, keypad interfacing using pic microcontroller ppt,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  authentication schemes for session passwords using color and images project source code 2 2,238 03-02-2018, 09:35 AM
Last Post: Nischithnash
  ldr sensor interfacing with lpc2148 4 1,839 22-09-2017, 11:40 AM
Last Post: Guest
  source code for rsa encryption and decryption in java 2 8,021 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
Thumbs Up online catering management system on php with report and source code and ppt 4 8,806 29-04-2017, 10:59 AM
Last Post: jaseela123d
Thumbs Up source code of online payment system using steganography and visual cryptography 3 8,513 06-04-2017, 09:56 AM
Last Post: jaseela123d
  online railway ticket reservation free source code in mysql php and html 2 1,500 21-09-2016, 11:13 AM
Last Post: Guest
  how to hack mtn network and free airtime and data 2 1,307 16-07-2016, 04:17 PM
Last Post: jaseela123d
Lightbulb attendance system based on rfid and rtc full project code 2 800 13-07-2016, 11:44 AM
Last Post: jaseela123d
Thumbs Up rupayan amar ujala in how to upload pic for cover page 1 586 18-06-2016, 11:42 AM
Last Post: dhanabhagya
  secret code to bridge airtime and data 3 710 16-06-2016, 11:21 AM
Last Post: dhanabhagya

Forum Jump: