Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem interfacing keypad 4x4 and lcd 4x16 using pic18f458

Status
Not open for further replies.

onealimint

Newbie level 5
Joined
Jan 25, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,340
I'm final year student and still doing my final year project...
i have problem write assembly to interfacing keypad and lcd..
i need to display certain word when the keypad is press...
when the 0 is presS the word NORMAL display on the lcd...
when the 1 is press the word CRACK display on the lcd...
when the 3 is press the word LEAKAGE display on lcd...
any one can help me...
plesssss ASAP....
 

problem interfacing keypad 4x4 and lcd 4x16 using pic18f452

I can help you if it is okay for you to use mikroBASIC.
Tahmid.
 

Re: problem interfacing keypad 4x4 and lcd 4x16 using pic18f

thanks Tahmid for your reply...
actually what u meant by miicro basic...
 

problem interfacing keypad 4x4 and lcd 4x16 using pic18f452

Hi,
You wanted to use assembly, which is a low-level language. mikroBASIC is a compiler/IDE which uses the high-level language BASIC.
If it is okay for you to program with BASIC(mikroBASIC) instead of assembly(MPLAB[MPASM]), then I can help you as codes for assembly are quite large and mikroBASIC has functions made for LCD and Keypad.
Hope this helped.
Tahmid.
 

Re: problem interfacing keypad 4x4 and lcd 4x16 using pic18f

hi tahmid...
ur explanation is really helpful...
thanks alot...
so i't might be better to use the microBASIC...

Added after 4 minutes:

actually i'm using pic18f458..
so i decided to use the microBASIC...
hope u can help me...

Added after 51 minutes:

sory...there is typing error when i state the problem..
actually im using 4x4 keypad and lcd 16x2 interface with pic 18f458...
 

Hi,
Download the mikroBASIC compiler (free version) and create a new project and paste the code. Then program the PIC and make your hardware.
Code:
Code:
program keylcd

dim keypadPort as byte at PORTD

dim LCD_RS as sbit at RC4_bit
    LCD_EN as sbit at RC5_bit
    LCD_D4 as sbit at RC0_bit
    LCD_D5 as sbit at RC1_bit
    LCD_D6 as sbit at RC2_bit
    LCD_D7 as sbit at RC3_bit

    LCD_RS_Direction as sbit at TRISC4_bit
    LCD_EN_Direction as sbit at TRISC5_bit
    LCD_D4_Direction as sbit at TRISC0_bit
    LCD_D5_Direction as sbit at TRISC1_bit
    LCD_D6_Direction as sbit at TRISC2_bit
    LCD_D7_Direction as sbit at TRISC3_bit

dim Display as string[7]
dim kp as byte

main:
     ADCON1 = 7
     CMCON = 7
     LCD_Init()
     Keypad_Init()
     LCD_Cmd(_LCD_CURSOR_OFF)
     LCD_Cmd(_LCD_CLEAR)
     while true
         kp = 0
         while (kp = 0)
               kp = Keypad_Key_Click()
         wend
         select case kp
                case 14
                     Display = "NORMAL "
                case 1
                     Display = "FIX    "
                case 3
                     Display = "LEAKAGE"
         end select
         LCD_Out(1, 1, Display)
     wend
end.
Circuit:
75_1264687506.jpg


Added after 41 seconds:

Hope it helps.
Tahmid.
 

Re: problem interfacing keypad 4x4 and lcd 4x16 using pic18f

Hi,

Tahmid,


i need you help too,please give me your email address...




Thanks,

teknose
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top