picspalsandgals

University of Washington Electrical Engineering Blog

PIC 18F Hello World with LCD!

This is just a quick post to give an idea of how easy hello world with an LCD can be done.  The main.c code file will be posted in the code section as well.  This demo (see picture below) uses a PIC18F4455 with a standard 16×2 LCD to display text.  The crystal oscillator used is a 20 MHz crystal and other than that, the rest of the circuit is fairly trivial: give it power, hook up the oscillator and attach the 8 data pins for the LCD to PORT D on the PIC in the same numerical order (RD0->D0, etc) and the R/S, R/W and E lines for the LCD are attached to PORT C.  The code was compiled using Hi-Tech PIC C18 and the LCD code is fairly generic code that was included with PIC C.  If we get time, a schematic will be posted as well.

Here is the circuit in action:

PIC18F4455 Hello World LCD

And here is the schematic (this has a temperature sensor on it as well…see next post for how to use that!):

PIC18F4455 LCD and Temperature Sensor

Leave a comment