LK204-25 Keypad question in new release 2.0?

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
nileiqi
LCD?
Posts: 8
Joined: Mon Jan 17, 2005 4:09 pm

LK204-25 Keypad question in new release 2.0?

Post by nileiqi »

Hi,

For LK204-25 v1.23 version (user manual rev1), it is clear defined the keypad interface on page 17. For example, column 2 and row 1 are for 'B'... We use C2-C5 with R1, and it has been working in product for years.

With new v2.0 version, If you look at page 42 of <<LK204-25 technical manual>>(rev2.0) - 9.9 Assign keypad codes, there are two tables related key down/up. My questions are related to these two tables,

(1) When I short coloum 2 and row 1, I find I can not read either 'B' or 'b' by I2C command, instead I read back with '!' (decimal value 33). Why is that ?

(2) Can keypad interface be re-defined by user ?, for example R2 and C1 for 'B',not 'F' as documented on page 42 of new release manual.

(3) Within production change notification,it says "keypad keys are now user definable:Command 254/213/<50 bytes>", it seems to me if I want redefine the keypad code, i have to set auto repeat mode ON ? Further question, can I send I2C command to redefine new keypad map ?

Thanks in advance

Daniel
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello Daniel,

Thank you for posting on the forum.

1) When you short column 2 and row 1, you should get "B". Is there a way you can scope the I2C lines?

2) Keypad mapping can be redefined by the user using the Assign Keypad Codes command (254 / 213). Here is the command to match the old keypad layout (the following format is for uProject Raw Data):
/254//213//65//70//75//80//85//66//71//76//81//86//67//72//77//82//87//68/
/73//78//83//88//69//74//79//84//89//97//102//107//112//117//98//103//108/
/113//118//99//104//109//114//119//100//105//110//115//120//101//106//111/
/116//121/

3) With the Assign Keypad Codes command, you do not have to have auto repeat mode on. The first 25 parameters of the command are the key codes to be transmitted when the key is pressed. The next 25 are the key codes to be transmitted when the key is released. You must specify all the parameters even though you will not have the auto repeat mode on.
Raquel Malinis
Design and Development
Matrix Orbital
nileiqi
LCD?
Posts: 8
Joined: Mon Jan 17, 2005 4:09 pm

Post by nileiqi »

Hi Raquel,

My firmware has been working with LK204-25 version 1.23 or early for over three years without any problem, over 200 units with LK204-25 have been sold. The MCU communicates with LK204-25 via I2C bus either as software controlled master transmitter when sending string to LK204-25 display or software controlled master receiver when reading keypad press.

In version 1.23, it is easy to read keypad press, as it says on p18 of user manual (rev 1 not 2.0):
(1) "A read is initiated by writting to the module with its base address plus 1"
(2) "The module contains a ten key press buffer so that it can be polled for a key presses at an infrequent rate (every 500 to 1000 ms typical)."

My firmware heavily relies on above two features. When it reads keypad, it works very well in version 1.23, below is how it works as a software controlled master receiver.

(a) Send I2C Start condition - CPU pull down SDA line when CLK line is high.
(b) A read is initiated by writting to the module with base address plus one, it is 0x51 for v2.0 and 0x5D for v1.23.
- Send slave address 0x51 (0x50+1) with 8 clocks cycle.
- check ACK at 9th clock (always received in my case),
- if ACK is received send 8 clocks to read the byte
- send NACK at 9th clock to indicate that is last byte to be received
(C) Send I2C Stop condition - CPU raise SDA line when CLK line is high.

with the new release of LK204-25 v2.0, we are suffering problem when working as a master receiver, With the help of oscillscope, I realize after successful sending slave address and getting ACK back, when CPU initiates 8 clock cycles to read byte back, I find either read nothing on data line or LK204-25 try to hold SCLK line, I never see such case in v1.23 in which firmware can fully control I2C bus.

I need to know
(1) The way to read keypad press via I2C has changed or not in 2.0 ?
(2) In v1.23, I2C bus is fully controlled by master, but in v2.0 it seems to me not, am I right ?
Thanks in advance.
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello Daniel,

I have replied via email.

Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
Post Reply