Jacqmaster
LCD?
Joined: 08 Mar 2010
Posts: 4
Location: Pomona |
| LK204-25 and Arduino Mega |
|
|
I just bought the LK204-25 and its default setting is RS232 mode.
I connected the LK204-Rx pin to Arduino Mega Tx1 (Serial1) and get 5V power from Arduino as well.
When power up the module, I can see the default startup screen.
But when I run the below tiny program, the result totally awkward.
void setup() {
Serial.begin(9600);
Serial1.begin(19200);
Serial1.flush();
}
void loop() {
if (Serial.available()) {
Serial1.print(Serial.read(), BYTE);
Serial.flush();
}
}
If I enter "a" from Arduino serial monitor, the LK204 LCD will display "0" on it.
Can someone help me out?  |
Mon Mar 08, 2010 12:55 am |
|
|
Ray
Matrix Orbital

Joined: 13 Dec 2001
Posts: 671
Location: Earth.... I think.. |
I suspect the Arduino is operating on TTL levels |
Mon Mar 08, 2010 4:33 am |
|
|
Jacqmaster
LCD?
Joined: 08 Mar 2010
Posts: 4
Location: Pomona |
quote:
Originally posted by Ray
I suspect the Arduino is operating on TTL levels
Thus, I just need to add MAX232 driver between Arduino and LK204 to converting the voltage level, am I right?
THanks, |
Mon Mar 08, 2010 12:16 pm |
|
|
Ray
Matrix Orbital

Joined: 13 Dec 2001
Posts: 671
Location: Earth.... I think.. |
If you have a steady hand you can also move the zero ohm resistors on the back of the module from rs232 to ttl. |
Mon Mar 08, 2010 12:20 pm |
|
|
Jacqmaster
LCD?
Joined: 08 Mar 2010
Posts: 4
Location: Pomona |
quote:
Originally posted by Ray
If you have a steady hand you can also move the zero ohm resistors on the back of the module from rs232 to ttl.
Finally, I added one MAX202 circuit and it works greats. But I got another while connecting to a 4x4 keypad. When I short R1-C1, the LCD will display 246, R1-C2 =>61.
How can get read the keypad map such as R1-C1=>A, R1-C2=>B |
Fri Mar 19, 2010 11:52 pm |
|
|
Raquel
Matrix Orbital

Joined: 19 Aug 2004
Posts: 630
Location: MO Office |
Hi Jacqmaster,
It sounds like somehow the EEPROM in your display module has been corrupt. By default, the keys should be transmitting those that are depicted in the tables on page 40 of the
manual
.
By using Assign Keypad Code command (254 / 213) you should be able to assign any values that you want the display to transmit when certain key combinations are shorted (depressed). See section 9.9 of the manual.
I hope this helps, _________________ Raquel Malinis
Design and Development
Matrix Orbital |
Tue Mar 23, 2010 7:43 am |
|
|
Jacqmaster
LCD?
Joined: 08 Mar 2010
Posts: 4
Location: Pomona |
quote:
Originally posted by Raquel
Hi Jacqmaster,
It sounds like somehow the EEPROM in your display module has been corrupt. By default, the keys should be transmitting those that are depicted in the tables on page 40 of the
manual
.
By using Assign Keypad Code command (254 / 213) you should be able to assign any values that you want the display to transmit when certain key combinations are shorted (depressed). See section 9.9 of the manual.
I hope this helps,
May I ask one newbie question. In Arduino, I have to send separate commands in order to achieve the execution. for example,
Serial.print(254, BYTE);
Serial.print(213, BYTE);
but now I am not sure to issue command correctly.
Serial.print("ABCDEFGHIJKLMNOPQRSTUVWXY");
or some other formats.
Thanks, |
Tue Mar 23, 2010 1:59 pm |
|
|
Clark
Matrix Orbital

Joined: 17 Aug 2007
Posts: 351
|
Hi Jacqmaster,
Text will be sent out to the serial port in the same way as commands. I'm not familiar with the Arduino language but you might try sending ('A', BYTE). If that fails you may be down to looking up values, such as (65, BYTE), I find ascii-table.com can help there.
To make things a little easier, you may be able to go with an array, something like BYTE mydata [2] = {254, 213}; and throw the serial.print into a for loop to spit out the bytes one by one.
Anyway, you may want to sift through our app notes on the matrixorbital.ca site for a little inspiration, and feel free to throw up another post if you get hung up again.
Thanks,
~Troy _________________ Troy Clark
Technical Support
Matrix Orbital |
Wed Mar 24, 2010 9:59 am |
|
|
â

|
|
All times are GMT - 8 Hours. The time now is Thu Jul 29, 2010 6:30 am
|
|
|
|
| |