Pages: [1]   Go Down
Author Topic: Xbee and LCD Serial Enabled 16x2 LCD  (Read 1801 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UK
Offline Offline
God Member
*****
Karma: 13
Posts: 903
Twitter: @simonmonk2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I think this is what you need:

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

--
My New Arduino Book: http://www.arduinobook.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

YES, you right !!
Thk U.
Logged

Sydney
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4256
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Sydney
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Don and Pual,

Thanks for your replies, I couldn't make it work  smiley-sad

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:
#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
« Last Edit: November 13, 2010, 06:16:01 am by yashar » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Sydney
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-sad

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

Thanks,
Yashar
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4256
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: November 13, 2010, 10:04:31 am by floresta » Logged

Sydney
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don, thanks for the link and information.
Yashar
Logged

Pages: [1]   Go Up
Jump to: