How to read HD44780 LCD programmatically

So you set the RS pin high, the R/W line high, then toggle the E line. Each time you toggle the E line, it will increment (or decrement depending on how you set it up) and give you the byte in the next address.

It's not quite that simple in the 4-bit mode since you have to read twice for each byte and reassemble the nibbles. Also, don't forget that you do the actual reading while E is high, not after it goes low.

You got me looking at it, actually. There actually already is support for a RW pin if you define one.

Look again. If you define the pin then all they do is drive it low...PERIOD.

I am not trying to discourage you, I am just pointing out some of the problems. John went through all of this when he was writing the LiquidCrystal440 library a few years ago and I provided him with some code for starters. All he was doing is reading the busy flag, but the added work to get the other seven bits should be trivial*. Why don't you see if you can find anything here --> Google Code Archive - Long-term storage for Google Code Project Hosting. (follow the Downloads link to get to the latest version) before you try to reinvent the wheel.

Don

Edit: * Famous last words....