[SOLVED] "New LiquidCrystal" 3-wire 74ls164n... can't get this to work. Help?

Doing my best to get a 16x2 lcd working with the great fmalpartida LiquidCrystal library under the “3 wire non-latching shift register” schematic. Unfortunately, I can’t seem to get it working. I burnt a board and was dismayed that the LCD just displayed a row of blank boxes, so I tried recreating it with a breadboard only to have it do the same thing. I’ve tried swapping out shift register chips to no avail, and I reconnected everything in the “4-bit parallel” mode and the test code ran like a champ, so the LCD is working. But I can’t for the life of me get it working in 3-wire SR mode.

Any clues on how to test or fix? I realize the snapshot is a forest of jumper wires; there’s rarely a good way to take a picture that looks particularly clear. The backlight and dimmer work fine, and I’ve tested connections. I feel like I must be missing something pretty darn obvious, but it’s sure not obvious to me

test code (commented out lots of the sample code just to keep things simple):

#include <Wire.h>
#include <LiquidCrystal_SR.h>

//LiquidCrystal_SR lcd(8,7,TWO_WIRE);
LiquidCrystal_SR lcd(5,6,7);
// order is data (SR), clock (SR), LCD enable
void setup(){

  lcd.begin(16,2);               // initialize the lcd


  lcd.home ();                   // go home
  lcd.print("LiquidCrystal");//_SR");
  lcd.setCursor( 0, 1 );
  lcd.print("Blorp");
}

void loop(){
  lcd.home ();                   // go home
  lcd.print("LiquidCrystal");//_SR");
  lcd.setCursor( 0, 1 );
  lcd.print("Blorp");
}

It's hard to tell but are all the pins in 16 pin header soldered to the LCD module?

Which SR chip are you using? (That yellow/white wire blocks the chip markings)

The photo is pretty good, but it may take another photo or two be able to fully see where all the wires go.

Can you post another picture of the SR chip are with the wires spread a little bit so we can see where the wires are going.

Also the area just above the pot is a bit of nest, can you spread those wires a bit so we can see?

Can you post where each wire that is connected to the SR goes? Use pin numbers. (If we know the SR part number we can verify the connections).

--- bill

update: oops. Just noticed the SR chip in the title (i must be blind...) I'll go back and look at the sample schematic and your photo again. (Still would be useful to have a few more photos, and a description of where the wires go)

It's hard to tell from the photo. But I don't see any power going to the power pins of the LS164. (pins 14 (vcc) and 7 (gnd)) (They are not noted/specified in the mini schematic on fm's page)

--- bill

Waaaaaaait, wait. These things need POWER to work!?

(sigh... okay, I deserved that for not reviewing the datasheet and just blindly implementing the minischematic).

Thanks. Connected those two and it works like a champ. Sheesh.

Also, here's a vote to make this the default LCD library for the Arduino toolkit. It really is marvelous.

It is always the little stuff that trips us. (at least me anyway)

For SR2W (2wire only mode) I included ascii art to the header file which I think is much clearer than the schematics since it is oriented the same way as the actual chips. You can see it in LiquidCrystal_SR2W.h

BTW, the SR2W interface code also supports backlight control if you add a transistor.

--- bill

I considered the 2-wire, but since this is going into a board and I have the line free, it's worth spending the line rather than involving more components and soldering for the end product. But that's what I love about the library--it's clean on interface and very flexible on implementation. Beautiful!