# reading data back from lm016l LCD(HD44780)

How to read data back from a lm016l lcd(HD44780 based)?I couldn't find any useful data on reading except writing.I have followed hd44780 datasheet ,but when i try to display what i read back,the whole display clears off.could anyone help me with the reading procedure?

• Are you absolutely sure that the R/W line is being driven HIGH during your read operation? If it isn't, you will overwrite the existing data, possibly clearing the display. – MikeJ-UK Apr 26 '12 at 10:40

The datasheet seems fairly clear on this.

First, set the RS line appropriately ie LOW to read the status register, or HIGH to read the data register. If you reading data, the address register must of course be written-to first.

1. Set the R/W line HIGH.
2. Wait at least 40ns ($t_{AS}$)
3. Set the enable line E HIGH.
4. Wait at least 160ns for the data to settle ($t_{DDR}$)
6. Set the enable line E LOW
7. Wait at least 5ns ($t_{DHR}$)

I will add the caveat that I have never had a reason to read the character data before. However I've not had a problem reading the status register (RS=LOW).

EDIT ...

In answer to your comment about 4 bit mode, I'm not aware of any problem (although I have not personally used 4 bit mode). I would add that I have always used the initialization procedure on pages 45-46 rather than rely on the automatic initialization working correctly, but I doubt that this is an issue if you can write to the display OK.

Are you sure that the display clears as a direct result of the read operation, or is it possible that a previous write operation has cleared the display, resulting in the read operation returning space characters?

• thanks for your reply Mike.still it doesn't work.I'm using the LCD in 4 bit mode.Anything else there I should be taken care of when using LCD in 4 bit mode? – raforanz Apr 27 '12 at 6:10
• @raforanz - I have added some extra remarks, but I'm not aware of any problem in 4 bit mode. – MikeJ-UK Apr 27 '12 at 8:15