Page 1 of 1

GLK24064-25-VPT-E What is the Max keypress rate?

Posted: Sat Apr 05, 2003 10:08 pm
by WildRice
Using a GLK24064-25-VPT-E .

What is the maximum rate it can accept keypresses on the 25 key keypad before it starts to lose keypress data?

Is the keypad debounced? If so, what is the bounce delay?

(How) Does it handle rollover (two keys pressed at the same time)?

Does it buffer keypresses in any way? I know my serial port buffers incoming data, but does the board do any buffering?

-Chuck-

More info

Posted: Sat Apr 05, 2003 10:40 pm
by WildRice
Humm, perhaps I should have posted this question on the Software Board?

Here is the code I am trying to use:

Code: Select all

//--------------------------------------------------------------------------------------------------
//	checkKeyboard
//--------------------------------------------------------------------------------------------------

- (void)checkKeyboard
{
	NSAutoreleasePool 	* 	pool = 			[[NSAutoreleasePool alloc] init];
	char     key;           // Input buffer
	ssize_t  numBytes;  	// Number of bytes read or written

	[NSThread setThreadPriority:0.2];
	while (TRUE) {
		if ([self myCheckRead]>0) {
			numBytes = read(fileDescriptor, &key, 1);
			NSLog(@"%d, %d, %x, %c",numBytes,key,key,key);
		}
		[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.001]];
	}
	[pool		release];
}
It logs this data:

2003-04-05 21:20:42.223 BlueCabbie[1955] 1, 75, 4b, K
2003-04-05 21:20:42.513 BlueCabbie[1955] 1, 95, 5f, _
2003-04-05 21:20:42.817 BlueCabbie[1955] 1, 75, 4b, K
2003-04-05 21:20:43.133 BlueCabbie[1955] 1, 75, 4b, K
2003-04-05 21:20:43.426 BlueCabbie[1955] 1, 75, 4b, K
2003-04-05 21:20:43.723 BlueCabbie[1955] 1, 95, 5f, _
2003-04-05 21:20:44.125 BlueCabbie[1955] 1, 80, 50, P
2003-04-05 21:20:44.384 BlueCabbie[1955] 1, 95, 5f, _

I expect the K and P data to be returned, But I do not understand where the _ (0xf5) is coming from. This looks a lot like a rollover problem to me. Hence the hardware question.

Also, I the K and P keys were pressed many more times than the log shows. When I press them slowly, I get every one. When I press them quickly, I get the bad data and some are totally missing. -Chuck-[/code]

Re: GLK24064-25-VPT-E What is the Max keypress rate?

Posted: Mon Apr 07, 2003 12:20 am
by Henry
WildRice wrote:Using a GLK24064-25-VPT-E .

What is the maximum rate it can accept keypresses on the 25 key keypad before it starts to lose keypress data?
faster then you can press.
Is the keypad debounced? If so, what is the bounce delay?
check out the GLK24062-25 manual for debounce settings. The default is 8. (I can't tell you in ms because I'm having net problems)
(How) Does it handle rollover (two keys pressed at the same time)?
It will either not send a keypress or send a strange character.
Does it buffer keypresses in any way? I know my serial port buffers incoming data, but does the board do any buffering?
yes and no, on default it send the ASCII character out right away, but you can turn on poll for keypress, and then the LCD has a buffer of 10 keys.

Re: GLK24064-25-VPT-E What is the Max keypress rate?

Posted: Mon Apr 07, 2003 4:07 pm
by WildRice
Henry wrote:
WildRice wrote:Using a GLK24064-25-VPT-E .

What is the maximum rate it can accept keypresses on the 25 key keypad before it starts to lose keypress data?
faster then you can press.
Humm... I can press pretty fast! :) I am using an encoder, so a spin of the knob can send over a hundred state changes (key presses, two alternating keys) in less than one second. -Chuck-

Re: GLK24064-25-VPT-E What is the Max keypress rate?

Posted: Mon Apr 07, 2003 4:15 pm
by WildRice
Henry wrote:
WildRice wrote:Using a GLK24064-25-VPT-E .

Is the keypad debounced? If so, what is the bounce delay?
check out the GLK24062-25 manual for debounce settings. The default is 8. (I can't tell you in ms because I'm having net problems)
RTFM! :) Sorry. I must have missed that. 52ms is the default. I will have to play with that parameter a bit. -Chuck-
5.5.7 Set debounce time (254 85 [time])


[time] is in increments of 6554 microseconds.

This command sets the time between key press and key read. All key types with the exception of latched piezo switches will "bounce" for a varying time, depending on their physical characteristics. The default debounce time for the module is about 52 mS, which is adequate for most membrane keypads. This time equates to a setting of 8 using this command as there is a debounce time resolution of 6554 microseconds.

Posted: Mon Apr 07, 2003 4:25 pm
by Miles
I couldn't of said it any better than myself!

Re: GLK24064-25-VPT-E What is the Max keypress rate?

Posted: Mon Apr 07, 2003 11:25 pm
by Henry
WildRice wrote:Using a GLK24064-25-VPT-E .

RTFM! :) Sorry. I must have missed that. 52ms is the default. I will have to play with that parameter a bit. -Chuck-
yup, But I'm not really allowed to say that :)

as for the keypress speed... I'll find out for you.