Hello, i have working on this almost 3 days without any success and i just figure this out.
Schematics of the system are here
http://i.imgur.com/FWcJRvP.png
and the problem part
http://i.imgur.com/i7vwFXs.jpg
Everything i have tried has just been trying.
I think i had to play around with the RD and WR pins to get the chips to work correctly, but i just can not figure this out.
This is the example code i have, to try and get '2' key working
I can get data from buttons 1-c diagonally because they share the address.
I am getting really frustrated with this. If you could give me some guide or tips, i would be very thankful.
Schematics of the system are here
http://i.imgur.com/FWcJRvP.png
and the problem part
http://i.imgur.com/i7vwFXs.jpg
Everything i have tried has just been trying.
I think i had to play around with the RD and WR pins to get the chips to work correctly, but i just can not figure this out.
This is the example code i have, to try and get '2' key working
Code:
volatile __xdata unsigned char * __data keypad = (__xdata unsigned char *) 0x9000;
#define WR P3_6
#define RD P3_7
while(1)
{
WR=0;
RD=1;
*led=0b11000000;
*keypad==0b11110000;
//*keypad==0b11111110;
if (*keypad==0b11111110)
{
WR=0;
RD=1;
*led=0b11000000;
vardelay(5);
*keypad==0b11111101;
if (*keypad==0b11111110)
{
RD=1;
WR=1;
lcd_senddata('1');
}
else if (out==0b11111101)
{
RD=1;
WR=1;
lcd_senddata('2');
}
}
else if (*keypad==0b11111101)
{
RD=0;
WR=1;
if (*keypad==0b11111101)
{
RD=1;
WR=1;
lcd_senddata('5');
}
else if (*keypad==0b11111110)
{
RD=1;
WR=1;
lcd_senddata('4');
}
}
I am getting really frustrated with this. If you could give me some guide or tips, i would be very thankful.