Forum: FPGA, VHDL & Verilog Need Help, Need Help LCD in Spartan 3AN using VHDL

Author: M Iqbal (Guest)
Posted on:

Rate this post
0 useful
not useful
I need help regarding using LCD on Spartan 3AN. I made a LCD Driver 
following the manual, but it still didn't work. I would feel grateful if 
somebody can point out the wrong in my code.

Here's the code for the entity


Here's the LCD Driver


Here's the UCF File


Thanks beforehand.

Author: Duke Scarring (Guest)
Posted on:

Rate this post
0 useful
not useful
Did you simulate your code with e.g. modelsim? Did you have a testbench?


Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Theres a neat part of code for a testbench
Beitrag "Re: Initialisierung LCD-Display"
Its German, but maybe Babelfish is able to translate it... ;-)

> http://pastebin.com/dtM9P5k1
You can attach your code directly here in your post...

Author: M Iqbal (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Thank you all for your responses. I have updated my LCD Driver Code, now 
it can initialized (there's a blinking cursor on the display). But I 
can't seem to write any data into it.
process(Clock) begin
    if rising_edge(Clock) then
      case State is
        when Init =>
          State <= Print;
        when Print =>
          if Busy /= '1' then
            State <= Printb;
            Data <= "00110000";
            Write_Now <= '1';
          end if;
        when Printb =>
          Write_Now <= '0';
          State <= Idle;
        when Idle =>
          State <= Finish;
        when Finish =>
      end case;
    end if;
  end process;

I just want to write a simple '0', but the display didn't change. Thanks 

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 useful
not useful
To keep things short:
You MUST verify your code with a testbench. And at least have a close 
look at the waveforms on the simulator, and check out wether the timing 
fits the LCD or not...

And in your case this is the most easy thing to do:
just generate a clock and apply it to the LCD module.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.