![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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!!
__________________ If you can dream it then you can do it. | |
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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 | |
| |