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 with keypad and LCD (PIC16F877A)

Status
Not open for further replies.

toto_na16

Member level 1
Joined
Feb 21, 2010
Messages
34
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
Egypt
Activity points
1,478
hi ,

I wrote this code to display a pressed key (1-16) on LCD

but when i press a key it make all the screen full of this character ?

Code:
char t[6];
unsigned i;
void main(){
     TRISD=0x00;
     Lcd_Config(&PORTD,2,3,0,7,6,5,4);
     Keypad_Init(&PORTB);
     while(1){
              while(Keypad_Read()==0){
                                     }
              i = Keypad_Read();
              WordToStr(i,t);
              LCD_Out_Cp(t);

              }


}

can anyone tell me why ?
 

Hi

Check your Keypad_Read() function it looks like you need to debounce the switches


All the best

Bobi

The microcontroller specialist
 

Hi,
Take a look at this:

This is a similar topic over LCD and keypad.

Hope this helps.
Tahmid.
 

    toto_na16

    Points: 2
    Helpful Answer Positive Rating
Tahmid said:
Hi,
Take a look at this:

This is a similar topic over LCD and keypad.

Hope this helps.
Tahmid.

this topic the code is written in microbasic , i am using mikroc

i will try to understand the difference , anyway thanks

Added after 40 minutes:

Tahmid said:
Hi,
Take a look at this:

This is a similar topic over LCD and keypad.

Hope this helps.
Tahmid.

ok i realized what is the difference Thanks a lot :|:D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top