VGA problem with timing

Discussion in 'VHDL' started by stepi, May 3, 2011.

  1. stepi

    stepi

    Joined:
    May 3, 2011
    Messages:
    3
    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
    stepi, May 3, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. EyeOfRa

    VGA

    EyeOfRa, Jan 14, 2004, in forum: VHDL
    Replies:
    1
    Views:
    963
    kermit6306
    Jan 15, 2004
  2. Sander Odekerken

    VGA Controller

    Sander Odekerken, Apr 6, 2004, in forum: VHDL
    Replies:
    2
    Views:
    10,017
    Randy Thelen
    Apr 7, 2004
  3. andrea90

    Vhdl Vga Controller Problem

    andrea90, Jul 15, 2010, in forum: VHDL
    Replies:
    3
    Views:
    1,982
    joris
    Jul 16, 2010
  4. stepi

    VGA problem with timing

    stepi, May 3, 2011, in forum: VHDL
    Replies:
    0
    Views:
    708
    stepi
    May 3, 2011
  5. stepi

    VGA problem with timing

    stepi, May 3, 2011, in forum: VHDL
    Replies:
    0
    Views:
    820
    stepi
    May 3, 2011
Loading...

Share This Page