Character lcd can perform both read and write functions. Normally lcds are only used to write text on them. Read operation is performed in few nominal tasks. Below are some steps to display text on lcd. I am going to display Character ‘A’ on lcd.
Displaying Text on 16×2 lcd using microcontroller step by step
- First select the operation which you want to perform ‘Read’ or ‘Write’. Making R/W Pin of Lcd 0(R/W=0) will select the write operation. Now lcd is set in write mode and you can write any text to lcd. If R/W=1 lcd is set in Read mode and you can read data from lcd. Since i want to display ‘A‘ on lcd. I made R/W=0.
Note: To execute commands steps are same like to display text only difference is in the RS pin selection. To execute commands you have to select the command register of lcd. Make RS=0 to select command register of lcd. Now your commands goes to command register and you can execute them by make en=1 and back to en=0.
Simple text display on 16×2 lcd demo project using 8051 microcontroller
- 16×2 character lcd.
- 89c51 or 89c52 microcontroller.
- Bread board large enough to make circuit on it
- 5 volts DC power supply.
- Potentiometer for setting lcd contrast.
- Software for codding, keil etc
- Burner to burn code in the microcontroller
Dispay text on 16×2 lcd – Project code
Rest of the connections are same as we made in all of our circuits apply 5 volts to vcc pin#40 and Pin#31 of 8051(89c51,89c52). Ground pin#20. Attach crystal of 11.0592MHz frequency in parallel to two 33pf capacitors to pin#18(XTAL1) and Pin#19(XTAL2) of microcontroller. You can also use crystal of any other frequency if you want and capacitors with them can very from 27pf to 33pf.
- Displaying Custom Characters on 16×2 lcd using 8051(89c51,89c52) microcontroller
- Displaying Urdu Characters on 16×2 lcd using 8051(89c51,89c52) microcontroller
To learn difference between sending commands and data to lcd click. Difference between sending commands and data to lcd. If you feel any difficulties in code just leave a comment regarding your problem. I will definitely figure it out.
Filed Under: Microcontroller Projects, PIC Microcontroller
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.