Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Character Lcd 8×1, 8×2, 8×4, 16×1, 16×2 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Pinout and Working

By EG Projects April 28, 2019

In this tutorial I am going to explain about the pin out, working and control systems of character lcd’s. Character lcd’s comes in many sizes for example  8×1, 8×2, 8×4, 16×1, 16×2, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2 and 40×4. In these MxN dimensions, M represents number of coulombs & N represents number of rows. 

Similarity in character lcd’s

All these Lcd’s available in market have 14 or 16 pins depending on the vendor/supplier. Also they all contains a same lcd controller in them which controls all their activities. Talks to external peripherals(like microcontrollers) receives data from external devices and displays them on lcd display screen. Generally every character lcd has HD44780 controller in it which controls every operation of character lcd. Some variants and competitors of HD44780 also placed step in embedded market but they are not popular for example AIP31066 , KS0066 , SPLC780 and ST7066 lcd controller.   

Character lcd’s Pin names and functions

In these 14 pins, 8 are data pins(From DB-0 to DB-7). Three are lcd control pins RS(Register Select), R/W(Read-Write) & En(Enable). Two are lcd power pins Vcc(+5v) Vss(Gnd). The last pin is lcd contrast pin(V0).

If lcd contains 16 pins than the extra 2 pins are LED+ and LED- pins. LED+ and LED- are for lcd’s back light, if you want to switch on the back light of lcd then use these pins other wise leave them void.

8x1, 8x2, 8x4, 20x1, 20x2, 20x4, 24x1, 24x2, 24x4, 32x1, 32x2, 40x1, 40x2, 40x4 Lcd Pinout.

8×1, 8×2, 8×4, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Lcd Pinout.

Character Lcd’s coming in a square female header

Character lcd’s which have pins arranged in two lines like headers, their pin-out is given below. Female header pin-out is shown below. Vendors for ease pre-solder the lcd pins and provide a female header for connections.
8x1, 8x2, 8x4, 20x1, 20x2, 20x4, 24x1, 24x2, 24x4, 32x1, 32x2, 40x1, 40x2, 40x4 Lcd pinout in Bus header form.

8×1, 8×2, 8×4, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Lcd pinout in Bus header form.

Characters lcd’s with slightly different pin out

Mostly character lcds contains HD44780U lcd controller in them. HD44780 was developed by Hitachi. A single HD44780 can handle up to 80 characters. In 40×4 lcd display total characters which we can display on lcd are 40×4=160. So to control 160 characters we need two HD44780 controllers. To work with two HD44780 controllers we need an extra pin to energize the second controller. 

The only difference in 40×4 display and sizes greater than this is two extra pins. NC and an extra En pin.

  •   NC= Is simply no connection. Leave it untouched or apply negative voltage.
  •   E1 & E2= E1 controls (Enables) the upper two rows of 40×4 character lcd. E2 controls (Enables) the Lower 2          rows of 40×4 display.

Take a simple look on the diagram below from the datasheet of 40×4 character lcd. 

40x4 and sizes grater than it lcd controller.

40×4 and sizes grater than it lcd controller schematic.

Pin out of 40×4 character lcd display

40x4 Lcd pinout

40×4 Lcd pinout

40×4 display pin out in header format

40x4 lcd pinout in bus Header package

40×4 lcd pinout in bus Header package

What is lcd contrast Pin?

Lcd contrast pin is same like fine tuning your television. In televisions we fine tune stations using remote but in character lcd’s we have to manually do it by varying the resistance. Varying the resistance means we control the input current to lcd. Varying resistance will fade or brighten the characters or data appearing on lcd screen.
Variable resistor potentiometer with 16x2 lcd contrast pin settings

Variable resistor potentiometer with 16×2 lcd contrast pin settings

Character lcd operation modes

Character Lcd’s can be interfaced in 8-bit and 4-bit mode with external controllers. In 8-bit mode all the data lines(DB0-DB7) of lcd are utilized. In 4-bit mode only four data pins of lcd are utilized (DB7-DB4). In 4-bit mode first the 8-bit ASCII value is divided in to two nibbles, first the upper nibble is send on data line and then the lower nibble. 4-bit mode is used when we want to save GPIO pins of our external device like microcontoller. An example of lcd connection with remote controller is shown in the picture below.

I prepared a good tutorial on interfacing character lcd in 8-bit and 4-bit mode with microcontrollers. Demo codes are also presented and explained in the post. Click the below button to take the tutorial.

Difference between 8-bit and 4-bit mode lcd interfacing mode

