Xbee and LCD Serial Enabled 16x2 LCD

Hi everyOne. After my first steps with Xbee, i would like to use a Serial Enabled 16x2 LCD. But my Xbee already use de Tx and Rx pins , so Is it possible to use this LCD in the same time ? Can i connect it in other pin than Tx ? And how to use Serial.Print with both of them ?

thk U

Hi,

I think this is what you need:

http://www.arduino.cc/en/Tutorial/SoftwareSerial

YES, you right !! Thk U.

Hi,
Can anyone tell me how to connect 16X2 LCD to in serial mode? I want to type text on PC and show up in real time on LCD.

Thanks,

Can anyone tell me how to connect 16X2 LCD to in serial mode?

There are 4 wires for a serial LCD. One for power, one for ground, one for transmitting data to the LCD, and one for receiving data from the LCD.

I'm pretty sure you can figure out where the ground wire goes. The power wire shouldn't be too difficult, either.

That leaves only the TX and RX lines. Plug them into any two digital pins. Tell NewSoftSerial which pins you used.

How hard can it be?

How hard can it be?

Paul, it's really hard to do if he does not have any kind of serial backback. I explained that a little bit in my answer to one of his cross posts.

Don

Hi Don and Pual,

Thanks for your replies, I couldn’t make it work :frowning:

1- Can you please tell me the TX and RX pins on Arduino is connected to which pin on on LCD?

LCD pins are:

Vss,
VDD,
Vo,
RS,
R/W
E,
DB0-DB7

2- I want to type in characters in Aurdino software and be able to display it on LCD in real time using USB cable.

3- I am using the below code, am I using correct code ? I have tried pin 2 & 3 on Arduino but don’t know where should they be connected on LCD.

#include <NewSoftSerial.h>

NewSoftSerial mySerial(0, 1);

void setup()  
{
  Serial.begin(9600);
  Serial.println("Goodnight moon!");

  // set the data rate for the NewSoftSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop()                     // run over and over again
{

  if (mySerial.available()) {
      Serial.print((char)mySerial.read());
  }
  if (Serial.available()) {
      mySerial.print((char)Serial.read());
  }
}

Thanks in advance for your help.

Cheers,
Yashar

1- Can you please tell me the TX and RX pins on Arduino is connected to which pin on on LCD?

LCD pins are:

Vss, VDD, Vo, RS, R/W E, DB0-DB7

Serial LCDs don't have those pins. That yours does means that it isn't a Serial LCD. So, none of the pins are TX/RX.

2- I want to type in characters in Aurdino software and be able to display it on LCD in real time using USB cable.

You have a keyboard attached to the Arduino? Is your LCD attached to a USB cable? Is it a USB host or a USB client?

3- I am using the below code, am I using correct code ?

Not even close.

Hi Paul,

Thank you,

1- Now I understand that my 16x2 LCD is not a serial type.
2- Keyboard is not attach to Arudino, I am using PC keyboard. LCD attached to Arduino board.
3- I am not using right code :frowning:

In summary, Using my 16x2 Hitachi LCD can I display character in real time while typing on my PC ?

Thanks,
Yashar

In summary, Using my 16x2 Hitachi LCD can I display character in real time while typing on my PC ?

Take a look at this: http://dorkbotpdx.org/blog/kmat/serial_lcd. He's likely using an older version of the LiquidCrystal library which should explain the absence of the lcd.begin() statement (which you will need).

Don

Don, thanks for the link and information.
Yashar