Connect with us

Schematic and C-source for driving a HD44780 LCD from a PIC

Discussion in 'Microcontrollers, Programming and IoT' started by shumifan50, Jul 17, 2014.

Scroll to continue with content
  1. shumifan50


    Jan 16, 2014
    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:

    I hope this is useful to somebody.
    The HD44780.jpg is the schematic so you don't need to install expresspcb.

    Attached Files:

    Last edited: Jul 30, 2014
    Supercap2F likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day