Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • Engineering Deep Dives
      • 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

Displaying moving(scrolling) text on 16×2 lcd with arduino uno

By EG Projects July 12, 2019

Moving or scrolling a text on 16×2 lcd or any size of character lcd is not a hard task. It only requires knowledge of how the character lcd works? What are its configuration commands? Internal registers and structure of character lcd controller. I advice you to please first take some tutorials on getting stated with character lcd’s. This will help you to understand the circuit diagram and arduino code below.

16×2 Lcd Pin Out and Working

Commands and Data send to 16×2 lcd

16×2 lcd in 4-bit and 8-bit mode – Difference

Techniques to move or scroll text on 16×2 lcd with arduino uno

All the character lcd’s have HD44780 controller in them. HD44780 lcd controller is responsible to receive intrusions from external microcontroller and display characters on lcd. Since all the character lcds have HD44780 controller in them so the techniques which i am going to discuss below can work on all character lcd’s.  

There are two methods to move(scroll) text on any character lcd(8×1,8×2,8×4,16×1,16×2,16×4,20×1,20×2,20×4). 

  • Manually using coding techniques.
  • Using standard lcd commands.

First method – Manually scroll text on lcd with coding technique

Moving scrolling text on NXN lcd using code manipulation required you to be very genius in programming and especially dealing with arrays. Arrays of all data types. This project consists of only just few lines with a single character array(To be moved scrolled on screen).   ​

How coding technique works?

In coding technique i pick character from array, print it on first location of lcd, then move it to second location and then print second character on first location then move first character on third location second character on second location and third character is printed on the first location. Applying his technique on characters makes characters to look like moving. Hope it makes sense to you people.

Scrolling text on 16×2 lcd screen using arduino uno – Circuit diagram

16×2 lcd is interfaced with arduino uno in 4-bit mode(don’t know take the above recommended tutorials). Circuit diagram of the project is given below.
Scrolling text on lcd with arduino uno

Scrolling text on 16×2 lcd with arduino uno

Moving(Scrolling) Text on lcd with arduino uno

Moving(Scrolling) Text on lcd with arduino uno

How and what is displayed on 16×2 lcd with arduino uno

First line of the lcd displays “Moving Text!!!“. On second line you will see moving string. String originates from left and terminates on right and after termination it again comes out from left. 

Their are two logic’s in the code that needs to be understood. First the character is displayed on left and then it moves a head to right and on each step every character moves a head right. Like, My first character is ‘U‘ it first displayed on lcd’s second line matrix no 14 and then it moves a head to right to matrix 13. On 14 matrix second character originates then they both are moved at 12 (‘U‘) and 11 (second) matrix and the matrix 14 is occupied by the 3rd Alphabet.

​The whole cycle completes like this and the string moves(Actually their is no movement but you programmed it to do so). Second Logic is how the characters are moved out from the last address from right.The last address to right is 1(start of the second line of lcd). Actually i drop the elements of the string one by one and it seems to be that the string is going out.  

This code manipulation method is messy and requires lo of contains to be taken in to consideration before writing code logic. Final code for arduino becomes too lengthy is we utilize this method in our project. Also flickering could be an issue if their is break or delay in code statements.   
Moving text code/files 

Second method – Using Standard Lcd commands

Scrolling text using standard lcd commands is easy. You can scroll text left and right. I am going to scroll it to right. To scroll to right standard command is 0x18(Hexadecimal) or 00011000(Binary). To scroll to left command is 0x1C(Hexadecimal) or 00011100(Binary). I am scrolling my website name “www.microcontroller-project.com“.

Lcd(16×2) is interfaced in 4-bit mode with arduino uno. Same circuit as given above. 16×2 lcd hd44780 lcd controller standard set of commands are below. 

16x2 lcd hd44780 controller command set

16×2 lcd hd44780 controller command set

In setup loop i initialized the lcd. In loop function i placed cursor at first index of lcd(Coulomb-1, Row-1). Then i start displaying text on lcd. When 14 characters were displayed, I started scrolling the text. Scrolling command is placed in if(i>=14) condition statement. So when 14 characters are on lcd text starts scrolling on 16×2 lcd.

Auto scrolling text command is also present in arduino LiquidCrystal library. leftToRight() and rightToLeft() are functions present in arduino Liquid crysral library whicha utomatially can move the text is either directions. You can also import them for scrolling. But if you want to do scrolling by your self. Include the code given below in your project. Predefined Auto Scrolling command in LiquidCrystal library is same, they also works on 0x18, 0x1C commands. Actually these commands are lcd predefined commands in data sheet of HD44780 and lcd supports them. So writing them by your self or using arduino predefined library means same.  

Download the project files. Folder contains the project code and .ino file of arduino uno project. Simulation of the project is also in the project folder. Simulation is made in Proteaus 8.0. Give us your feed back on the project.

Watch the project video Here….

Scrolling text on lcd project folder


Filed Under: Arduino Projects, Microcontroller Projects

 

Next Article

← Previous Article
Next Article →

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



Tell Us What You Think!! Cancel reply

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Wide Bandgap Semiconductors
Moving from silicon to GaN or SiC feels like a whole new ballgame, doesn’t it? It isn’t just about faster switching; it’s about managing the layout parasitics and thermal realities that come with that speed. This month’s Tech Toolbox features a curated eBook that tackles these design hurdles head-on.

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.

RSS Electro-Tech-Online.com Discussions

Featured Tutorials

Learn - AWS IoT Tutorials

  • How to enable device-to-device messaging on AWS IoT Core using MQTT
    How to enable device-to-device messaging on AWS IoT Core using MQTT
  • How to connect Raspberry Pi to Amazon AWS IoT Core using MQTT
    How to connect Raspberry Pi to Amazon AWS IoT Core using MQTT
  • How to connect ESP32 to AWS IoT Core using MQTT
    How to connect ESP32 to AWS IoT Core using MQTT
  • How to connect a computer to AWS IoT Core
    How to connect a computer to AWS IoT Core
  • Arduino compatible coding 02: Getting started with Arduino
    Arduino compatible coding 02: Getting started with Arduino
  • Arduino compatible coding 03: Basics of Arduino sketches and Embedded C
    Arduino compatible coding 03: Basics of Arduino sketches and Embedded C
More Tutorials >

Recent Articles

  • Nuvoton launches Cortex-M23 MCU for measurement
  • Synopsys launches 1.6T ESUN IP solution
  • Samtec introduces 35-pin bus connectors for UxV
  • Infineon launches UWB chip for secure access
  • Sensata launches dual-trigger HV protection device

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 © 2026 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
      • Engineering Deep Dives
      • 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