Shift Register Libraries for LCD Displays

Guys, this shouldn't be so difficult.

There are many different libraries and write ups out there
and WAY too many different ways of wiring these up.
It can get a bit confusing how to wire things up
especially when dealing with using a a HC595 vs a LS164 or other shift registers
because of the clock to latch delay on the 595 when using it in a "non latched" mode.

Here is what I recommend:
Go get fm's latest library (version 2.1 : https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads )
It has been extensively tested and I know it works, including with backlight
control because I did many recent updates to the library and wrote the SR2W module and have tested
all the SR modes of all the SR modules (SR with 2Wire and 3 wire, SR2W, and SR3W)
on both AVR chips and pic32 chips using a HC595.

By using this library, you can at least be assured you will not be fighting any software issues.

If you are going to wire up your own 2 wire SR implementation,
then I suggest you use the SR2W module
and hook up the components using the wiring I drew in ASCII art
in the SR2W header file LiquidCrystal_SR2W.h

SR2W is essentially the same as the SR module in two wire mode
but uses a fixed/hard-coded wiring so there is less to potentially go wrong.
Just wire up as indicated in the SR2W header file and you should be good to go.

For reference, my test circuit was using a 4.7k resistor and a 1n4148 diode.
With a 595, decoupling is vital as it is being latched on every clock cycle when used in two wire mode.
And you must make sure not to have multiple long
voltage paths when using a breadboard.

If you want to use a NPN transistor like a 2n3904 rather than a FET for backlight control you can do that
but you will experience some flicker during LCD updates.
A different backlight circuit is required to eliminate the flicker when using a NPN transistor.

--- bill