VGA problem with timing

Joined
May 3, 2011
Messages
3
Reaction score
0
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
Code:
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,aframe,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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top