Scrolling text is a popular method used in LCD displays and digital signs to showcase messages that are too long to fit within the available display space. Scrolling the text ensures the entire message appears smoothly and remains easy to read. In this experiment, we will demonstrate how to implement text scrolling in a specific direction using a microcontroller and an LCD.
Objective
This experiment teaches users to scroll long messages across the screen when they exceed the display area. This will allow for better utilization of limited display space, especially when conveying long messages.
Materials to use
Circuit diagram
As demonstrated in the previous experiment, the schematic and hardware connections remain unchanged. You can refer to the provided setup to understand how to make the necessary connections. The experiment is titled “INTERFACING LCD DISPLAY TO THE MICROCONTROLLER“.
It focuses on connecting and configuring an LCD screen to display data using the microcontroller. Simply follow the same wiring and pin assignments from the earlier steps.
Arduino Codes
Code knowledge
This project builds on the previous LCD display experiment, adding scrolling text functionality in both directions. The main difference is the dynamic text movement, which involves controlling the LCD cursor and using scrolling functions in the code.
This loop controls the position of the text on the LCD screen. The positionCounter starts at 0 and increments up to 13, meaning the text will scroll across the first 13 columns of the LCD.
This function shifts the entire text one position to the left. This creates the effect of the text moving from the right side of the screen toward the left, scrolling the content into view.
This function shifts the text one position to the right. The text will appear to move from the left side of the screen toward the right, scrolling out of view from the opposite direction.
Results
This program will display and animate text on a 16×2 Liquid Crystal Display (LCD) by using scrolling effects.
The display shifts all characters to the left 13 times, one position at a time. This causes: ” HELLO!” and “FROM NYEREKA TECH” to scroll off-screen from the left.
During Scrolling: The text continuously shifts left and right in an animated fashion