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 http://pastebin.com/dtM9P5k1 Here's the LCD Driver http://pastebin.com/YhHtYyBe Here's the UCF File http://pastebin.com/Gr2Vq9wh Thanks beforehand.
Did you simulate your code with e.g. modelsim? Did you have a testbench? Duke
Theres a neat part of code for a testbench Beitrag "Re: Initialisierung LCD-Display" Its German, but maybe Babelfish is able to translate it... ;-) BTW: > http://pastebin.com/dtM9P5k1 You can attach your code directly here in your post...
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 again.
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.