裸体女模图片

主题 : VGA显示
级别: 新手上路
UID: 12
精华: 0
发帖: 6
威望: 2 点
铜币: 9 枚
贡献值: 0 点
好评度: 0 点
在线时间: 0(时)
注册时间: 2009-06-24
最后登录: 2009-06-30
楼主  发表于: 2009-06-24 14:39

VGA显示

管理提醒: 本帖被 云飞 从 测控前沿 移动到本区(2009-07-05)
             
        纯硬件对VGA推数据让其显示汉字,图片等。
     
       经几天的研究终于用纯纯的硬件语言描写了我的VGA,呵呵,拿来和大家分享哈。。。。。。。
        。。。。。。。。。。。。。。

       注(本人用的是BRG,8色显示,加上hs和vs两路信号总共是五线)
      选的是600*800的分辨率,时序满足Fh=37.88kHz,Fv=60.32Hz


     开发板子信息见(程序上)
----------------------------------------------------------------------------------
-- Company:     武汉中飞扬测控工程有限公司
-- Engineer:       陈永涛
--
-- Create Date:    13:51:13 24/06/2009
-- Design Name:
-- Module Name:    VGA_Module - Behavioral
-- Project Name:  
-- Target Devices:
-- Tool versions:  Cyclone  RCII-CY1C12
-- Description:
--
-- Dependencies:
--
-- Revision: 
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity VGA_Module is
    Port ( clk50_in : in std_logic;
           Red_out : out std_logic;
           Green_out : out std_logic;
           Blue_out : out std_logic;
           hs_out : out std_logic;
           vs_out : out std_logic);
end VGA_Module;
architecture Behavioral of VGA_Module is
  signal Clk25     : std_logic;
  signal Horizontal_Counter : std_logic_vector (9 downto 0);
  signal Vertical_Counter  : std_logic_vector (9 downto 0);
begin
--Generate 25Mhz Clock
process (clk50_in)
begin
 if clk50_in'event and clk50_in='1' then
   if (Clk25 = '0')then
     Clk25 <= '1' after 2 ns;
   else
     Clk25 <= '0' after 2 ns;
  end if;
 end if;
end process;   
process (Clk25)
TYPE Screen_Line1 is ARRAY(0 to 15, 0 to 143) OF std_logic;
 
--CONSTANT char_L1 : Screen_Line1 := (( '0','1','1','1','0','0','0','0','0','0','0','1','0','0','1','0','0','0','0','0','0','1','1','1','0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '1','0','0','0','0','1','0','0','1','0','0','1','0','0','1','0','0','0','0','0','0','1','0','0','1','0','0','1','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '1','0','0','0','0','1','0','1','0','0','0','1','0','0','1','0','0','0','0','0','0','1','0','0','1','0','0','1','0','1','0','0','1','0','0','1','0','0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '0','1','1','0','0','1','1','0','0','0','0','0','1','1','1','0','0','0','0','0','0','1','0','0','1','0','0','1','0','1','0','0','1','0','0','1','0','0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '0','0','0','1','0','1','1','0','0','0','0','0','0','0','1','0','0','0','0','0','0','1','1','1','1','0','0','1','0','1','0','0','1','0','0','1','1','1','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '0','0','0','1','0','1','0','1','0','0','0','0','0','0','1','0','0','0','0','0','0','1','0','0','0','1','0','1','0','1','0','0','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '0','0','0','1','0','1','0','0','1','0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0','1','0','1','0','0','1','1','1','0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'),
--              ( '1','1','1','0','0','1','0','0','0','1','0','1','1','0','0','0','0','0','0','0','0','1','1','1','1','0','0','1','0','0','0','0','0','1','0','0','0','1','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0') );
            