Lcd interfaced in 4-bit mode

8x1, 8x2, 8x4, 20x1, 20x2, 20x4, 24x1, 24x2, 24x4, 32x1, 32x2, 40x1, 40x2, 40x4 Lcd Connection with Microcontroller in 8-bit mode.

8×1, 8×2, 8×4, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Lcd Connection with Microcontroller in 4-bit mode.

Lcd interfaced in 8-bit mode

8x1, 8x2, 8x4, 20x1, 20x2, 20x4, 24x1, 24x2, 24x4, 32x1, 32x2, 40x1, 40x2, 40x4 Lcd Connection with Microcontroller.

8×1, 8×2, 8×4, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Lcd Connection with Microcontroller in 8-bit mode.

Character lcd Individual Pin Functions

DB0-DB7
These are eight bit data pins. We send our data and command to lcd using these lines. Data is directly accepted by the hd44780 lcd controller.

R/W(Read-Write)
This pin selects if we want to read or write some instruction (Data-Command) to lcd. Signals notifies the lcd controller about potential read write operation.

  • If R/W=0 Write operation is selected.
  • If R/W=1 Read operation is selected.

En(Enable)
This pin is a push data present on data lines of lcd. Generally it remains low. But when we want to display data on lcd screen or send lcd settings command we make this pin high for some milli seconds and then back again low. This small push sends the data present on lcd data lines straight  to the HD44780 lcd controller   

Note: 40×4 and sizes greater than it has two enable pins E1 and E2.

RS(Register Select)
This pin selects the lcd register. Each character lcd has two registers Data and Command.

  •  Data Register

          To display data on lcd we have to select data register of lcd. Send data to data register. Now To make this data                 appear on lcd we have to made En(Enable) pin high.
              If RS=1 Data Register is selected.

  •  Command Register

         Before using lcd we have to set some parameters for lcd. Like the font size of data that we want to display on lcd.           Cursor blinking or still settings etc. 
          If RS=0 Command register is selected.​

Standard lcd commands and their functions are given below.

8x1, 8x2, 8x4, 20x1, 20x2, 20x4, 24x1, 24x2, 24x4, 32x1, 32x2, 40x1, 40x2, 40x4 Lcd Initializing Commands

8×1, 8×2, 8×4, 20×1, 20×2, 20×4, 24×1, 24×2, 24×4, 32×1, 32×2, 40×1, 40×2, 40×4 Lcd Initializing Commands

V0
V0 sets the contrast for lcd. Attach a variable resistor, potentiometer to this pin and set the exact contrast which makes the text visible to naked eye.

LED+ & LED-
To display the back light of lcd. Supply +5v to LED+ and ground LED-.

Vss & Vdd
Make Vss pin ground and apply +5v to vdd to switch on the lcd.

Some projects that are created by use using 16×2 lcd and various microcontrollers. Visit them below. Each project contains free source code and project circuit diagram.

PLC with Pic microcontroller

Calculator with Arduino, 16×2 lcd and 4×4 keypad

Display your name on lcd using 8051 microcontroller

Download the pdf document of the post.

8x1_8x2_8x4_20x1_20x2_20x4_24x1_24x2_24x4_32x1_32x2_40x1_40x2_40x4_pinout_and_working_.pdf
File Size: 423 kb
File Type: pdf

Download File



Filed Under: Knowledge Share, Microcontroller Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • How to analyse this Circuit?
  • Power amplifier stability
  • can we acheive a goal close to output which matches the Marki tool output
  • Problems with LVS of IO pads
  • Create Voltage Report in HFSS

RSS Electro-Tech-Online.com Discussions

  • Unknown, to me, electric motor fitting
  • Can a small solar panel safely trickle-charge old NiMH AA batteries?
  • KiCad custom symbol definition correct approach
  • Measuring controller current output with a meter
  • restarting this Christmas project

Featured Tutorials

Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
    Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
    Practical application of hardware filters with real-life examples
  • A filter design example
    A filter design example
  • Types of filter responses
    Types of filter responses
  • What are the two types of hardware filters?
    What are the two types of hardware filters?
  • What are hardware filters and their types?
    What are hardware filters and their types?
More Tutorials >

Recent Articles

  • ST e-fuse controller enables fast, flexible automotive power protection
  • Posifa sensors improve low-flow accuracy in compact systems
  • Acopian releases low-profile power supplies rated to 900 W
  • Octavo Systems OSDZU-3 REF Development Platform
  • Same Sky adds enclosure design to its audio engineering capabilities

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe