Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD interaced with 89S52

Status
Not open for further replies.

giaracam

New Member
I am doing a project in which I am displaying some menus in a LCD and at the same time I use a keypad to scroll and input values to my LCD. I am doing this in assembly programming language and using an ATMEL 89S52 microcontroller. I just want to know how can I read the the values that I input in my LCD. In other words, I want to read the characters or numbers displayed in the LCD at a particular cell location that I input using my keypad. Your help will be much appreciated! Thanks in advance!!
 
The easist way would be to keep track of the keypad input before/after you write it to the LCD. However, if you are writing the keypad input to the same location of the LCD, you can read it back provided you are using a normal 8-bit mode of communication with the LCD. It may be possible in 4-bit mode, but I'm not sure. I have had a few occasions where I've had to use the LCD as a sorta RAM so I know it can be done. FWIW, even a simple 1x8 or 2x16 LCD _often_ has the same CGRAM as a 2x20 module so there are often a few spare bytes in there. I forget the exact command sequence, but look at the datasheet for the LCD controller and you will see how to read info back from it
 
There is a R/W pin on LCD to control read/write operation.
It can be implemented using 4 bit data input as well.
As stated by BartSimpson, the easier way is to 'remember' the LCD display in the microcontroller.
Define an array to store the characters, and just read from that.
It is not only easier, but also faster, as it reads directly from internal RAM
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top