Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

Displaying moving(Scrolling) text on lcd using 8051(89c51,89c52) microcontroller

By EG Projects

This project is about How to display moving-scrolling text/string on lcd using 8051(89c51 , 89c52) microcontroller. Moving or scrolling text on lcd is not very hard it is only the game of programming the more expert you are in programming the more you can do fun. 
It is same like we display moving text on our java applications or the text that you see on news channel at the bottom moving from left to right. In this project I used a 16×2 lcd with 8051(89c51,89c52) microcontroller. 16×2 lcd is used in 8-bit mode. If you don’t know 8-bit mode than just click the link and you will have a good tutorial.
Difference between 8-bit and 4-bit lcd mode
.

​Their are two ways to Scroll-move Text on lcd

  1. Use Your Programming expertise to do so.
  2. Using Standard Commands of lcd.

Scrolling lcd display first method

First i am going to scroll text using my c++ expertise with out using standard 16×2 lcd commands. Text that I am moving on the screen is my name “Usman Ali Butt”. First i place the cursor at Row 2 Coulomb 14 and display my first alphabet ‘u’ at that place. Then i move my cursor one step back at location 13 and displays two alphabets ‘us’.  ‘u’ at 13 and ‘s’ at 14.Then again move the cursor one step back and now three characters are displayed ‘usm’. ‘u’ at 12 ‘s’ at 13 and ‘m’ at 14 location. The whole string is displayed on the lcd in this manner and it feels like string is moving. Actually you programmed it to do so.

Coming to the code. First include the necessary library reg51.h that is to be included in every project where you are using 8051(89c51,89c52,89s51,89s52 etc) series microcontrollers in your project. Then Port-3 pins 5 and 6 are used as rs(register set) and en(enable) pins for lcd control . If you dont know what they are you can have a good tutorial here. 

  • Lcd Pinout, Registers and Working Description.

Then I defined the string which i want to scroll on the lcd in the form of character array c[15].  Then some commands are defined they are actually moving the cursor one step back after each cycle. 

The rest of the code is delay() function to give necessary delay where needed. lcdint() Function to initialize lcd. lcdcmd() is sending commands to lcd. Display() function is sending data to lcd for display. Dont know Commands and Data Send to Lcd. Here is a good tutorial.

  • Difference Between commands and data send to lcd.

Port-1 is used to send data and commands to the lcd. Port-1 is connected to Data pins of lcd.         

Scrolling text with 89c51- Circuit Diagram

Scrolling text with 89c51- Circuit Diagram

Check Out the Project Video

Standard Lcd Commands Code
Second Method
The more easy way is to scroll the text using standard lcd commands. The code is same like the above method. The only change is in the main function & now the text which i am going to scroll is my web site name “microcontroller-project.com”.

In the main function only the command 0x18 is performing the function of scrolling-moving. It scrolls the printed letter to wards one step left. In the main function while loop prints each letter once and then calls the 0x18 command which moves whole of the text to wards left.From whole of the text i mean the letters which are printed previously and printed in the current instruction. 

Note: I am continuously scrolling the text on lcd.  

Moving Text on 16x2 lcd- Circuit Diagram

Moving Text on 16×2 lcd- Circuit Diagram

Check Out The project Video and compare it with the video of the above Method Code


 Moving Text With Standard Lcd Commands Code


Filed Under: 8051 Microcontroller, Microcontroller Projects

 

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

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!


Featured Tutorials

  • Adjustable 0 to 30V 2A DC Power Supply Circuit (Part 1/13)
  • Adjustable +/- 1.25V to +/-22V 1A Power Supply Circuit (Part 2/13)
  • Adjustable 0 to 15V 1A Mini Power Supply (Part 3/13)
  • Constant 12V Power Supply for LED Circuits (Part 4/13)
  • Constant +/-9V DC Symmetrical Power Supply Circuit (Part 5/13)
  • Making a Circuit Breaker (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

“ee

“ee

“ee

“ee

“ee

“ee

Recent Articles

  • STMicroelectronics and MACOM announce successful RF GaN-on-Si prototypes
  • Infineon expands its CoolSiC portfolio
  • STMicroelectronics and AWS collaborate for secure IoT connections
  • Pet feeding system using WhatsApp (protocol bridging with MQTT)
  • STMicroelectronics launches new MDmesh MOSFETs

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics Research robot samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Space Vector PWM Help Needed
  • P-Channel MOSFET always on
  • DIY test leads - source for lead ends?
  • hardcore floquet bloch scattering problem help
  • Limiting variable DC power source

RSS Electro-Tech-Online.com Discussions

  • How to get lots of PCBs made cheap?
  • How do I test amplifier speaker output polarity?
  • XOR Gate Circuit From Diodes
  • 3.3V microcontroller vs 5V relay
  • What is this part on my solar controller
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering