The Arduino LiquidCrystal library has 4 constructors with different arguments:

LiquidCrystal(rs, enable, d4, d5, d6, d7) 
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) 
LiquidCrystal(rs, enable, d0, d1, d2, d3, d4, d5, d6, d7) 
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)

The following comments are stated for the constructor arguments:

[...] d0, d1, d2, and d3 are optional; if omitted, the LCD will be controlled using only the four data lines (d4, d5, d6, d7).

What is the point of d0-d3 if they are not needed? Will they decrease the response time?


3 Answers 3


That type of LCD has two main modes of operation: 4-bit mode which uses 4 data pins (d4-d7), and 8-bit mode which uses all 8 data pins (d0-d7).

4-bit mode has the advantage of requiring fewer output pins on your Arduino. However, it means your sketch needs to send each command/character as two separate batches of 4-bits (one after the other). This is handled for you automatically by the LiquidCrystal library, so you won't need any extra complexity in your code. However, it does mean that your sketch requires roughly double the number of processor cycles to send anything to the LCD.

In contrast, 8-bit mode sends each command/character as a single batch of 8-bits. That simply means it technically runs a little faster.

With that said, a person looking at the display probably won't see a significant speed difference most of the time, as it still goes very quickly. The main impact will be on the microcontroller (the Arduino in this case). If it can use the faster 8-bit mode then it can devote a little more processing time to other things. That can be particularly helpful for timing-critical applications.

  • With that said, a person looking at the display probably won't see a significant speed difference most of the time, as it still goes very quickly. Which isn’t usually a problem since many modules (especially cheap Chinese ones like the ones on eBay) tend to have low refresh rates, so you can't update them too fast without them turning into a blurry, unreadable mess anyway.
    – Synetech
    Oct 1, 2018 at 20:53

The answer is on the same page as the quote you mentioned (I have highlighted the important statement):

Creates a variable of type LiquidCrystal. The display can be controlled using 4 or 8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines unconnected. The RW pin can be tied to ground instead of connected to a pin on the Arduino; if so, omit it from this function's parameters.

It turns out that the Hitachi HD44780 LCD display can work in 4-bit or 8-bit modes.

  • 1
    Yes, it says it can be controlled using both 4 and 8 data lines. But what is the point of using 8 if you only need 4? I mean, isn't there any advantage of using 8 over 4? Why waste 4 data lines if it's of no use? Mar 30, 2014 at 11:28
  • 1
    Using 8 bits mode is a bit faster on Arduino side and simpler (less code). But in general, it is not really worth it, in comparison to sparing 4 output pins.
    – jfpoilpret
    Mar 30, 2014 at 13:24
  • @jfpoilpret It's worth it if you have four extra output pins... Mar 30, 2014 at 19:57
  • @annon can you be more concrete about HOW it is worth to use 8 pins mode? Concrete experiment values?
    – jfpoilpret
    Mar 30, 2014 at 20:02
  • 1
    @jfpoilpret As stated in Peter's answer, it gives a little more processing time to the chip. If you have four extra pins, go ahead and add it. If it would require it to be much bigger/more expensive, it's not really worth it. Mar 30, 2014 at 20:48

The presence of those pins is a requirement of the technique that had to be used to interface the LCD to the microprocessors that were available back when the HD44780U controller chip was developed.

Single chip microcontrollers as we know them were still in the future and the LCD had to be interfaced to the 8-bit microprocessor chips of the times using the same techniques as any other 8-bit I/O or memory device which was an 8-bit bus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.