LK202-25 Lost the Plot, Cannot do Manual save

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

Moderators: Henry, Mods

Post Reply
diyhouse
LCD?
Posts: 4
Joined: Mon Nov 16, 2015 6:43 am

LK202-25 Lost the Plot, Cannot do Manual save

Post by diyhouse »

Hi,.. I have an LK202-25 Display,.. which has worked fine for several years,…. But today it decided to “loose the plot”,….

I have connected the display to and Arduino Mega to play with for now and have figured that some setting have gone a-stray internally,.. probably its i2c address,.. which is how I talk to the display..

Needless to say, I can set the display to manual mode and things seem to work OK…. My problem is How to I commit the new default setting to LK202 memory so that they are used at the next power up.

I can set the Data lock flag,.. but the actual step by step on what to do seems a little confusing to me,…. Ie how do I actually SAVE current settings,.. before setting data lock back off.

I found some simple code to talk to the display,... and I have been using the following to set the data-lock flag,.. I have tried several combinations of power off and on but nothing seems to stick,... clearly I am missing the obvious,.. can someone pls point in the right direction...

Code: Select all

#include <Wire.h>

// default MatrixOrbital lcd address (0x50) converted from 8bit to 7bit
#define LCD (0x28)

char c ;

void setup() {
  Serial.begin(19200);
  Wire.begin();

  // Initialise display with clear command
  Wire.beginTransmission(LCD);
  Wire.write(254);
  Wire.write(88);
  Wire.endTransmission();

  Wire.beginTransmission(LCD);
  Wire.write("Hello World....");
  Wire.endTransmission();

}

void loop() {
  if (Serial.available() > 0) {
    c = Serial.read();
    if ( c ==  0x52 ) {   // R
      Serial.write(c);
      Wire.beginTransmission(LCD);
      Wire.write(c);
      Wire.endTransmission();

      Wire.beginTransmission(LCD);
      Wire.write(254);
      Wire.write(202);
      Wire.write(245);
      Wire.write(160);
      Wire.write(00);
      Wire.endTransmission();
    }
    else if ( c ==  0x54 ) {  // T
      Serial.write(c);
      Wire.beginTransmission(LCD);
      Wire.write(c);
      Wire.endTransmission();

      Wire.beginTransmission(LCD);
      Wire.write(254);
      Wire.write(202); 
      Wire.write(245);
      Wire.write(160);
      Wire.write(80);
      Wire.endTransmission();
    }
    Serial.write(c);
    Wire.beginTransmission(LCD);
    Wire.write(c);
    Wire.endTransmission();
  }
}

Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 247
Joined: Thu Sep 24, 2015 9:38 am

Re: LK202-25 Lost the Plot, Cannot do Manual save

Post by Daniel Divino »

Hello diyhouse,

There is a specific command for changing the i2c address. If you look on page 15 of the LKVK202-25(Rev4.1) manual, by sending "254" "51" and then an even value, you can change the i2c address of the display. In your case, you'll want to change the i2c address while in manual over ride mode, but once you remove the manual over ride jumper and power cycle the display, the new address should be saved and you should be able t ocommunicate to your display through that address.

You can also use the "Set i2c Address" button in uProject to change the address of your display. All you would have to do is connect your display to your PC, and open up uProject.

-Daniel
Daniel Divino
Technical Support
Matrix Orbital

diyhouse
LCD?
Posts: 4
Joined: Mon Nov 16, 2015 6:43 am

Re: LK202-25 Lost the Plot, Cannot do Manual save

Post by diyhouse »

Daniel,.. That's a good point,... I will probably give the address change a go,.. but my bigger concern is what else has changed?? Something corrupted the settings,.. ( I know not what,.. at least nothing intentional, I was playing with some clear screen stuff),.. and my fear is what else has been changed,.. so by setting things back to their default value would get me back to a know condition.

Also using uProject is a nice idea but my PC does not talk i2c,... so I would have to change the solder bridge setting to serial I assume,... in order to talk via the PC, which if I get desperate I will do,.. but I was hoping to find the sequence to lock the "default", "manual" settings in via a procedure and program it via the arduino i2c interface...

Also I can only talk to the module when I power the unit up in "manual" mode,... so I have to be able to save these setting in order to talk to the unit again following a power cycle.... bit of a chicken and egg situation,.. as I see it,.. unless someone tells me I'm missing the obvious.

Kind regards

diyhouse
LCD?
Posts: 4
Joined: Mon Nov 16, 2015 6:43 am

Re: LK202-25 Lost the Plot, Cannot do Manual save

Post by diyhouse »

Well did a simple write new i2c address,.. and that did duly "reset"the i2c address...

Reinstalled my unit back into my main system,.. and duly corrupted it again,.. back to drawing board,.. reset address,.. and looked a little deeper into code..

Realised a recent change had caused a display clear screen to be executed every few milli-seconds,...

So with fixed address and fixed code,.. things seem to be back to normal.

Thanks for the prompt Daniel,.. sometimes the obvious,.. is just passed over,.. although I would still ask,.. can one protect these sort of data item with the display,.. and how can one just return a unit to "factory default settings",.. it would be so much easier.

But thanks for help....

Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 247
Joined: Thu Sep 24, 2015 9:38 am

Re: LK202-25 Lost the Plot, Cannot do Manual save

Post by Daniel Divino »

Hello diyhouse,

In order to save and lock your settings, all you will have to do is:

-change each setting to your desired values (in this case the default values)

-use the "Set and Save Data Lock" command, and set data lock to level 4.

For your case, you will want to set the data lock to level 4, locking the settings.This should lock all your settings to default and save them, even after you reboot your display.

-Daniel
Daniel Divino
Technical Support
Matrix Orbital

Post Reply