Wednesday, April 17, 2024

Designing with FPGAs: Interfacing an LCD (Part 2 of 5)

After the Reset3 state, the FSM goes to the Display_OFF state. The data bus sends command ‘0×08’ (hex) to the LCD which is for display off and cursor off. The program loop then goes to the Display_CLR state. The state clears any text on the display. To do this command ‘0×01’ (hex) is sent to the data bus. The next state is the Display_ON state (display on and cursor off) which is executed by sending command ‘0×0C’ (hex) on the data bus. Next state is the Mode_SET state that sets the LCD such that the cursor shifts to right after each character is displayed. This is done by setting data bus to ‘0×06’ (hex).

The next seven states Write_CHAR1, Write_CHAR2, Write_CHAR3, Write_CHAR4, Write_CHAR5, Write_CHAR6 and Write_CHAR7 display seven alphabets ‘W’, ‘E’, ‘L’, ‘C’, ‘O’, ‘M’ and ‘E’ on to the display. The next state is RETURN_HOME that sets the address of the next command to be written and then sends the FSM to the Reset1 state. ‘WELCOME’ is again written on the LCD and the process is repeated again.

It may be mentioned here that the default position of the cursor is the beginning of the first line. If any other position needs to be used to display the text, a command needs to be sent to force the cursor to the desired position. Table II gives the addresses of different positions of the LCD.

Conclusion
This part described the LCD controller implementation using an FPGA. The next part will cover details on how to establish an RS-232 communication link using an FPGA.

Read next part


Varsha Agrawal is a scientist at Laser Science and Technology Center (LASTEC), a premier DRDO lab working in the field of laser-based defence systems. She has more than 13 years of R&D experience in the design and development of a variety of systems for defence-related applications. She has authored two books and published more than 20 research papers and technical articles

SHARE YOUR THOUGHTS & COMMENTS

Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators