Hallo Leute :),
ich möchte ein 16x2 LCD steuern. Im Brochure steht, dass das LCD
einzuschalten, muss man ein Paar Periode Warten.
http://www.xilinx.com/support/documentation/boards_and_kits/ug334.pdf
Auf Seite 54, sieht man, dass es 15 ms, 4.1 ms, ... gewarten muss.
Kann man das automatisch mit VHDL schreiben unabängig von Takt frequenz,
um alles automatisch zu kriegen, wenn den Oscillator geändert ist? ich
erwarte etwas wie das folgende:
1 | architecture of temp is
|
2 | CONSTANT taktFreq : INTEGER := 50000000; --for 50 MHz clock. This can only be changed when clock is changed, so that all time constraints are proportional to this value
|
3 | SIGNAL state : INTEGER range 1 to 10; --state machine
|
4 | SIGNAL wait_counter : INTEGER := 0;
|
5 | begin
|
6 | process(clk)
|
7 | if(rising_edge(clk))
|
8 | begin
|
9 | case state is
|
10 | when 0 =>
|
11 | if(wait_counter = taktFreq*15*10**-3) --wait 15 ms
|
12 | state <= state + 1;
|
13 | else
|
14 | wait_counter <= wait_counter + 1;
|
15 | end if;
|
16 | when 1 =>
|
17 | ...
|
18 | end case;
|
19 | end if;
|
20 | end process;
|
21 | begin
|
22 | end architecture temp;
|
So habe ich es nicht geschafft, und habe immer probleme mit Synthesis
bekommen. Es muss nicht sein wie ich es geschrieben habe, aber wie kann
man das "Professionally" tun? :)
Vielen Dank