Display 16x2 problem

Hi,

It's my first post on the forum. Before post I search on forum but I don't find solution.

My problem is on my display LCD. I have a LCD with driver SPLC780D of sunplus and the instruction set is the same as Hitachi HD44780. But when I use the arduino exemple for LCD : Hello World or other exemple. I have no display... or something looks like a bar code...

I use the same pinout as the exemple...

What's my mistake ? or my LCD have a problem ?

attach a photo so we can check your wiring.

My pinout :

My configuration and code :

The circuit:

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground
  • 10K resistor:
  • ends to +5V and ground
  • wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

That's an odd looking photo.

the code seems to be OK and the wiring (4-bit Mode) also.
Could you give us a link to the datatsheet of the lcd ?
Maybe the commands are euqal to HD44780, but may be the timing of init etc. is different....

A.R.Ty:
Could you give us a link to the datatsheet of the lcd ?

Datasheet.

According to the pundits, when you buy an LCD with "blobs" nowadays, you are actually getting not an HD44780, and possibly not even a SPLC780D as that also is "EOL", but yet another chip (S6A0069) again!

It therefore actually makes no sense to quibble about differences in the datasheets!

We have to see a photograph that clearly and unambiguously shows all of the connections between your LCD and your Arduino. We also have to see a copy/paste version of the actual code that you are using, not an incomplete copy of the code that you think you are using.

Don

It therefore actually makes no sense to quibble about differences in the datasheets!

Not exactly....

You are correct when it comes to dealing with the instruction set and the timing as long as you conform to the Hitachi HD44780U information.

The connections are another matter since the devices with their pins below and toward the left end of the display almost always use a non-standard pinout. There are also some devices with only pins 1 and 2 reversed but I don't know if any of those have their pins in the more common location, above and toward the right end of the display.

Don

It therefore actually makes no sense to quibble about differences in the datasheets!

XD
Couldn't really believe that this statement comes from a God Member !

Of course it makes sense, because if only 1 Pin is "wrong" (i.e. other connected as usual) we'll get bloody fingers by "trying out" ('cause nothing other that would be) to find the correct setup.
So i will wait with next guessings/suggestions until squiz give me some more infos.

floresta:
The connections are another matter since the devices with their pins below and toward the left end of the display almost always use a non-standard pinout. There are also some devices with only pins 1 and 2 reversed but I don't know if any of those have their pins in the more common location, above and toward the right end of the display.

and

A.R.Ty:
Of course it makes sense, because if only 1 Pin is "wrong" (i.e. other connected as usual) we'll get bloody fingers by "trying out" ('cause nothing other that would be) to find the correct setup.

I now see the problem and the reason for confusion. I was in my own mind referring to the "datasheets" of the HD44780, SPLC780D and S6A0069 (such as there are) chips in regard to the timing and such, given that I had provided the (or at least one such) reference for the SPLC780D and that for the HD44780 is pretty easy to find. Datasheets for the board would be a different matter.

I had automatically concluded that if he had the "row of blocks" initial display then clearly he had pins 1 2 and 3 connected correctly and presumed that the others would follow as usual.

A.R.Ty:
Couldn't really believe that this statement comes from a God Member !

I've seen worse. :astonished:

FYI,
I have a 1602 LCD that looks like this:

[urlhttp://forum.hobbycomponents.com/viewtopic.php?f=39&t=1326&p=3234&hilit=1602+lcd#p3228][/url]

I got working initially using code from there.

because I had not yet discovered this:

then later I bought a thermocouple breakout bd and was following the tutorial here:

so I downloaded the example code which included a program to display the temp on an LCD.
Since my LCD WAS working fine I tried the program and I got no display !
So I looked at the code and the photos and as far as I could tell the displays had the samp pin assignments
but the PIN MAPPING in the "LiquidCrystal" statement was REVERSED !
The Hobby Components LCD code had this:

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

and worked the first time. The LCD looked like the photo in the first link above.
The Adafruit code looked like this:

LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

and the LCD looked like the photo in the second link above.
Perplexed I said to myself "How is this possible ?" "Should I just reverse the order of the pins in the Adafruit code to
match the Hobby Components code order ? " "Let me think about this..YEAH, why not?"
So I did and it worked.
Why would two seeming similar displays use reverse pin order ?
Anyone ?

http://forum.hobbycomponents.com/viewtopic.php?f=39&t=1326&p=3234&hilit=1602+lcd#p3228

here's redo on the first link.

Why would two seeming similar displays use reverse pin order ?

The displays have the same pin order.
The Arduino's are wired differently in those two photos and the code is changed to match.
The Hobby Components guy started with the code and connected his Arduino to match the code. He wound up with spaghetti.
The guy with the thermocouple set up his wiring neatly and changed the code to match the wiring.

Don

This is the mostly used code:

Code:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

In this code the wr-pin is defined additionally (3. place):

The Adafruit code looked like this:
Code:
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

the W/R-port needn't to be set normally, because you never read from the display, and is normaly wired to ground (normaly Pin 5 on common-wired lcds)

Oh, I see whats going on now, the guy from Hobby components is using LOWER PINS for data and UPPER pins for
control. The guy from Adafruit is using UPPER pins for data and LOWER pins for control.
I completely missed the boat on that.
Thanks for clearing up the mystery. For some reason I thought that the control pins had to be 11, & 12 but
after reading your explanation and following the wires it became clear that the ONLY thing that is important
is the ORDER and as long as you edit the statement to match the pins you used it will work.
Thanks . My eyes have been opened.
Robert

... the ONLY thing that is important is the ORDER and as long as you edit the statement to match the pins you used it will work.

It's right there in the documentation.
BUT
You have to be a detective to find it.

Don

I'm such an idiot...

raschemmel:
I'm such an idiot...

Dum spiro, spero :slight_smile: