4 bit LCD library and Hitachi HD44780 compatible display

Let's get pins 3 and 5 taken care of first. Most displays are blank with pin 3 floating (unconnected) and they will show unpredictable behavior with pin 5 floating. Your display seems to behaving somewhat unpredictably.

Don