Pages: [1]   Go Down
Author Topic: 16*2 Serial Lcd (Itead Studio) display nothing  (Read 1623 times)
0 Members and 1 Guest are viewing this topic.
malaysia
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have 16*2 UART serial lcd 1.1, & have try to program it via Arduino Mega2560.
the lcd is: http://blog.iteadstudio.com/uart-serial-lcd-module/
The connection is:
-Lcd’s Tx to Rx pin 0,
-Lcd’s Rx to Tx pin 1,
-Vcc 5V & ground connect to Arduino

The string “Serial LCD” always occur at initial during I plugin the power into it.
The problem is, I have tried many code, but the lcd displays nothing, just a string “Serial LCD” (means nothing change)
I have define my Rx,Tx port, have useSoftwareSerial library, but still nothing change.
Actually what should I do? seems like the lcd didn’t receive any serial data at all.
thank you
------------------------------------------------------------------------------------------------
#include <SoftwareSerial.h>
#define txPin 1
#define rxPin 0


void setup()
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  
  Serial.begin(9600);
  Serial.print("sc;"); //screen clear
  delay(10);
  Serial.print("sb0;"); // set backlight, 0=off, 1=on
  Serial.print("sd0,3;"); //set coordinate col,row: col 0 and row 0
  delay(10);
  Serial.print("ssItead Studio;"); //send string (char string)
  delay(10);
  Serial.print("sd1,0;"); // set coordinate col 1,row 0
  delay(10);
  Serial.print("ssSrial 1602 LCD;"); // send string
}

void loop()
{
  
  Serial.print("ssSrial 1602 LCD;");
  delay(10);
}

-----------------------------------------------------------------------------------------


#include <SoftwareSerial.h>
#define txPin 1
#define rxPin 0

SoftwareSerial serial(10, 11);

void setup()  
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  Serial.begin(9600);
}

void loop()
{

    Serial.print("$CLEAR\n");   //clear screen
    delay(2000);
    Serial.print("$GO 1 1\n");  //cursor movement
    Serial.print("$PRINT Hello World!\n"); //print string
    Serial.print("$GO 2 4\n");
    Serial.print("$PRINT Hello World again!\n");
    Serial.print("$CURSOR 1 1\n");  //set effect of cursor

}
« Last Edit: November 28, 2012, 03:22:28 pm by aainlithium » Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6893
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's too bad then. The only code sample they provide was tested by you and nothing works. Post some pictures on how you wired up the display with mega might help.
Logged


Georgia, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, post a picture showing the back of the unit. from what I could read; it looks like it can use ICSP interface and I2C also.
And I know it's not your fault but that's a pretty piss-poor data sheet on the thing. it also looks like a standard LCD display and iteadstudio stuck on their own interface. I wonder if the interface chip can be reprogrammed to use a better protocol?
besides maybe trying other interfacing that's about all I can help with.

good luck to ya.

==========
never mind on the alternate interfacing. I just read a comment from Itead about them being a future addition.non-functional for now.
« Last Edit: November 28, 2012, 10:26:07 pm by WinstonP » Logged

malaysia
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, post a picture showing the back of the unit. from what I could read; it looks like it can use ICSP interface and I2C also.
And I know it's not your fault but that's a pretty piss-poor data sheet on the thing. it also looks like a standard LCD display and iteadstudio stuck on their own interface. I wonder if the interface chip can be reprogrammed to use a better protocol?
besides maybe trying other interfacing that's about all I can help with.

good luck to ya.

==========
never mind on the alternate interfacing. I just read a comment from Itead about them being a future addition.non-functional for now.


this is the link to the picture of lcd's back: http://www.flickr.com/photos/28931603@N04/8229440834/in/photostream

this is the link to picture of how I connect that ITeadStudio serial lcd:
http://www.flickr.com/photos/28931603@N04/8228374029/in/photostream/
Logged

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

You are indicating four connections here ...

-Lcd’s Tx to Rx pin 0,
-Lcd’s Rx to Tx pin 1,
-Vcc 5V & ground connect to Arduino

... but your photo only shows three wires (and we can't determine where they go).

Try connecting the Arduino Tx to the LCD's Tx and see what happens.


Don
Logged

malaysia
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are indicating four connections here ...

-Lcd’s Tx to Rx pin 0,
-Lcd’s Rx to Tx pin 1,
-Vcc 5V & ground connect to Arduino

... but your photo only shows three wires (and we can't determine where they go).

Try connecting the Arduino Tx to the LCD's Tx and see what happens.


Don


Yeah now I know whats wrong with my sketch & connection. The solution is:
1- If use SoftwareSerial, DO NOT use pin 0 & pin 1...
    Those are h/w serial pins connected to Serial Monitor. Use another pins.
2- Connecting Ardunio Tx to LCD's Tx. It is WORKS !

below is my basic sketch. LCD will print "Hello world" at topline, "Bye World!" at bottomline, & looping continuously.
-------------------------------------------------------------------------------------------
#include <SoftwareSerial.h>
#define txLCDPin 8

const byte txLcdPin = 8; // will connect to LCD's Tx
const byte rxLcdPin = 7; // not connected to anywhere

SoftwareSerial myLcdSerial =  SoftwareSerial(rxLcdPin, txLcdPin);
void setup()
{
  pinMode(txLcdPin, OUTPUT); // Arduino's Tx as transmitter to LCD
  pinMode(rxLcdPin, INPUT); //
  myLcdSerial.begin(9600);
  myLcdSerial.print("sc;"); //command IteadStudio for 'screen clear'
  delay(10);
 
}

void loop()
{
  myLcdSerial.print("sc;");
  myLcdSerial.print("sb1;"); // set backlight, 0=off, 1=on (sb)
  myLcdSerial.print("sd0,2;"); //set coordinate (col 0,row 2)
  delay(10);
  myLcdSerial.print("ssHello World!;"); // Command IteadStudio for 'send string'
 
  myLcdSerial.print("sc;");
  myLcdSerial.print("sd1,0;"); // set coordinate (col 1,row 0)
  delay(500);
  myLcdSerial.print("ssBye World!;"); // Command IteadStudio for 'send string'
  delay(500);
}

THANX ALL !
Logged

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

I'm glad to see that you have it working.

Now, about your sketch....
The LCD display does not have to be refreshed.  Once you display a message on it that message will remain until it is overwritten or until power is removed. 
For your current sketch the steps that you have in loop() really belong in setup(), and loop() should be empty.


Don
Logged

Pages: [1]   Go Up
Jump to: