LK204-7T-1U overwrote non-volitile memory with garbage

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

Moderators: Henry, Mods

Post Reply
flyingasics
LCD?
Posts: 4
Joined: Thu Oct 29, 2009 8:08 am

LK204-7T-1U overwrote non-volitile memory with garbage

Post by flyingasics »

I was able to reload the contrast, brightness, color, start up message, baud rate and can write to the LCD (RS232), but I have not been able to restore the keypad codes, or character set or read any key presses.

When I poll the LCD all I get back is 0. This is true for polling for key presses and polling for the version and module type. Here is my code that I run after using the manual reset to 19.2K baud.

pause 500

serout2 tx, 32, [254,202,245,160,0] 'unlock LCD
serout2 tx, 32, [254, 147, 1] 'set remember bit
serout2 tx, 32, [$fe, $39, $67] 'change baud rate to 9600
serout2 tx, 84, [254, 80, 128] 'contrast
serout2 tx, 84, [254, 152, 255] 'brightness
serout2 tx, 84, [254, 130, 255,255,255] 'RGB color
serout2 tx, 84, [254, 64, "START UP"] 'start up message
serout2 tx, 84, [254, 79] 'auto key press transmit off

serout2 tx,84 [254,213,$42,$43,$44,$45,$46,$47,$42,$43,$44,$45,$46,$47]
'trying to set keypad
serout2 tx, 84, [254,203,245,160,%00011000] 'set and save data lock

pause 500

loop
serout2 tx, 84,["hello world "]

serout2 tx, 84, [254,38] 'poll the LCD
serin2 rx, 84, 100, loop, [rec] 'receive polled data

serout2 tx, 84, [254, 55] 'read module type
serin2 rx, 84, 100, loop, [rec2] 'receive polled data

serout2 tx, 84, [254, 54] 'read version type
serin2 rx, 84, 100, loop, [rec3] 'receive polled data
serout2 tx, 84,["Key ",dec rec" Mod ",dec rec2," Ver ",dec rec3]
pause 500
serout2 tx, 84, [254, 88] 'clear screen

goto loop


THe LCD Spits out:

hello world Key 0 Mod 0 Ver 0

Can someone please post the commands to load a LK204-7T-1U with all the default settings for character sets/keypad set/ect.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi FlyingAsics,

I see you have attempted to remap the keypad back to the default values, however, I see you are a few characters short. Even though there are only 7 buttons on the keypad, you will have to enter 9 keyup and keydown values as listed in the manual. Some of your text and/or commands may be getting added to the keymap command to fill up those missing values. This could throw the whole routine off and result in the display not receiving commands correctly, and not responding, showing as a timeout or 0 value.

Also, I see you've added a few security measures which is good. However, I would recommend turning remember off after all the settings have been fixed, before the data lock would be a good spot. Changing any settings with remember on results in a write to the EEPROM, which has about 100,000 in total. Although there are many, it is still recommended to turn remember on only when required.

Hopefully you find those suggestions helpful, if you do have any further questions or concerns throughout development, please don't hesitate to post.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

flyingasics
LCD?
Posts: 4
Joined: Thu Oct 29, 2009 8:08 am

Post by flyingasics »

I made the changes you suggested:

serout2 tx,84[254,213,$42,$43,$44,$45,$46,$47,$48,$49,$50$42,$43,$44,$45,$46,$47,$48,$49,$50]

and added

serout2 tx,84, [254,147,0]

before the data lock.

I still get 0 when I poll the LCD for anything.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi FlyingAsics,

Sorry to hear that you are still unable to received a response from your display using your routine. At this point I'd recommend taking a step back from the code to determine if the display will respond in a known working environment. Our uProject PC software would be a good tool.

Once you are able to confirm correct operation of the LCD and move back to the code I would recommend starting out slowly. All values can be saved using uProject, so the initialization should no longer be necessary. Text seems to work fine, but variables can be trickier with formatting. Try saving a known value in a variable and displaying it. Finally, go with a single read to start, the module or revision are good candidates. Also, add in a delay between writing the command and reading the result, start with something rather large, 500ms maybe, then back it down.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

flyingasics
LCD?
Posts: 4
Joined: Thu Oct 29, 2009 8:08 am

Post by flyingasics »

OK, I've got uproject set up.

I'm connecting at 19200 baud.

I can control the contrast/brightness and auto transmit key presses work.

VFD brightness drives the LCD bonkers displaying random characters, although moving the slider all the way to the left will turn off the display.

Read module type responds with:
Module recognized as ""

Read Serial number responds differently each time:
CD DC,
D8 DF,
40 AF


Read version number responds randomly also.

Poll keypad works only if I hit a key once and then poll the screen.

If I hit more than one key on the key pad and then hit poll keypad it returns hex C6,C3,C4 ect.

Sometimes If I hit poll keypad after reading the module or Version number it will return 10-20 2 digit hex codes.

It seems like the key buffer is being accessed by functions that shouldn't be able to access it.

I have a LCDLK204-25 and the read module and version commands respond as expected with uproject.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi FlyingAsics,

Good to hear you have made some progress with uProject, and it seems your display is responding correctly. The control of brightness and contrast and ability to read responses tells me that communication is working well.

The VFD brightness setting will not work because you have an LCD, not a VFD screen so the command is not recognized. The read version or module commands will not work correctly in polling mode because the poll command must be sent to receive the data. The serial number is a user defined field, it can be changed. As outlined in the manual, when polling the keypad, a 1 will be added to the most significant bit to signify there are additional characters in the buffer.

All and all, it sounds like your display is working correctly. I would recommend taking some time to learn some of the commands you will use while in the uProject environment before moving back to your controller.

~Troy
Troy Clark
Design & Development
Matrix Orbital

flyingasics
LCD?
Posts: 4
Joined: Thu Oct 29, 2009 8:08 am

Post by flyingasics »

I have yet to be able to get the LCD to fuction properly. I still am unable to send some commands with expected results.

I cannot change the baud rate at all using uproject or with my PIC.

I've tried unlocking the display before issuing commands to to avail.

Is there some chance I may have over written the non volitile memory more than 100,000 times?

Could you post the memory file so I can try and load the default values with uproject.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi FlyingAsics,

Sorry to hear you are still having trouble communicating to your display in uProject.

It sounds like just the baud rate command is giving you some trouble, which may actually be a result of uProject. When changing the baud, I'd recommend using the raw data command in the other section of the uploader to ensure the command is sent as it is written in the manual. Unfortunately, the software was written some time ago and the baud rate values have been changed since. Raw data will be the best way to ensure the command is correct.

As for non-volatile memory, it is very difficult to get up to 100,000 writes, and I would suspect that all commands would be effected. I've sent over the mem file to reset all settings back to default which will tell us for sure.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply