Interfacing A PIC To LCD: Software

Jump To:
Program Download:

Main C File
lcd_pic.c
marquee_lcd_pic.c

The Software
           The LCD->PIC interface software has three main portions to it:
    -Main Function
    -Command Function
    -Print Function

           The software for this project is very simple. I'll leave it to you guys to look through it follow the explaination below & if you have any additional questions just take it to the forums and ask! The program is heavily commented so it should be readable as well.

Main Function
           All programs will have a main function, there is where all the fun action and control happens. Inside the main function for this program we setup the lcd for 4-bit operation, 2 lines control & then print characters to it like mad. Main uses the command & print functions to achieve this.

Command Function
           Inorder to get the LCD running it needs to know what it's suppose to be doing. By sending commands to the LCD interface we can set the LCD up and get it ready to print out characters. You can do things like choose to use 1 or 2 lines, show the cursor or not, etc.

Print Function
           The print function has one simple task, to send a special command to the lcd interface telling it to display the character sent. The print command is really nice because all you need to do is send standard ascii code and that character will print out. This works for standard ascii but if you want to print greek letters or japanese (Katakana/Hiragana) you'll have to use a different set (check the datasheet for this).



;