Problem: Arduino & LCD with KS0066 / SPLC780

Now I changed the wires so everybody will be able to follow them

Maybe everybody except me.

I've had problems similar to this one where everything seemed to be connected properly using known good code and still the device didn't work. I tracked it down to a poor connection on the solderless breadboard. I suggest that you pull all the wires out and start again using a different part of the breadboard. While you are at it you can reassign the pins, as Lady Ada did, so the LCD wires align nicely with the Arduino without having to cross over one another.

Don

So, to get a better view, i turned the breadboard 180° and wired everything again. Just changed the wireing in the code:

/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  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
 * 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 8 Feb 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(2, 3, 9, 10, 11, 12);

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

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  digitalWrite(13, HIGH);
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
  
}

Aaaand at last: A picture of the tidied wireing :smiley: :

Imgur

and still nothin works... :cry: What else can I do to may fix it? I already asked the LCD wheter it will work as a christmas present, but it didn't wanted to... damn!

greetings kuhni

It's got to be something simple that we are overlooking. I still suspect a bad connection between the Arduino and the LCD so now it's time to get out the magnifying glass and check the solder connections on the LCD pins. Look for poor joints and for bridges (shorted pins).

The reversed backlight connections that seem to work OK still bother me as well.

Also, you never commented on this (from reply #3)

I am assuming that you can vary the intensity of the blocks from very dark to very light

Can you measure the voltage between GND and pin 2 as well as between GND and pin 3?

Don

I already checked the soldering before I started programming the arduino. Pin 16 wasn't soldered that good, so I wired it again. I checked the other pins by using the "diode" test of my multimeter (one Pin to the soldered Pin, the other to the board. All pins are soldered well).

That's right! By using the Potentiometer, I kan vary the intensitiy of the blocks from very dark to very light. I read of some Problems if the contrast isn't adjusted properly. But I am able to adjust the contrast and tried already all "positions" :slight_smile:

The voltage of GND and Pin 2 is between 5,00V and 5,02V.

GND to Pin 3 is between 0V and 5V regulated by the Potentiometer. The "best legibility" is around 0,35V (the contrast isn't to high, and the blocks are already visible).

There are also no bridges between pins :-/

Slowly I'm getting despaired!

What else can I try to fix this damn problem?

We are back to this "The reversed backlight connections that seem to work OK still bother me as well."

That type of display is almost, but not impossible, to view without the backlight. Try disconnecting both backlight wires and see if you can discern anything on the display when you run your sketch.

Don

so... disconnected pin 15 and 16... aaand: still 2 rows of blocks visible... nothing less, nothing more... :frowning:

really baaad! >:(

Anyone an Idea what else I could do to fix the problem? Don't wanna expend another 22 Bugs on a new LCd... :-/

greetings kuhni

I don't know what happened to all the other LCD guru's. I'm still thinking about it. It almost has to be something to do with one or more of the six data lines between the Arduino and the LCD.

Don

I also tried this code to bar a mistake of the lcd library:

http://webcache.googleusercontent.com/search?q=cache:iXmbLbXGIIkJ:www.arduino.cc/en/Tutorial/LCD8Bits+arduino+8+lcd&cd=3&hl=de&ct=clnk

Your display of two rows of blocks is an indication that the LCD is not properly initialized. This could be due to a wiring problem or a code problem.

I just can't understand why virtually every LCD program author decides that they should deviate from the initialization sequence given in the datasheet. The code you referenced is another example of this, and it's worse than most.

Follow the LCD Initialization link at http://web.alfredstate.edu/weimandn, scroll down to the section on 8-Bit Interface, Initialization by Instruction, and compare it to the code you tried.

The LiquidCrystal library isn't totally correct either and that could possibly be your problem, but it's not likely.

Don

I think the problem is, that the LCD I own seems to have an KS0066 controller but it isn't the LCD mentionned in the datasheet. I have to switch the contacts 15 and 16... Also there is a Timing Diagramm printed, but no exactly times mentionned... So what do you think? What do I have to change in the liquidcrystal library to may make it work? (or to exclude a sofware mistake)

greetings kuhni

Also there is a Timing Diagramm printed, but no exactly times mentionned...

The times are given in the datasheet for the controller, but not always in the datasheet for the module. If you don't have the specific datasheet for your controller then use the one for the 44780 (www.sparkfun.com/datasheets/LCD/HD44780.pdf).

So what do you think? What do I have to change in the liquidcrystal library to may make it work?

Nothing. You might want to try downloading a new copy of the Arduino IDE which will include a new copy of the library. We are really grasping at straws here but it's worth a try. You will probably wind up needing another LCD module, from a different supplier, to pin down the problem.

Don

Hmm... Now tried a new copy of Arduino... Didn't solve the problem, damn! Any other idea, or should I now hav a look on ebay for a new module? :cry:

greetings kuhni

hav a look on ebay for a new module?

That might be your problem right there. I wouldn't choose one of those for my first attempt at using an LCD. Once you have your connections and code verified it would be ok.

Don

Perhaps you should try hard coding it without using the library... it seems to be something with the data / rs lines... did you check continuity on these lines between the controller & the LCD?... i've had similar problems but it was always the connections.....or the way they fit on a breadboard...

did you check continuity on these lines between the controller & the LCD?

jap! I did for about a thousand of times! :slight_smile:

I now also had a look at the wireing I used to connect it to parallel port of the pc and followed all wires. It is the same connection as in this picture:


Except:

  • R/W (is wired to pin 14 of the parallel port
  • +5V of the backround light. It is pin 16 on my lcd board
  • GND of the backround light. (pin 15 on my lcd board) This is wired over a transistor ciruit tu pin 17 of the parallel port.

I would try to hard code it without the library, but I'm unable to find timing schemes of the KS0066 or the SPLC780 module in the net.

greetings kuhni

Hey
tomorrow, I'll have the chance to buy a new LCD. But I don't know whether it will work with the arduino. The Data- Sheet is: http://www.produktinfo.conrad.com/datenblaetter/175000-199999/183334-da-01-ml-LCD_Modul_4x16_Zeichen_de_en.pdf

Could you please tell me, wheter i should buy this one?

greetings kuhni

Why wouldn't it work, it's a run of the mill HD44780 clone? That's an interesting technique they used to make an 8 page data sheet summary out of a 5 page one.

Don

Good day.
I looked at your pictures and with the nuwe red wires you did not connect the LCD the same way as with the messy wires EG RS now go to pin 2 and not 12 and and and

IS THIS not your problem???