Hello, I got a 16X2 line display from NKC and set it up with no problems in 8 bit mode. I need a few more pins accessible so I am trying to make the 4 bit mode work. I set it up and ran the example LCD4BitExample, and it seems to work ok for a while and then it starts to get garbled. It also starts doing things that make me think it has become self aware :-O . So after a number of tests with simple lcd.print sketches it seemed nothing was working.
It seemed like a pin was floating an causing random events to occur but with the simple tests I knew there was nothing that could do this. After moving some wires around I found the source of the problem:
I use the USB power for the Arduino and a seperate power supply for other hardware. It is very important for some other devices such as the LCD's that these ground rails are tied together. I just ran a wire from the Arduino digital ground to my other power supply ground.
I know this is like electronics 101 but I overlooked it at first and hope to save somebody else the trouble.