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.
1 | process(Clock) begin |
2 | if rising_edge(Clock) then |
3 | case State is |
4 | when Init => |
5 | State <= Print; |
6 | when Print => |
7 | if Busy /= '1' then |
8 | State <= Printb; |
9 | Data <= "00110000"; |
10 | Write_Now <= '1'; |
11 | end if; |
12 | when Printb => |
13 | Write_Now <= '0'; |
14 | State <= Idle; |
15 | when Idle => |
16 | State <= Finish; |
17 | when Finish => |
18 | end case; |
19 | end if; |
20 | 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.