PIC12F675 LCD Interfacing Code and Proteus Simulation

This post provides the LCD[1] interfacing code using PIC12F675 microcontroller. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the ‘Downloads‘ section at the bottom of this page.

PIC12F675 LCD Interfacing

It is assumed that you know how to make an LED blink with PIC12F675 microcontroller. If you don’t then please read this page first, before proceeding with this article.

PIC12F675 microcontroller has only 6 IO pins ( 5 of them can be made input or output, but pin4 (GP3) can only be made an input ). So it is not possible to directly attach LCD with PIC12F675 even in 4bit mode[2]. To make this possible, a serial to parallel shift register IC (4094) is used in this circuit. In this way by only using 3 pins of PIC12F675 microcontroller, we can interface LCD with it in 4bit mode. This is shown below in the figure.

In the above figure, GP0 pin is being used as Enable pin for LCD. GP1 pin is used as Clock pin and GP2 pin is used as Data pin for 4094 IC.

PIC12F675 LCD Interfacing schematic


In the code you can easily select pins to be used for interfacing with the LCD. Following figure shows the pin selection code.


LCD interfacing code using PIC12F675 was compiled in MPLAB v8.85 with HI-TECH C v9.83 compiler and simulation was made in Proteus v7.10. To download code and Proteus simulation click here.


For more detail: PIC12F675 LCD Interfacing Code and Proteus Simulation

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us: