Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to read data from lcd?

Status
Not open for further replies.
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Activity points
0
I want to know how to read data from LCD? (HD44780).

We have to make RS and RW pins = 1. Then what. Will the LCD data be placed on LAD_DATA port? LCD_DATA port will we output port then how to read data? I need to shift text on particular lines of LCD. I am using 4-bit LCD.
 

I assume you're using an HD44780 based LCD, as I could understand from other posts of yours.

Before reading you must enable the PIC to read data from the LCD data pins, so change the TRIS registers values to 1 for the LCD pins (except for En, RS, and RW). Then set RW to 1 (READ) - the LCD will return some data on the LCD data pins. In case of 4-bit data mode you must make a two pass read. Read the first 4-bits, send a CK to the LCD via the En pin, and then read the remaining 4-bits (data is transferred in high-to-low order, the first 4 bits are the higher 4 bits).

Although, I can only see this useful for reading the busy flag instead of calling a delay routine. It saves you some space on the PIC but, to me, it's not worth the effort made for reading. If you want to read the content written on the LCD I'd suggest you to store a string on the PIC memory, it will take you very less code overhead.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top