Attached is the schematic and the source files to drive a HD44780 (very common LCD and cheap) from a PIC uController. The code was developed on a PIC16F886, but should port easily to any other PIC with enough pins. The interface needs 7 I/O pins (the code used the 4 bit, not 8 bit interface). The code supports controlling the LED backlight, or it can be disbled. If used it needs another pin(8 pins total).
Support is provided for a virtual screen with a view port, so you can set up more lines than are visible on the display, and then move the view over them. If you have enough pins (2 more needed) then you can enable the keys and scrolling can be achieved by pressing UP or DOWN.
There is also support for a 'BUSY' LED, which is useful during debugging as it shows when the LCD is replying that it is busy to the PIC status request. This would need an additional I/O pin, but can be disabled.
Many functions are provided that might not be needed. These can be hacked out to reduce code size.
This provides a simple easy interface to a HD44780 chipset LCD. An very simple example program is included in HD44780-example.c.
The readme file describes how to set it up.
An example of the LCD display on fleabay:
http://www.ebay.co.uk/itm/HD44780-B...mponents_Supplies_ET&var=&hash=item41797ba426
I hope this is useful to somebody.
The HD44780.jpg is the schematic so you don't need to install expresspcb.
Support is provided for a virtual screen with a view port, so you can set up more lines than are visible on the display, and then move the view over them. If you have enough pins (2 more needed) then you can enable the keys and scrolling can be achieved by pressing UP or DOWN.
There is also support for a 'BUSY' LED, which is useful during debugging as it shows when the LCD is replying that it is busy to the PIC status request. This would need an additional I/O pin, but can be disabled.
Many functions are provided that might not be needed. These can be hacked out to reduce code size.
This provides a simple easy interface to a HD44780 chipset LCD. An very simple example program is included in HD44780-example.c.
The readme file describes how to set it up.
An example of the LCD display on fleabay:
http://www.ebay.co.uk/itm/HD44780-B...mponents_Supplies_ET&var=&hash=item41797ba426
I hope this is useful to somebody.
The HD44780.jpg is the schematic so you don't need to install expresspcb.
Attachments
Last edited: