Wanted to make a post about a lab from my Computer Organization & Assembly class that I though was particularly cool! Some data manipulation to get this scrolling effect on the 16x2 LCD screen. While ordinarily this animation might be a function call in a high-level abstraction like Arduino, doing this in assembly is matter of timing and moving bits around registers in the right order. Seeing how this operates on the machine code/assembly level is what gives you true control of the hardware and software. Look below for a short video of the movement in action.
The lab program provides the buttons with the ability to access subroutines to write text to the screen, swap the lines on the screen, move the text to the left or right, and clear the screen. By default, the LCD screen will be initialized to have a clear screen and will not introduce any text until the write to screen button is pressed. When the write to screen button (PD0) is pressed, the given strings will be written to the screen (one string per line). When the swap lines button (PD1) is pressed, the text on each line is swapped. Finally, when the clear screen button (PD7) is pressed, the screen is cleared of all text. The lines can be scrolled to the left by holding the respective button (PD6) and to the right in the same way (PD5).
This lab was written as a two-person team with Chalida “Anita” Ruangrotsakun and me.
Here’s the GitHub link to the project repository.
Article last edited: August 2021