LPC2148 – LCD 4 Bit Interfacing

In our previous LCD tutorials we were used that LCD in 8 bit mode. But here we will see LCD 4 bit interfacing with LPC2148 Microcontroller.


Before we will start i would suggest you to read these topics. Then only you can understand this strongly. If you already know, please go ahead.

LCD 4 bit interfacing with LPC2148


8 bit mode –  Using 8 data lines in LCD (totally 8 data lines are there)

4 bit mode –  Using only 4 data lines in LCD module

8 bit mode is already working and that is looks awesome. Then why we are going to 4 bit mode? This is the question comes in every mind whenever i said 4 bit mode. Yeah that 8 bit mode is nice. But but but… Just assume. I’m doing one project which requires more number of hardwares (sensors or etc). So we need to reduce the GPIO as possible. In that time we can use this 4 bit mode and reduce the pin required for LCD module. Am i right? Great. That’s why 4 bit mode also important. Already we know the LED’s operation. If we want to enable 4 bit mode we have to do small modification in normal method. Let’s see that.

In initializing time we have to give 0x28 command. That’s all.

LCD Initializing

Sending command

Here everything is same except way of data writing. Here we have only 4 bits. So we need to send nibble by nibble. So first we need to send first nibble then followed by second. See that code. I’m writing into the Port 0 ’s 4 – 7 bits. Because that 4 bits are connected to LCD.

Sending Data

Same as sending command.


Circuit Diagram





[ Please find the output image Here ]

0 0 vote
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x
%d bloggers like this: