Arduino Circuits

Two-Line Text on a Character Display

Drive a two-line character display and show text by sending the correct initialisation sequence.

22 November 20265 min read
Two-line character display connected to a control board and a contrast potentiometer on a breadboard
Breadboard layout, components and jumper connections of the Two-Line Character Display circuit.

Interactive circuit guide

Run the simulation, follow the build steps one by one and try it in our real app.

Real screenshot of our circuit simulator Stopped
Open in our app →

Step-by-step build

What is it for?

In this project you connect a two-line character display to a control board and print text on it. The register select (RS), enable (E) and data bus (D4-D7) pins are driven separately, and the contrast pin is fed from a adjustment resistor. You see the role of both control and data pins and grasp the logic of parallel data transfer. The circuit is built on a breadboard with jumper wires between the board, the display and the resistor. To print text you first send an initialisation sequence, then transmit the characters one at a time over the data bus. This is the most basic and most common way to show information to a user in embedded systems; the same approach appears in products from measuring instruments to household appliances.

Parts list

The following components are used to build this project:

  • Control board × 1 — Drives the display and sends initialisation commands.
  • Two-line character display × 1 — Shows text on two lines.
  • 10 kΩ adjustment resistor × 1 — Sets the display contrast.
  • Jumper wire × 7 — Connects the board, display and resistor.
  • Ground (GND) × 1 — Common reference point.

Build it step by step

  1. Place the control board and character display on the breadboard.Tip: check the display pin order in the layout notes.
  2. Connect the RS (register select) pin to board pin 1.Tip: RS chooses whether a command or data is being sent.
  3. Connect the E (enable) pin to board pin 2.Tip: a transition on E latches the data into the display.
  4. Connect the D4-D7 data bus to board pin 3.Tip: the four-bit bus carries the character codes.
  5. Connect the adjustment resistor wiper to the display contrast (VO) pin.Tip: adjusting the wiper sharpens the text.
  6. Connect the lower leg of the resistor and the display ground to common ground, then to the board GND pin.Tip: without a common ground the display is unstable.
  7. Send the initialisation sequence and print two lines of text.Tip: the first and second line addresses are different.

How it works

A character display works with its own internal controller. While the RS pin is LOW, the byte sent is interpreted as a command; while it is HIGH, it is treated as data. When the E pin goes from LOW to HIGH, the four bits on the data bus are accepted, so an eight-bit character code is delivered in two steps. The adjustment resistor applies a variable voltage to the contrast input and sets how sharp the characters appear. During initialisation the display mode, cursor state and clear commands are sent; then every character of the text is transmitted in turn over the same bus. On a two-line display the line start addresses differ, so the text is placed separately on each line. This structure is a classic example of parallel data transfer and the separation of control and data signals.

What you learn

  • Distinguishes the roles of control and data pins.
  • Explains how parallel data transfer works in four-bit steps.
  • States why the initialisation sequence is necessary.
  • Understands the effect of contrast adjustment on readability.

Tips

  • If the display looks blank, turn the contrast adjustment resistor first.
  • If RS and E are swapped, the display reads commands as data; check the pin order.
  • If the initialisation sequence is skipped, the display may show undefined characters.

Try it yourself

  • Print two lines: Write a short message on each line of the display. The first and second line show the intended text clearly.
  • Set the contrast: Turn the adjustment resistor until the characters are sharp. The characters are readable and stable on both lines.

Getting the parts

If you want to build this project in real life, you can get the parts from hobidevre.com.

Frequently asked questions

What is this circuit for?

It drives a two-line character display so you can print text and learn how control and data pins work.

How does the circuit work?

RS selects command or data, E latches the four-bit bus, and an initialisation sequence prepares the display. The contrast resistor sets the voltage at VO so characters are readable.

What is the expected result?

Clear, stable text on both lines with correct contrast and shared ground.

You may also like