LCD letters offset

Im trying to get 16x2 serial lcd to display, and nothing is working, every code is only putting letter in fist block of lcd on line 1 and 2.

Results of code below
d
!

code

#include <SoftwareSerial.h> //LCD screen connects via Software Serial to
//prevent display corruption

// Attach the serial display’s RX line to digital pin 6 for connection
//on the CAN-Bus shield

SoftwareSerial mySerial(3,6); // pin 6 = TX, pin 3 = RX (unused)

void setup()
{
mySerial.begin(9600); // set up serial port for 9600 baud
delay(1000); // wait for display to boot up
}

void loop()
{
mySerial.write(130); // move cursor to beginning of first line
mySerial.write(207);

mySerial.write(" “); // clear display
mySerial.write(” ");

mySerial.write(130); // move cursor to beginning of first line
mySerial.write(207);

mySerial.write(“Hello, world!”);

while(1); // wait forever
}

Mullet1:
Im trying to get 16x2 serial lcd to display, and nothing is working, every code is only putting letter in fist block of lcd on line 1 and 2. . . .

That is a problem that existed several years ago with earlier versions of the IDE.

If you download a newer version of the IDE you may find that your problem goes away.

You might also try using the HD44780 library.

Don

Neither of those changed anything, its the newest IDE. Included that library, no change. Thanks for the suggestions though.

I'm afraid that my original answer was done in haste and really doesn't apply to your situation. That's mainly because I tend not to look at code that isn't presented in a code box.

Now that I look at it I see that you are not using a serial I2C interface but are actually using an RS232 type protocol running at TTL levels. This means that my recommendation to try the HD44780 library is probably not appropriate since I don't believe that library can handle that interface. That brings up the question of how you managed to test the library and decide that it didn't change anything.

I'm not sure where you got the magic numbers that you are using in your program, perhaps they are incorrect. Without more information there's not much more I can suggest.

Don

I downloaded and added the library, no change. Then I uploaded examples from that library, tested, and same result...only first two blocks filled.

The numbers in the code above were random, but close...tried a lot. From 1 to 1000 it changed nothing, then removed that code entirely and it still remained the same. There was a chart showing each block number, and I tried them all. It was from a sparkfun tutorial, with exact hardware, the exact code, and haven't had any luck.

from a sparkfun tutorial,

A link to the tutorial would probably help us to help you as well as a link to the data sheet for the exact display that you have. Which Arduino board are you using?

Read the how to use this forum-please read sticky to see how to, properly, post code and some advice on how to ask a good question.