Go Down

Topic: Xbee and LCD Serial Enabled 16x2 LCD (Read 2098 times) previous topic - next topic

yopaii

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

Si

Hi,

I think this is what you need:

http://www.arduino.cc/en/Tutorial/SoftwareSerial
--
My New Arduino Book: http://www.arduinobook.com

yopaii


Yashar

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,

PaulS

Quote
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?

floresta

Quote
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

Yashar

#6
Nov 13, 2010, 04:03 am Last Edit: Nov 13, 2010, 12:16 pm by yashar Reason: 1
Hi Don and Pual,

Thanks for your replies, I couldn't make it work  :(

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.

Code: [Select]
#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

PaulS

Quote
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.

Quote
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?

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

Not even close.

Yashar

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  :(

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

Thanks,
Yashar

floresta

#9
Nov 13, 2010, 04:03 pm Last Edit: Nov 13, 2010, 04:04 pm by floresta Reason: 1
Quote
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

Yashar

Don, thanks for the link and information.
Yashar

Go Up