Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   VHDL (http://www.velocityreviews.com/forums/f18-vhdl.html)
-   -   VGA problem with timing (http://www.velocityreviews.com/forums/t747685-vga-problem-with-timing.html)

stepi 05-03-2011 04:03 PM

VGA problem with timing
 
HI
I found timing in datasheet and use it, there was some mistake so I repaired it. But when I done and run the program. Monitor showed just blank screen and no information (resolution or no connect). I used 640x480 60Hz (horizontal 96+48+640+16=800pix, vertical 2+33+480+10=525l).
Here is my code. In other part R=G=B=x"3FF" and vga_clk=(clock_50)/2

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity generaterow is
port ( clk: in std_logic;
blank: out std_logic:='0';
hs,vs,sync: out std_logic:='1';
endrow: buffer std_logic );
end generaterow;

architecture mujgeneraterow of generaterow is
signal drawrow:std_logic:='1';
begin
row: process(clk)
variable arow,brow,crow,drow,ukazatelrow,ukazatelframe,afra me,cframe,dframe:integer:=0;
variable bframe:integer:=-1;
variable jakyradek:integer:=0;
begin
if rising_edge(clk) and drawrow='1' then
if ukazatelrow=0 then --back porch ROW
brow:=brow+1;
if brow=44 then
brow:=0;
ukazatelrow:=1;
BLANK<='1';
end if;
elsif ukazatelrow=1 then --displey interval ROW
crow:=crow+1;
if crow=640 then
crow:=0;
ukazatelrow:=2;
BLANK<='0';
end if;
elsif ukazatelrow=2 then --front porch ROW
drow:=drow+1;
if drow=20 then
drow:=0;
ukazatelrow:=3;
--BLANK<='1';
HS<='0';
SYNC<='0';
end if;
elsif ukazatelrow=3 then --synchronizace ROW
arow:=arow+1;
if arow=96 then
arow:=0;
ukazatelrow:=0;
--BLANK<='0';
HS<='1';
SYNC<='1';
jakyradek:=jakyradek+1;
end if;
if jakyradek=480 then
endrow<=not endrow;
jakyradek:=0;
drawrow<='0';
end if;
end if;
elsif rising_edge(clk) and drawrow='0' then
if ukazatelframe=0 then --back porch frame
bframe:=bframe+1;
if bframe=26400 then
bframe:=0;
drawrow<='1';
ukazatelframe:=1;
end if;
elsif ukazatelframe=1 then --front porch frame
dframe:=dframe+1;
if dframe=8000 hen
dframe:=0;
ukazatelframe:=2;
--blank<='1';
sync<='0';
vs<='0';
end if;
elsif ukazatelframe=2 then --synchro frame
aframe:=aframe+1;
if aframe=800 then
aframe:=0;
ukazatelframe:=0;
--blank<='0';
sync<='1';
vs<='1';
end if;
end if;
end if;
end process;

end mujgeneraterow;

Have you got idea why monitor show just blank screen instead of white screen.
Thank you for help, comment or idea.

Martin Stepanek


All times are GMT. The time now is 12:51 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.