Hi :
We use LK204-25 in our product as human interface via I2C bus, both display and keypad. however, we miss the key press somtimes, we have to press (a bit hard) same key again.
Because LK204-25 has a built-in CPU and buffers key press, our software has been designed quite simple to access key pad, it works like
main()
{
init();
while(1)
{
key = GetKeyPad(); // if no key buffeed, key =0
if(key) // if there is key only read one
{
....
}
...
}
}
Now I have question:
(1) Because LK204-25 buffers the key press, for above software solution, how possible to miss the key ?
(2) Does the buffered key have to be read out within certain time ? such as 500ms ro 1000ms.
(3) When you press the key, how many key has been read in by LK204 ?
I mean sometime you press a bit hard so that LK204 may recognize you press two or three even more times for the same key. What I want to do is only one key is picked no matter you press key hard or soft, is it possible ?
Thanks
Daniel
LK204-25 - software question ?
Hi Nileiqi,
Thanks for the question. When in I2C mode the only way to access the keypad returns is via a buffer, which you are well aware of. The buffer consists of a 10 key storage. When a column and row are shorted a character is generated and placed into the buffer. That value will not be removed unless the buffer is emptied or the unit is reset. Depending on the type of keypad you are using in the application, you may want to try adjusting the debounce time accordingly. 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. Let me know how you make our!
Thanks for the question. When in I2C mode the only way to access the keypad returns is via a buffer, which you are well aware of. The buffer consists of a 10 key storage. When a column and row are shorted a character is generated and placed into the buffer. That value will not be removed unless the buffer is emptied or the unit is reset. Depending on the type of keypad you are using in the application, you may want to try adjusting the debounce time accordingly. 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. Let me know how you make our!

Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Head of Technical Support
Product Manager
Matrix Orbital