Problem read data serial and parsing data into LCD

Dear Master,

i'm daksa, i have already learning adruino 2 days. i have a problem with my project in my office.
the concept is very simple, just reading data serial and parsing it into LCD. but my problem is, when i send data to adruino and show it into LCD, its doesnt match character. for example send "1" in LCD shows "g" , "a" shows "0" , "s" shows "F" etc..

i send it that character to aduino using software see on my attachment..

here my code in adruino

#include <LiquidCrystal.h>
//#include <SoftwareSerial.h>

//SoftwareSerial mySerial(8, 7); // RX, TX
char vdata;
//String str;

/*Connect LCD to Arduino:
LCD -> Arduino

1|VSS| -> Arduino GND
2|VDD| -> Arduino +5v
3|VO | -> Arduino GND pin + Resistor or Potentiometer
4|RS | -> Arduino pin 12
5|RW | -> Arduino GND - pin can be conected to 11. But Ground was used here.
6|E | -> Arduino pin 10
7|D0 | -> Arduino - Not Connected
8|D1 | -> Arduino - Not Connected
9|D2 | -> Arduino - Not Connected
10|D3 | -> Arduino - Not Connected
11|D4 | -> Arduino pin 5
12|D5 | -> Arduino pin 4
13|D6 | -> Arduino pin 3
14|D7 | -> Arduino pin 2
15|A | -> Arduino Pin 13 + Resistor (Backlight power)
16|K | -> Arduino GND (Backlight ground)
*/

//Arduino scrolling text example

LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
int backLight = 13; // pin 13 will control the backlight

void setup()
{

// pinMode(backLight, OUTPUT); //set pin 13 as output
//analogWrite(backLight, 150); //controls the backlight intensity 0-254

lcd.begin(16,2); // columns, rows. size of display
lcd.clear(); // clear the screen
lcd.setCursor(0,0); // set cursor to column 0, row 0 (first row)
lcd.print("WELCOME"); // input your text here
delay(2000);
lcd.clear();
lcd.setCursor(0,0); // move cursor down one
lcd.print("WEIGHT : "); //input your text here

Serial.begin(9600);
// set the data rate for the SoftwareSerial port
// mySerial.begin(9600);

}

void loop()
{
lcd.setCursor(0,1); // set the cursor outside the display count

if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);

while (Serial.available() > 0)
{
vdata = Serial.read();
Serial.println(vdata);
lcd.write(vdata);
}
}
}

thanks for your advice

ComExample.zip (245 KB)

for example send "1" in LCD shows "g" , "a" shows "0" , "s" shows "F" etc..

Could you maybe a little more methodical, please?

Also, please remember to use code tags when posting code.

AWOL:
Could you maybe a little more methodical, please?

Also, please remember to use code tags when posting code.

I'm sorry ,for example when I send 1 LCD shows g , a LCD shows 0 , s show F. which means all characters that I had sent to adruino do not match when it shows in LCD.

daksaadiprana:
I'm sorry ,for example when I send 1 LCD shows g , a LCD shows 0 , s show F. which means all characters that I had sent to adruino do not match when it shows in LCD.

Yes, I gathered that from your first post.
Now, how about applying a little more methodical approach to debugging?

e.g. is "WELCOME" printed on your lcd?
e,g. do you get the correct letters on your Serial Terminal?

Type "1234567890" and compare the Serial output to the LCD output.
Then type "ABCDEFGHIJ" and "abcdefghij"

Do you see any patterns?

Incidentally, I ran your sketch with an I2C LCD. Everything worked fine.

David.