Thank you all for the tips!
I didn't get much time at all to work on it yesterday, but I did manage to get a breadboard working with Nigel's 4-bit code. As Nigel said, "you're probably doing something silly" -- well, I was. (Sort of!)
The code would not work on my test breadboard as I had forgotten that I did blow an I/O pin on the 16f873 a while back and tried to put a control line from the LCD on that pin -- duh! (I have been using the chip for development and that pin was reserved for a door output, so I hadn't been using it.) Unfortunately, it's still a no-go on my original project -- strange.
Great, so at least I can now test my LCD modules -- all of which are working. This, at least, narrows it down to hardware / software on my end. The hardware I've double and triple checked, so I must have put something else in the code that I am forgetting and have been unable to find.
A week or so ago, I ran out of the 4K codespace on the 16f873, so I bumped the chip up to a 16f877. When I did this, I started bringing the code over a little at a time as I was trying to organize my code at the same time by creating separate files for each "module" that I was working on. I brought the LCD routines over first, then the I2C routines and had the clock displaying. I then slowly brought all the other code over to the 877 as I organized it. This makes it a little more difficult to backup, and hence why I did not have one. I use to back up quite often when I was working with a single file, but with multiple files it is a PITA! Oh well, like I said, lesson learned!
My point to the above was that I should have some time to work on it today and will probably do the same as I did when bringing the code over from the 873... I'll start with the LCD routines and go from there.
eblc1388 said:
One don't need a PIC to tell if the LCD is dead, if it is using a form of controller like the common HD44780.
Remove the LCD from circuit, connect the contrast pin to 0V and then apply power to the LCD, there "should be" a row of black blocks displayed on the first row. All my LCDs does this.
Thanks for that -- I actually did do that to start with, but didn't know if the row of squares indicated the LCD was fully operational or not. I'd be curious to see the results of a non-functioning LCD with this test. I mean, if one data line wasn't working, for example, would you still get the squares?
Either way, it's a good tip to know! Thanks!
What I have now is proto board with a 16f88 and a 16 pin SIL socket for the LCD... all it does is runs Nigel's 4-bit code and displays "Hello" (line 1) and "Ready..." (line2). Hit the reset button and it does it again. What the heck, eh? Now I have a basic LCD tester for about $8.