Page 1 of 1

Reading Keypad on GLK 1964

Posted: Tue Jan 31, 2012 4:20 pm
by Kayla
I was following the app note but and my lcd wont read key pressed from the LCD keypad. It would read only from my computer keyboard. Any help on how I would read from the keypad. I'm running Ubuntu and trying to create a menu system.

int PollKeyPress(char key[])//Send the poll command and read a 1 byte, report errors
{
unsigned char command[] = {254, 38};
if(write(lcd, &command, sizeof(command)))
return(read(lcd, key, sizeof(key)));
else
return(false);
}

Thanks,
-Kayla

Posted: Wed Feb 01, 2012 9:55 am
by Clark
Hi Kayla,

I must admit, the demo is not running as smoothly on a GLK19264-7T-1U as I remember it did on the LK204-7T-1U on which it was written. I'll take a look at the code and let you know what I find.

Thanks,
Troy

Posted: Tue Feb 07, 2012 1:14 pm
by Clark
Hello again Kayla,

I've rewritten the portion of code that determines if additional keys are to be read, and remembered a rather obscure but important passage from Microsoft documentation regarding port naming.

Please make sure your virtual serial port is no higher than COM9 by changing the advanced port settings in the device manager, or see the notes on naming ports with higher numbers.

The code itself seems to be running smoothly now, if you do have any additional questions please don't hesitate to ask.

Thanks,
Troy