Specifications

Figure 25 The initialisation of the LCD [23]
The values at (1), (2), (3), (4), and (5) are the configuration data written to the LCD
module using the control function described above. At (1), the LCD is set in 4-bit bus
mode, 2 lines of display and the characters are in 5x7 dot format. At (2), the memory
mode is set to increment mode. This means that when a character is printed the cursor is
moved across one position. At (3), the display is turned on and a cursor is shown. At
(4), the display is cleared, and (5), the memory address is set to the first cursor position.
These are the main basic function used to operate a LCD module. For this project, a
print screen function was developed. This function was designed to display the song
name on the screen while at the same time removing all the previous characters. To
make it faster in each screen write, each character position is only written too once. This
means the screen is not cleared before writing the song name but clearing as required
during the printing of the name. The function will not split words onto two lines. It
determines if the word will fit on the space remaining and if not, it prints it on the next
line. The implementation of the print screen function shown in figure 26.
54