Serial LCD's  Any good

I'm beginning to think that these Serial LCD's are pretty much junk. About 3 times out of 10, sending the clear command on a hardware serial (Mega, Serial1) actually clears the screen. .the rest of the time it prints ||. Possession selection is a little better, but it is very dependent on a delay after sending the position command before writing anything.

here is my sketch

uint8_t clearsc[]={0x7C,0x01};
uint8_t blight[]={0x7c,157};

uint8_t screenpos[]={254,66};

void setup() {
Serial.begin(9600);
Serial1.begin(9600);

Serial1.write(clearsc,2);
delay(15);
}

unsigned int refv=5;
unsigned int milli_volts(unsigned int input){

float v = refv ((float)input/1024);
return (v
1000);
}

unsigned int reading;

void loop() {

reading = analogRead(0);
Serial.print("Reading:");Serial.println(reading);
Serial.print("MV:");Serial.println(milli_volts(reading));

screenpos[1]=1;
Serial1.write(screenpos,2);
delay(15);
Serial1.print("Reading:");Serial1.print(reading);
delay(15);
screenpos[1]= 64 + 128;
Serial1.write(screenpos,2); delay(5);
Serial1.print("MV:");Serial1.print(milli_volts(reading));
delay(15);
while(!Serial.available());
Serial.flush();
}

Hi,

I don't have yet experience of other serial LCD's than Byvac's. As a learning project I wrote even my first library for BV4613. I think I got it work reliably. Whose display you have? That information might help someone to help you out. My library is at http://www.lnxcore.net.
There is always possibility of a bug in displays microcontroller. Byvac uses PICs. On BV4613 I did not find any major bugs but my testing was not very throughout. You can always contact me directly.

I am not a master of serial communication. At the moment I am wondering how one uses CTS and RTS on Arduino Mega. If someone knows please help me out.

Best Regards
Kari

I'm using spark funs 16x2 serial LCD right now. I had one of the bigger ones which exhibits similar behavior (this one uses an avr processor, the small one uses a pic)

Hi,

Now I remebered that the library I made was connected with I2C. So it won't help. Byvac's displays typically. The new ones are both serial and I2C. I will have a look at that SparkFUn display later this night. I am sure I can not be in assistance but it is interesting to have a look.

Best regards
Kari

Hi,

could you give an exact model number of the display you are using. Maybe both of them you have. SparkFun has datasheets for those displays.

Shot in the dark.
I would add bigger delays and more of them until the display works. If even big delays won't help then the problem is somewhere else - like firmware bug on the display controller. Then one must find a way around it.
It takes quite a lot of tinkering - there are no silver bullets....

I am going to get some other manufacturers LCD's after I have this Byvac line went through and when I have more money.

One thing I have not found is a small thermo printer which would talk TTL serial or I2C. I got few max232s if I have to use normal serial levels but I would prefer doing it without max. If anyone knows - please tell.

Best Regards
Kari

LCD-9067
And
08884 (this is the larger one)

I've okayed with delays, and 15ms seems to work consistently, ov course this really is a pain

Btw I have looked at the data sheets for both.. I may of course be missing something

You may want to try just moving the cursor before you print the value, instead of printing a whole new screen, keep the "Reading:" part in the Setup, then try setting the cursor to the spot just after the : (space included I guess)

You might just be trying to send commands too fast for the LCD to grasp itself, this way you'll be sending fewer commands and possibly able to send them at the speeds you want.

I've used a couple "Home brew" Serial LCDs, and speed has always been an issue thats dealt with in Software, but you might be able to change the Baud Rate of the LCD to a faster speed (then set the Arduino to the matching speed, obviously. :D) I'd try something like 19200 if the LCD supports it.

This will allow you to send data faster but not sure how it will work for the delays. I had control of the software side of the Serial LCD so I was able to set the Baud internally, there are usually commands to change the speed though, or jumpers of some sorts.

Thanks. I had thought about changing the speed, but this requires sending the command byte sequence, and I'm not sure I can do this reliable. Note on the 160x128 LCD it defaults to 115200, and I still need delays. I'll play with the 16x2 baud rate and see if I can get improvements. Yes I plan on setting position and just replacing the value, but I'm just testing now.