CONSTANT char_L1 : Screen_Line1 :=(
  

('0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',    
'0','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0',    
'0','0','0','0','0','1','1','0','0','0','0','0','1','0','0','0',    
'0','0','0','1','0','0','0','0','0','0','1','0','0','0','0','0',    
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',    
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',    
'0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','0',    
'0','0','0','0','0','0','1','0','0','0','0','0','0','0','0','0',    
'0','1','0','0','0','0','0','0','1','0','0','0','0','0','0','0'),    

('1','1','1','1','1','1','1','1','1','1','0','0','0','0','0','0',     
'0','0','0','1','0','0','1','1','1','1','1','1','1','0','0','0',      
'0','1','1','1','1','0','0','0','1','0','0','0','1','0','0','0',      
'0','0','0','1','0','0','0','0','0','0','1','0','0','0','0','0',      
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',      
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',      
'0','1','1','1','1','0','0','0','0','1','0','0','0','0','0','0',      
'0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0',      
'0','0','1','0','0','0','0','0','1','0','0','0','0','0','0','0'),     
('0','0','0','0','0','0','0','0','0','1','0','0','0','0','0','0',     
'0','0','0','1','0','0','0','0','0','0','0','1','0','0','0','0',        
'0','0','0','0','1','0','0','0','0','1','0','0','1','0','0','0',          
'0','0','0','1','0','0','0','0','0','0','1','0','0','0','0','0',      
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',      
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',      
'0','1','0','0','1','0','1','1','1','1','1','1','1','1','1','0',      
'0','0','0','0','0','0','0','0','1','0','0','0','0','0','0','0',      
'0','0','1','0','0','1','1','1','1','1','1','1','1','1','0','0'),      
('0','0','0','0','0','0','0','0','0','1','0','0','1','0','0','0',                
'1','1','1','1','1','1','0','0','0','0','1','0','0','0','0','0',               
'0','0','0','0','1','0','0','0','0','1','0','0','1','0','0','0',       
'1','1','1','1','1','1','0','1','1','1','1','1','1','1','1','0',         
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',       
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',          
'0','1','0','0','1','0','0','0','1','0','0','0','0','0','0','0',       
'0','0','0','1','1','1','1','1','0','0','0','0','0','0','0','0',                      
'0','0','0','0','0','0','0','0','1','0','0','0','0','0','0','0'),            

('0','0','0','0','0','0','0','0','0','1','0','1','0','0','0','0',
'0','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0',        
'1','1','1','1','1','1','1','0','0','0','0','0','1','0','0','0',        
'0','0','0','1','0','0','0','0','0','0','1','0','0','0','0','0',                
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',            
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',        
'0','1','0','1','0','0','0','1','0','0','0','0','0','0','0','0',        
'0','0','0','0','0','0','0','1','0','0','0','0','1','0','0','0',       
'1','0','0','1','0','1','1','1','1','1','1','1','1','1','0','0'),       

('0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0',       
'0','0','0','1','0','0','0','0','1','0','0','0','0','0','0','0',        
'0','0','0','1','1','0','0','0','1','0','0','0','1','0','0','0',        
'0','0','0','1','0','1','0','0','0','0','1','0','0','0','0','0',        
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',        
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',        
'0','1','1','0','0','0','0','1','0','1','0','0','0','0','0','0',        
'0','0','0','0','0','0','0','1','0','0','0','1','1','0','0','0',        
'0','1','0','1','0','0','0','1','0','0','0','0','0','0','0','0'),       

('0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0',        
'0','0','0','1','0','1','0','1','1','1','1','1','1','1','1','0',         
'0','0','0','1','1','1','0','0','0','1','0','0','1','0','0','0',        
'0','0','0','1','1','0','0','1','1','1','1','1','1','1','0','0',        
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',         
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',         
'0','1','0','1','0','0','1','0','0','1','0','0','0','0','0','0',         
'0','1','1','1','1','1','0','1','1','0','1','0','0','0','0','0',         
'0','1','0','1','1','1','1','1','1','1','1','1','1','1','1','0'),       
('0','0','0','0','0','0','0','0','0','1','0','1','0','0','0','0',       
 '0','0','0','1','1','0','0','0','0','1','0','1','0','0','1','0',        
'0','0','1','0','1','0','1','0','0','1','0','0','1','0','0','0',         
'0','0','1','1','0','0','0','1','0','0','0','0','1','0','0','0',         
'1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','0',         
'1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','0',         
'0','1','0','0','1','0','1','1','1','1','1','1','1','1','0','0',       
'0','0','0','0','0','1','0','1','0','1','0','0','0','0','0','0',         
'0','0','1','0','0','0','1','0','0','0','0','1','0','0','0','0'),        

('0','0','0','0','0','0','0','0','0','1','0','0','1','0','0','0',          
'0','0','1','1','0','0','0','0','1','0','0','1','0','0','1','0',           
'0','0','1','0','1','0','0','0','0','0','0','0','1','1','1','0',          
'1','1','0','1','0','0','0','0','1','0','0','0','1','0','0','0',           
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',           
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',           
'0','1','0','0','1','0','0','0','0','1','0','0','0','0','0','0',          
'0','0','0','0','1','0','0','1','0','0','1','0','0','0','0','0',           
'0','0','1','0','0','0','1','0','0','0','0','1','0','0','0','0'),           
('0','0','0','0','0','0','0','0','0','1','0','0','0','0','0','0',            
'1','1','0','1','0','0','0','0','1','0','0','1','0','0','1','0',            
'0','1','0','0','1','0','0','0','0','1','1','1','1','0','0','0',            
'0','0','0','1','0','0','0','0','1','0','0','1','0','0','0','0',             
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',            
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',            
'0','1','1','0','1','0','0','0','0','1','0','1','0','0','0','0',              
'0','0','0','0','1','0','0','1','0','0','1','0','0','0','0','0',            
'0','0','1','0','0','1','0','1','1','1','1','1','1','1','1','0'),            
('0','0','0','0','0','0','0','0','0','0','1','0','0','0','0','0',           
'0','0','0','1','0','0','0','1','0','0','1','0','0','0','1','0',            
'1','0','0','0','1','0','1','1','1','0','0','0','1','0','0','0',             
'0','0','0','1','0','0','0','0','0','1','1','0','0','0','0','0',             
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',              
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',              
'0','1','0','0','0','0','1','0','0','1','0','0','1','0','0','0',               
'0','0','0','1','0','0','0','1','0','0','0','1','0','0','0','0',             
'1','1','0','0','0','1','0','0','0','0','0','1','0','0','0','0'),              

('0','0','0','0','0','0','0','0','0','0','1','0','0','0','1','0',        
'0','0','0','1','0','1','1','0','0','0','1','0','0','0','1','0',       
'0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0',        
'0','0','0','1','0','0','0','0','0','1','1','0','0','0','0','0',       
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',        
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',         
'0','1','0','0','0','0','1','0','0','1','0','0','0','1','0','0',         
'0','0','0','1','0','0','0','1','0','0','0','0','1','0','0','0',         
'0','1','0','0','1','0','0','0','1','0','0','1','0','0','0','0'),           

('0','0','0','0','0','0','0','0','0','0','0','1','0','0','1','0',          
'0','0','0','1','0','0','0','0','0','1','0','0','0','0','1','0',          
'0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0',          
'0','0','0','1','0','0','0','0','1','0','0','1','0','0','0','0',         
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',        
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',            
'0','1','0','0','0','1','0','0','0','1','0','0','0','1','1','0',          
'0','0','1','0','0','0','0','1','0','0','0','0','0','1','1','0',             
'0','1','0','0','1','0','0','0','0','1','0','0','0','0','0','0'), 

('0','0','0','0','0','0','0','0','0','0','0','0','1','0','1','0',         
'0','0','0','1','0','0','0','0','1','0','0','0','0','0','1','0',          
'0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0',          
'0','0','0','1','0','0','0','1','0','0','0','0','1','1','1','0',          
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',          
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',           
'0','1','0','0','1','0','0','0','0','1','0','0','0','0','1','0',         
'1','1','0','0','0','0','0','1','0','0','0','0','0','0','0','0',           
'0','1','0','0','0','0','0','0','0','0','0','1','0','0','0','0'),         

('0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','0',          
'0','1','0','1','0','0','1','1','0','0','0','1','0','1','0','0',             
'0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0',            
'0','1','0','1','0','1','1','0','0','0','0','0','0','1','0','0',              
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',             
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',             
'0','1','0','0','0','0','0','1','0','1','0','0','0','0','0','0',              
'0','0','0','0','0','1','0','1','0','0','0','0','0','0','0','0', 
'0','1','0','0','0','0','0','0','0','1','0','1','0','0','0','0'),              

('0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0', 
'0','0','1','0','0','0','0','0','0','0','0','0','1','0','0','0', 
'0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0',            
'0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0',              
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',             
'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',             
'0','1','0','0','0','0','0','0','1','0','0','0','0','0','0','0',            
'0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0',            
'0','1','0','0','0','0','0','0','0','0','1','0','0','0','0','0')           

);
variable Line:integer:=0;
variable Pixel:integer:=0;
 begin       --initial the screen
  if Clk25'event and Clk25 = '1' then
   if (Horizontal_Counter >= "0010010000" ) -- 144   why from 144?
   and (Horizontal_Counter < "1100010000" ) -- 784   640+144
   and (Vertical_Counter >= "0000100111" ) -- 39     why from 39?
      and (Vertical_Counter < "1000000111" ) -- 519     480+39
   then
    Red_out <= '1';
    Green_out <= '1';
    Blue_out <='0';
    -----Line 1 
        if (Horizontal_Counter >=  "0110001000" )--440    640/2-24+144 我将其改为(392)
      and (Horizontal_Counter <= "1000011000")-- 488    640/2+24+144 我将其改为(536)
      and (Vertical_Counter >= "0011101000") --232      240-8
      and (Vertical_Counter <= "0011110111") then -- 247  240+8-1
       if(Pixel <= 143) then --Line 1 Lets make our Text WHITE
         Red_out <= char_L1(Line, Pixel);
       Green_out <= char_L1(Line, Pixel);
       Blue_out <= char_L1(Line, Pixel);
       Pixel:= Pixel+1;
       elsif(Pixel >= 144) then  -- All else BLACK
        Red_out <= '1';
      Green_out <= '0';
      Blue_out <= '0';
       end if;
     end if;
     end if;
   if (Horizontal_Counter > "0000000000" )
        and (Horizontal_Counter < "0001100001" ) -- 96+1   generate the hs_out and the vs_out
       then
       hs_out <= '0';
       else
               hs_out <= '1';
      end if;
   if (Vertical_Counter > "0000000000" )
        and (Vertical_Counter < "0000000011" ) -- 2+1
       then
         vs_out <= '0';
       else
         vs_out <= '1';
      end if;
   Horizontal_Counter <= Horizontal_Counter+"0000000001";
      if (Horizontal_Counter="1100100000") then    --800? decide the frequency of Hs 50000000/2/800 = 31.25K Hz
        Vertical_Counter <= Vertical_Counter+"0000000001";
        Horizontal_Counter <= "0000000000";
    Pixel:= 0;
    if (Vertical_Counter >= "0011101000") -- First Line  232
       and (Vertical_Counter <= "0011110111") then     --247 
      if (Line <= 15) then
        Line:= Line+1;
      elsif (Line >= 16) then
        Line:= 0;
      end if;
     end if;
      end if;
      if (Vertical_Counter="1000001001") then  --521?  decide the frequency of Hs 50000000/2/800/521 = 59.98 Hz 
        Vertical_Counter <= "0000000000";
    Line:= 0;
      end if;
    end if;
 end process; 
end Behavioral;



     
        
     
       

    
     

     
       
级别: 新手上路
UID: 4
精华: 0
发帖: 8
威望: 1 点
铜币: 13 枚
贡献值: 0 点
好评度: 0 点
在线时间: 1(时)
注册时间: 2009-06-10
最后登录: 2009-06-24
沙发  发表于: 2009-06-24 14:41

,真长!