Maker.io main logo

Interfacing 16x2 LCD with an 8051 Microcontroller

2016-09-27 | By Abid Jamal

License: None

Adding an LCD to your project is a great way to improve visual appeal and expanded functionality. For this project, we interface a 16x2 LCD with an 8051 microcontroller.

Since we are interfacing with a microcontroller, we need the appropriate supply voltage. Most chips use 5V DC as an input, so that is what we chose to use. If you have supplies available that don’t have the right voltage, you can employ voltage regulators. As indicated above, the LM7805 is a linear voltage regulator which converts your input voltage to the needed 5V DC.

8051 Input Power Supply

The LCD we’re using for this project is 16x2, and can be purchased anywhere. You can try to experiment with other 8051-based MCUs, but for this project we will be using an Atmel 89652,  a popular 8051-based microcontroller.

16 x 2 LCD Pinout

Follow the connections as shown above, and don’t forget to place a 5k variable resistor on the connection to pin 3 Vcc. This helps to control the contrast, and without the resistor, the contrast will be too strong and the display will only show black boxes rather than the desired letters.

Now run the sample code to see your display at work. Then feel free to update the code and see if you can add LCDs to more future projects!

Source: http://www.electronicslovers.com/2015/02/interfacing-16x2-lcd-with-8051_23.html

Code - Keil uVision2 or higher

https://drive.google.com/uc?export=download&id=0B7JBaVsUuW-rcnB1Y3RvTWdKb2s

 

Interfacing 16x2 LCD with an 8051 Microcontroller

TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum