hi,,,,
i have a project which includes PIC and keypad with LCD.
i have connected the keypad directly to PORT B of the pic.
in simulation... every things goes good...
but as i connected the keypad to the PIC practically... the keypad didnt work,
my keypad is that 4x3 with 8 pins... 7 pins for 4 rows and 3 coloumn and one is called COM....
any one has an idea...
attached the simulation and the code..
thanks ,,,
i have a project which includes PIC and keypad with LCD.
i have connected the keypad directly to PORT B of the pic.
in simulation... every things goes good...
but as i connected the keypad to the PIC practically... the keypad didnt work,
my keypad is that 4x3 with 8 pins... 7 pins for 4 rows and 3 coloumn and one is called COM....
any one has an idea...
attached the simulation and the code..
thanks ,,,
Rich (BB code):
#include<16f877a.h> //Device
#fuses xt,nowdt,protect,noput,nolvp //Fuses
#device adc=10 //ADC 10-bit
#use delay (clock=4000000) //4.00 MHz
#use rs232 (Baud=9600) //RS-232 parametres
//(only for printf function)
#include <keypad.c>
main()
{
byte key='\0';
kbd_init();
port_b_pullups (TRUE);
delay_us(10);
while(1)
{
key=kbd_getc();
if(key!='\0')
{output_high(pin_e0);
delay_ms(5000);
}
}}
Attachments
-
144 KB Views: 22