Hey guys!
I have the first Model 2 256mb Raspberry Pi that I started to learn hardware with, but got distracted for a few years.
At one point I got my hd44780 2x16 character display running some basic text using python, I would like to find an updated tutorial for 2015, im sure the library's have all been updated and made life much easier! Can someone point me in the direction of the most upto date hd44780 wiring & programming example of sending data to this display?
I have found a reason to use this setup now so I would love to revive it!
I would also like to know how I can dim the backlight on the hd44780 using python aswell, as its too bright and would like to turn the display off at night via software!
Re: Most uptodate hd44780 16x2 display tutorial?
I have only recently started with a Pi but one of the first things I wanted to do was connect it up to an LCD.
I raised a thread called: '16 x 2 LCD Display', which is currently on Page 8 of this forum.
I don't know if it applies to your display but I was certainly provided with all the info I needed due to the help given to me on that thread.
I raised a thread called: '16 x 2 LCD Display', which is currently on Page 8 of this forum.
I don't know if it applies to your display but I was certainly provided with all the info I needed due to the help given to me on that thread.
Re: Most uptodate hd44780 16x2 display tutorial?
Here is the Adafruit guide, it appears to have been updated in April so it's pretty current.
It's a pdf file so you can download it and print it out.
https://learn.adafruit.com/downloads/pd ... rry-pi.pdf
It's a pdf file so you can download it and print it out.
https://learn.adafruit.com/downloads/pd ... rry-pi.pdf
Re: Most uptodate hd44780 16x2 display tutorial?
Fantastic, I did find this but when it got to the software the PDF links to http://adafru.it/eYCJimmyN wrote:Here is the Adafruit guide, it appears to have been updated in April so it's pretty current.
It's a pdf file so you can download it and print it out.
https://learn.adafruit.com/downloads/pd ... rry-pi.pdf
The link does not work, I assume its a shortcode to the github? I thought it may lead to an updated tutorial with updated demo code.You can find a newer library...
Re: Most uptodate hd44780 16x2 display tutorial?
This is their latest library, it works with RPi or the Beaglebone. It's the one I'm using for a couple of LCD displays (16x2 and a 20x4).
https://github.com/adafruit/Adafruit_Python_CharLCD
https://github.com/adafruit/Adafruit_Python_CharLCD
- mikronauts
- Posts: 2820
- Joined: Sat Jan 05, 2013 7:28 pm
- Contact: Website
Re: Most uptodate hd44780 16x2 display tutorial?
There is also my article:
http://www.mikronauts.com/raspberry-pi/ ... terfacing/
http://www.mikronauts.com/raspberry-pi/ ... terfacing/
Tom Lewis wrote:Hey guys!
I have the first Model 2 256mb Raspberry Pi that I started to learn hardware with, but got distracted for a few years.
At one point I got my hd44780 2x16 character display running some basic text using python, I would like to find an updated tutorial for 2015, im sure the library's have all been updated and made life much easier! Can someone point me in the direction of the most upto date hd44780 wiring & programming example of sending data to this display?
I have found a reason to use this setup now so I would love to revive it!
I would also like to know how I can dim the backlight on the hd44780 using python aswell, as its too bright and would like to turn the display off at night via software!
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi
- DougieLawson
- Posts: 40480
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Most uptodate hd44780 16x2 display tutorial?
Here's some free code that I hacked together
https://github.com/DougieLawson/Raspber ... nified_LCD
Wiring is simple for the GPIO version

You can control the backlight brightness by connecting the anode to pin#18 (rather than to 5V0) and using PWM. But it runs a bit dull on 3V3 so you may want to reduce the current limiting resistor between the cathode and GND.
that's just an on or off depending whether you call that script with "lcdbl.sh light" or "lcdbl.sh dark"
https://github.com/DougieLawson/Raspber ... nified_LCD
Wiring is simple for the GPIO version

You can control the backlight brightness by connecting the anode to pin#18 (rather than to 5V0) and using PWM. But it runs a bit dull on 3V3 so you may want to reduce the current limiting resistor between the cathode and GND.
Code: Select all
#!/bin/bash
if [ "$1" == "light" ]; then
/usr/local/bin/gpio -g pwm 18 0
else
/usr/local/bin/gpio -g pwm 18 1023
fi
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.