Serial LCD BPK help !!!!!!!

Hi,

I am working on a project on Home Automation using arduino . I am using a serial LCD display (4x20 white on blue) from http://www.milinst.co.uk/. I dont know how to interface with arduino. I used the data sheet and i am not getting the output. can anyone guide me by step by step process with a sample code so that i can understand well.

serial LCD.pdf (34.3 KB)

connect GND and 5V from Arduino to LCD

connect arduino pin 1 = TX to LCD RX

succes,
Rob

How did you connect the display to arduino and what code did you use. We don't have a crystal ball here so you have to show some pics and code.

"either 2400 or 9600 baud, no parity, 8 bits, 1 stop bit and inverted format."

I wonder if you noticed inverted format or baud rate (jumper setting)

i had three pins. +,GND,Serial out. i connected +,GND to arduino +5V and GND respectively. Serial to arduino TX pin. 2400 baud rate is OFF and 9600 is ON in my serial LCD. I used the below code

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

Serial.print(1, BYTE); //Clear Screen
delay(5);
Serial.print("Hello world");

}

I dint get any output. help me !

void loop() {
}

to ROB

I did what you have said. but i am not getting the output. I have attached the Data sheet. please give me a sample program using the data sheet i have attached.

serial LCD.pdf (34.3 KB)

Did you have a delay in the setup to allow the serial lcd to start up as described in the manual? Also did you see what I replied, inverted format? I don't think arduino's serial is configured for inverted format. Can someone confirm this?

(not read the PDF, but building upon liudr's comment)

NewSoftSerial has a flag to send inverted bytes. The hardware Serial of the UNO can't do this AFAIK.

Vikash, download NewsoftSerial and start testing with that

In the meantime, could you try this testsketch to see if inverted code works.

void setup()
{
  Serial.begin(9600);
               
  Serial.print(1, BYTE);  //Clear Screen
  delay(5);
  Serial.print('A' ^ 0xFF);   // single char inverted.
}

void loop() {}

void setup()
{
Serial.begin(9600);
delay(500);
Serial.print(254,BYTE);

Serial.print(1, BYTE); //Clear Screen
delay(5);
Serial.print('A' ^ 0xFF); // single char inverted.
}

void loop() {}

i used this code with the delay and (254,BYTE) to differentiate between control code and normal character. i get the output as a triangle shaped dots all over the LCD screen. U can see under 'fig.5 character code chart' 0 under 128. I have attached the file for you

And to liudru my LCD can display inverted format.

6_143.pdf (113 KB)

i downloaded newsoftserial from NewSoftSerial 11 (beta) | Arduiniana. but i dont know how to include under example or library folder.

The Beta is different to before - it replaces the core library SoftSerial. So you need to find the SoftSerial folder in your Arduino folder and remove it, and then put the NewSoftSerial there instead.

Can you try more delays right after you send the clear screen because this command may take more than 5ms to run. You only gave it 5ms.

If you forget the clear screen for a moment and just print one character at a time every second, do you see any characters appearing on the screen?

The screen seems to be a design 10 years old so the hardware may be that old too, there is a chance it is broken.

i used a delay of 10 ms as mentioned in the data sheet. but even tho i am not getting the output. this is the code which i used recently

void setup()
{
Serial1.begin(9600);
delay(500);

// Move cursor one character left

Serial1.print(254, BYTE);

Serial1.print(1, BYTE);
delay(10);
//Serial1.print("Hello");
}

void loop()
{

//Serial1.print(254, BYTE);

//Serial1.print(1, BYTE);
//delay(100);
}
// clear the LCD

i have attached the output for my code and the back view of my LCD screen. U can see the data sheet too alonb with this reply.

in the data sheet it is mentioned as

" Baud Rate?
The Driver Board will accept RS-232 signals at either 2400 Baud (jumper missing) or 9600 Baud
(jumper installed). "

is there anything to be done with this.?

6_201.pdf (32.3 KB)

Hi to all...

thanks a lot for your help....

my LCD is working fine. I used a SN74LS04N inverter for the LCD serial input and the following code. I used serial1 because i am using Arduino Mega and i use TX1 for output.
void setup()
{
Serial1.begin(9600);
delay(500);
Serial1.print(254,BYTE);

Serial1.print(1, BYTE); //Clear Screen
delay(10);
Serial1.print("hi"); // single char inverted.
}

void loop() {}

I get the expected output as hi

That's what I suspect, the inverted logic as written in the document. BTW you can take robtillaart's suggestion to use NewSoftSerial, which can be set to output inverted logic.

I have a question for you: did you buy this display for a PIC?

NO i bought this for arduino mega