Clearing Display on Spartan 3E LCD display

Discussion in 'Embedded Systems and Microcontrollers' started by wantanjung, May 24, 2009.

  1. wantanjung

    Thread Starter New Member

    May 24, 2009
    Dear all,

    i guess there are others who came out with this topic before about writing data on the LCD displays for the Spartan 3E FPGA boards.

    However, i have successfully written data on the LCD board. My problem is how do i clear the display?

    My plan is after i write data, i wish to clear data if both enable and reset pins are high.

    If only enable pin is high, the data will show. Anybody knows the sequence?

    Nothing is written in the xilinx manual.

    Please help

  2. hgmjr


    Jan 28, 2005
    There are at least a couple of ways to clear the LCD display assuming it is based on the HD44780 LCD driver. You can issue the "CLEAR DISPLAY" command to the LCD or you can simply fill the display with ASCII spaces. "0x20" is the ASCII space character value.

  3. wantanjung

    Thread Starter New Member

    May 24, 2009
    Dear hgmjr,

    I feel kinda stupid. They actually wrote that in the manual and i totally missed it. hee.. thanks again.

    However, i found my code to be very lengthy. i've tried modularizing my code by separating the initialization part and the data loading part as they have separate distinct delay timings. Thus, in order to add in an alphabet, i have to add 2 lines, one in order to reserve the space on the LCD and the other line to load the alphabet.

    Thus, this will mean my code will be very long if i wanna write and erase the whole LCD.

    Any tips on modularizing this code? Sorry if i'm asking for something vague.

    I've just learnt how to implement packages only.

    Best Regards