Techniques to move or scroll text on 16×2 lcd with arduino uno
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
How coding technique works?
Scrolling text on 16×2 lcd screen using arduino uno – Circuit diagram
How and what is displayed on 16×2 lcd with arduino uno
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.
Second method – Using Standard Lcd commands
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.
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.
Watch the project video Here….