This post is about the line addresses for the 16x4/20x4 LCD display with 4 lines. Just for your information i would like to tell you that there is no any difference in interfacing the 16x2 LCD and the 16x4 LCD display in terms of hardware pin connections.

What i mean is, given the same circuit which was built for a 16x2 LCD display can be used with a 16x4 LCD display with no hardware changes needed at all. Even the program/code written for the 16x2 display works fine with the 16x4 LCD display except that you will only be able to display on the first two lines only. There are separate commands for setting the cursor to the required line in these displays. These commands set the line address and place the cursor at the appropriate line. Here i have listed down the line addresses for the 16x4/20x4 LCD display, 

 

For displaying the characters on the 1st line send the command 0x80

For displaying the characters on the 2nd line send the command 0xC0

For displaying the characters on the 3rd line send the command 0x94

For displaying the characters on the 4th line send the command 0xD4

 

WriteLCDCommand( 0x80 ); // Sets cursor to line 1 of display

WriteLCDCommand( 0xC0 ); // Sets cursor to line 2 of display

WriteLCDCommand( 0x94 ); // Sets cursor to line 3 of display

WriteLCDCommand( 0xD4 ); // Sets cursor to line 4 of display

 

Also see: 

 




About the Author

is the author of this blog and is an Embedded systems design engineer by profession & Founder @ Valetron Systems Pvt Ltd


Email:This email address is being protected from spambots. You need JavaScript enabled to view it.

Find us on Google+

HIRE ME FOR YOUR PROJECT AS A FREELANCER

 

EasyEDA: Free Circuit Design Software

  • Easy Schematic Capture
  • Powerful Circuit Simulation
  • Online PCB design

Design Your Circuit and PCB here:

https://easyeda.com/editor

Cheap PCB Manufacturing