PDA

View Full Version : Using an HD44780 character LCD with the Raspberry Pi



wraggster
June 28th, 2012, 23:55
http://hackadaycom.files.wordpress.com/2012/06/i2c-hd44780-for-rpi.jpg
[Tech2077] is one of the lucky ones who already got his hands on a Raspberry Pi. He’s been looking into different interface options with the GPIO header and just posted a guide to using an HD44780 character display with the RPi (http://tech2077.blogspot.com/2012/06/running-hd44780-lcd-over-i2c-on.html). We like this approach because instead of doing some hard-core LCD work (http://hackaday.com/2012/05/18/teaching-beaglebone-to-play-with-lidd-displays/) he’s using prototyping equipment you probably already have on hand.
Getting a character LCD running should be really simple. The gotcha is the logic level gap between the devices. If you’ve been working with Arduino, your add-ons are probably meant for a 5V power rail and logic levels. The RPi outputs 3.3V logic. You could use a level converter (you’d need at least 7 pins to be converted in this case) or you can be a bit more clever. [Tech2077] grabbed an I2C port expander (http://hackaday.com/2008/12/27/parts-8bit-io-expander-pcf8574/) that uses just 2 of the RPi lines to address even lines of the display (four data bits plus three control bits). This is a bit of a hack, as the 3.3V logic is 0.2V below the recommended minimum for a digital 1 on the port expander. But it seems to work just fine! If it didn’t, a couple of NPN transistors would do the trick as well.
Addressing the new peripheral is just a matter of loading the i2c module and writing some Python.

http://hackaday.com/2012/06/28/using-an-hd44780-character-lcd-with-the-raspberry-pi/