Page 1 of 1

Keypad poll with c in dsPIC30f !!

Posted: Wed Jun 06, 2007 10:41 am
by mehrdad121
Hi every one,

I am working with a dsPIC controller, my program works fine to write anything to LCD with I2C but I am getting 00 for my key pressed .I checked the keypad pins it looks like scanning is ok but any key I press still return with Data=00,any suggestion for that?
By the way I am working with GLK24064-25 rev2.0
IdleI2C();
StartI2C();
WriteI2C(0x0050);
IdleI2C();
WriteI2C(0x00FE);
IdleI2C();
WriteI2C(0x0058);
IdleI2C();
StopI2C();
//------------------
IdleI2C();
StartI2C();
WriteI2C(0x0050);
IdleI2C();
WriteI2C(0x00FE);
IdleI2C();
WriteI2C(0x004f);
IdleI2C();
StopI2C();
//-------------------
IdleI2C();
StartI2C();
WriteI2C(0x0050);
IdleI2C();
WriteI2C(0x00FE);
IdleI2C();
WriteI2C(0x0060);
IdleI2C();
StopI2C();
//-------------------
while(1)
{

IdleI2C();
StartI2C();
WriteI2C(0x0050);
IdleI2C();
WriteI2C(0x00FE);
IdleI2C();
WriteI2C(0x0026);
IdleI2C();
RestartI2C();
WriteI2C(0x0051);
IdleI2C();
Data = getI2C();
NotAckI2C();
StopI2C();
Nop();
Nop();
delay(10);

Thanks, :roll:

Posted: Wed Jun 06, 2007 10:44 am
by Raquel
Hello mehrdad121,

Thanks for your post.
Can you please tell me your display, the PCB Rev and firmware version?

Thanks,

Posted: Wed Jun 06, 2007 1:31 pm
by mehrdad121
Hi again,

To complete my test, I realized that I cant read at all it means read function for I2C is not working fine

any help? I am seeing the same problem on others, too.
is it the old firmware version ?
somehow I bought it a few days ago form digikey in Canada

no more idea!
Thanks

Posted: Wed Jun 06, 2007 1:45 pm
by Raquel
Hello,

I would like to refer you to our PCNpage.

Check out your display and see the updates on the firmware.

Thanks,