5 clear key buffer, 6 set debounce time – Matrix Orbital VK204-25 Legacy User Manual
Page 39
Description
This command returns any buffered key presses via the serial interface.
The host system must be set up to receive key codes. When the display
receives this command, it will immediately return any buffered key
presses which may have not been read already. If there is more than one
key press buffered, then the high order bit (MSB) of the returned key
code will be set (1). If this is the only buffered key press, then the MSB
will be cleared (0). If there are no buffered key presses, then the
returned code will be 0x00. Please note that to make use of this
command, the “Auto Transmit Key Presses” mode should be off.
Remembered
No
9.5
Clear Key Buffer
Syntax
Hexadecimal
0xFE 0x45
Decimal
254 69
ASCII
254 “E”
Description
This command clears any unread key presses. In a menu application, if
the user presses a key which changes the menu context, any following
key presses may be inaccurate and can be cleared out of the buffer
between menu changes to prevent jumping around the menu tree. It may
also be used, in effect, to reset the keypad in case the host application
resets for whatever reason.
Remembered
No
9.6
Set Debounce Time
Syntax
Hexadecimal
0xFE 0x55 [time]
Decimal
254 85 [time]
ASCII
254 “U” [time]
Parameters
Parameter
Length
Description
time
1
Debounce time in increments of
6.554ms (0 - 255).
Description
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 [time]
value is in increments of 6.554ms. The default debounce time for the
module is 8 (about 52ms), which is adequate for most membrane
keypads.
Remembered
Yes
Default
8
Matrix Orbital
VK204-25-USB
35