The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

keyscan for 49g ...and g+?
Message #1 Posted by Eric L on 30 Jan 2005, 6:21 p.m.

Hi all, its been a while. There is a command on the 49g (keyscan, keytime, scantime...??) that will increase the rate of scanning for key presses..I've searched, and not found the thread, any one want to volunteer this info?

I'm busy with engineering classes, and it would help to KNOW that three 3s' and not 2 are entered! Thanks.

      
Re: keyscan for 49g ...and g+?
Message #2 Posted by Raymond Del Tondo on 30 Jan 2005, 9:38 p.m.,
in response to message #1 by Eric L

I think you mean ->KEYTIME...

Raymond

            
Yes, KEYTIME-> ...how to use it?
Message #3 Posted by Eric on 30 Jan 2005, 11:47 p.m.,
in response to message #2 by Raymond Del Tondo

You are right (I believe), the question remains, how to use it? Also, what is the default scan rate?

I'm hoping it will (should) apply to the 49g+...

                  
Re: Yes, KEYTIME-> ...how to use it?
Message #4 Posted by James M. Prange on 31 Jan 2005, 4:59 a.m.,
in response to message #3 by Eric

Where "\->" represents the right arrow character (141 decimal) and n represents the time in ticks (1 tick=1/8192 second), KEYTIME\-> returns the current keytime value, and n \->KEYTIME sets a new keytime value. For example, 512 \->KEYTIME sets the value to 512/8192=1/16 second.

It works in both the 49G and the 49g+. For the 49G, the default is 1365 (which seems a bit high for many users), and for the 49g+, the default is 0. Apparently, the 49g+ developers didn't think it was necessary for this model, but perhaps kept it for compatibility, or maybe as a policy of not fixing what isn't broken.

I wouldn't call it a "scanning" rate, but rather a means of ignoring key "bounce" occurrences. If the same key is pressed again in less than n ticks, then the second keystroke is ignored. It has no effect at all on how soon you can press a different key and have it register.

Personally, although I often have missed keystrokes on the 49g+, and occasionally on the 49G, I've yet to experience any key bounce problem (a single keystroke registering more than once) with either, even with the keytime value set to 0, but it wouldn't hurt to set it to a fairly low value to prevent key bounce problems. Setting the keytime to too high a value will make it difficult to type in the same key repeatedly.

Setting the keytime value has no effect on most missed keystrokes, except that setting it too high may well cause repeated presses of the same key to be missed.

For the missed keystrokes problem, the best I can suggest is the "just press firmly" method; that is, press the key until it definitely bottoms out, not just until you feel the "click".

Something that may help you to detect missed keystrokes is to check the "Key Click" option in the "MODE" input form, which will cause a short beep with each (registered) keystroke as it's removed from the key buffer. But this might not be any help in a noisy environment, and may well annoy others in a quiet environment.

For what it's worth, the information that I have on the 48SX is that it scans the keyboard once every millisecond and generates an interrupt when a keypress is detected. Once the interrupt has been generated, the keyboard handler checks which keys are pressed. Whether this is accurate, and whether it's still accurate for the newer calculators, I don't know. Some contend that at least part of the problem with missed keystrokes on the 49g+ has to do with switching CPU speeds when a keystroke is detected, or perhaps that the Saturn microprocessor is emulated by software running on the ARM microprocessor.

Note that with all of the RPL models, up to 15 keystrokes are stored in a FIFO buffer, so you can press a few keys while the "busy" annunciator is on, and they'll be processed when the system is ready for keyboard input again. If the "Key Click" option (49 series only) is enabled, then the beeps won't occur until the keystrokes are removed from the buffer.

Regards,
James

Edited: 31 Jan 2005, 5:07 a.m.

                        
Re: Yes, KEYTIME-> ...how to use it?
Message #5 Posted by Eric Lundgren on 1 Feb 2005, 2:34 a.m.,
in response to message #4 by James M. Prange

THANKS!! Very kind of you to explain the mechanics at work.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall