请问如何通过FPGA驱动VGA显示一个圆形 怎样使用FPGA用VGA接口在显示屏上显示一张图片?

作者&投稿:貂沸 (若有异议请与网页底部的电邮联系)
利用圆的方程X^2+Y^2<=z^2.x是行扫描计数值与圆心的差,y是列扫描与圆心的差。这是你要的圆的半径。我给你贴一段程序,我自己写的12个圆环,分了四个象限,比较蠢。不分象限的话要用无符号数。
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity vga_block isport (clk_40mhz:in std_logic; forming:in integer range 0 to 3; coulour:in integer range 0 to 2; h_or_f:in integer range 0 to 1;vga_out:out std_logic_vector(2 downto 0);hs1,vs1:out std_logic);end;architecture behave of vga_block issignal counter_hs:integer range 0 to 1055; --屏幕中行信号 HS 使用范围signal counter_vs:integer range 0 to 627; --屏幕中场信号 VS 使用范围signal hs,vs:std_logic:='1'; --行信号 hs 和场信号 vs 高电平signal rgb1,rgb2,rgb3:std_logic_vector(2 downto 0); --水平和垂直方向上表示 3 基色的中间变量signal coulour1,coulour2: std_logic_vector(2 downto 0);beginprocess(clk_40mhz) --40MHZ 触发在每行上逐点扫描beginif rising_edge(clk_40mhz) then if counter_hs>=1055 then counter_hs<=0;else counter_hs<=counter_hs+1;end if;end if;end process;process(counter_hs) --行消隐beginif counter_hs>=0 and counter_hs<128 thenhs<='0';elsehs<='1';end if;end process;process(hs)beginif falling_edge(hs) then --VGA 中行同步负脉冲有效if counter_vs>=627 thencounter_vs<=0;else counter_vs<=counter_vs+1; --垂直扫描end if;end if;end process;process(counter_vs) --场消隐beginif counter_vs>=0 and counter_vs<=3 thenvs<='0';elsevs<='1';end if;end process;
process(counter_hs,counter_vs)
if (counter_hs >=216 and counter_hs <=616) then if (counter_vs >=27 and counter_vs <=327) then if (((327-counter_vs)**2+(616-counter_hs)**2) <=90000 and ((327-counter_vs)**2+(616-counter_hs)**2) >=75625)or(((327-counter_vs)**2+(616-counter_hs)**2) < 62500 and ((327-counter_vs)**2+(616-counter_hs)**2) >=50625)or(((327-counter_vs)**2+(616-counter_hs)**2) < 40000 and ((327-counter_vs)**2+(616-counter_hs)**2) >=30625)or(((327-counter_vs)**2+(616-counter_hs)**2) < 22500 and ((327-counter_vs)**2+(616-counter_hs)**2) >=15625)or(((327-counter_vs)**2+(616-counter_hs)**2) < 10000 and ((327-counter_vs)**2+(616-counter_hs)**2) >=5625)or(((327-counter_vs)**2+(616-counter_hs)**2) < 2500 and ((327-counter_vs)**2+(616-counter_hs)**2) >=625) then rgb1 <=coulour1; elsif (((327-counter_vs)**2+(616-counter_hs)**2) < 75625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=62500)or(((327-counter_vs)**2+(616-counter_hs)**2) < 50625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=40000)or(((327-counter_vs)**2+(616-counter_hs)**2) < 30625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=22500)or(((327-counter_vs)**2+(616-counter_hs)**2) < 15625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=10000)or(((327-counter_vs)**2+(616-counter_hs)**2) < 5625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=2500)or(((327-counter_vs)**2+(616-counter_hs)**2) < 625 and ((327-counter_vs)**2+(616-counter_hs)**2) >=0) then rgb1 <=coulour2;else rgb1 <="000";end if; elsif (counter_vs >=327 and counter_vs <=627) then if (((counter_vs-327)**2+(616-counter_hs)**2) <=90000 and ((counter_vs-327)**2+(616-counter_hs)**2) >=75625)or(((counter_vs-327)**2+(616-counter_hs)**2) < 62500 and ((counter_vs-327)**2+(616-counter_hs)**2) >=50625)or(((counter_vs-327)**2+(616-counter_hs)**2) < 40000 and ((counter_vs-327)**2+(616-counter_hs)**2) >=30625)or(((counter_vs-327)**2+(616-counter_hs)**2) < 22500 and ((counter_vs-327)**2+(616-counter_hs)**2) >=15625)or(((counter_vs-327)**2+(616-counter_hs)**2) < 10000 and ((counter_vs-327)**2+(616-counter_hs)**2) >=5625)or(((counter_vs-327)**2+(616-counter_hs)**2) < 2500 and ((counter_vs-327)**2+(616-counter_hs)**2) >=625) then rgb1 <=coulour1; elsif (((counter_vs-327)**2+(616-counter_hs)**2) < 75625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=62500)or(((counter_vs-327)**2+(616-counter_hs)**2) < 50625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=40000)or(((counter_vs-327)**2+(616-counter_hs)**2) < 30625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=22500)or(((counter_vs-327)**2+(616-counter_hs)**2) < 15625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=10000)or(((counter_vs-327)**2+(616-counter_hs)**2) < 5625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=2500)or(((counter_vs-327)**2+(616-counter_hs)**2) < 625 and ((counter_vs-327)**2+(616-counter_hs)**2) >=0) then rgb1 <=coulour2;else rgb1 <="000";end if; end if; elsif (counter_hs >=616 and counter_hs <=1016) then if (counter_vs >=27 and counter_vs <=327) then if (((327-counter_vs)**2+(counter_hs-616)**2) <=90000 and ((327-counter_vs)**2+(counter_hs-616)**2) >=75625)or(((327-counter_vs)**2+(counter_hs-616)**2) < 62500 and ((327-counter_vs)**2+(counter_hs-616)**2) >=50625)or(((327-counter_vs)**2+(counter_hs-616)**2) < 40000 and ((327-counter_vs)**2+(counter_hs-616)**2) >=30625)or(((327-counter_vs)**2+(counter_hs-616)**2) < 22500 and ((327-counter_vs)**2+(counter_hs-616)**2) >=15625)or(((327-counter_vs)**2+(counter_hs-616)**2) < 10000 and ((327-counter_vs)**2+(counter_hs-616)**2) >=5625)or(((327-counter_vs)**2+(counter_hs-616)**2) < 2500 and ((327-counter_vs)**2+(counter_hs-616)**2) >=625) then rgb1 <=coulour1; elsif (((327-counter_vs)**2+(counter_hs-616)**2) < 75625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=62500)or(((327-counter_vs)**2+(counter_hs-616)**2) < 50625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=40000)or(((327-counter_vs)**2+(counter_hs-616)**2) < 30625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=22500)or(((327-counter_vs)**2+(counter_hs-616)**2) < 15625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=10000)or(((327-counter_vs)**2+(counter_hs-616)**2) < 5625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=2500)or(((327-counter_vs)**2+(counter_hs-616)**2) < 625 and ((327-counter_vs)**2+(counter_hs-616)**2) >=0) then rgb1 <=coulour2;else rgb1 <="000";end if; elsif (counter_vs >=327 and counter_vs <=627) then if (((counter_vs-327)**2+(counter_hs-616)**2) <=90000 and ((counter_vs-327)**2+(counter_hs-616)**2) >=75625)or(((counter_vs-327)**2+(counter_hs-616)**2) < 62500 and ((counter_vs-327)**2+(counter_hs-616)**2) >=50625)or(((counter_vs-327)**2+(counter_hs-616)**2) < 40000 and ((counter_vs-327)**2+(counter_hs-616)**2) >=30625)or(((counter_vs-327)**2+(counter_hs-616)**2) < 22500 and ((counter_vs-327)**2+(counter_hs-616)**2) >=15625)or(((counter_vs-327)**2+(counter_hs-616)**2) < 10000 and ((counter_vs-327)**2+(counter_hs-616)**2) >=5625)or(((counter_vs-327)**2+(counter_hs-616)**2) < 2500 and ((counter_vs-327)**2+(counter_hs-616)**2) >=625) then rgb1 <=coulour1; elsif (((counter_vs-327)**2+(counter_hs-616)**2) < 75625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=62500)or(((counter_vs-327)**2+(counter_hs-616)**2) < 50625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=40000)or(((counter_vs-327)**2+(counter_hs-616)**2) < 30625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=22500)or(((counter_vs-327)**2+(counter_hs-616)**2) < 15625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=10000)or(((counter_vs-327)**2+(counter_hs-616)**2) < 5625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=2500)or(((counter_vs-327)**2+(counter_hs-616)**2) < 625 and ((counter_vs-327)**2+(counter_hs-616)**2) >=0) then rgb1 <=coulour2;else rgb1 <="000";end if; end if; end if;--圆环
hs1 <= hs;vs1 <= vs;Vga_out<=rgb1 end process;end;

VGA显示器是模拟的三基色输入,所以用FPGA驱动的话,首先要三个D/A转换器,当然如果只是显示一个圆形,FPGA用I/O口外搞几个电阻也是可以实现显示一个只有几种颜色的圆形。不知道你的具体要求,如果有实验箱什么的,一般上面应该有D/A转换器,而且有VGA接口,只要正确驱动就可以了。那你再具体描述一下你的要求?

FPGA如何驱动笔记本的VGA接口,使笔记本显示器能看到自己用FPGA写的程序的现象.~

你玩过简单的单片机吗?
如果是,那就很清楚了。单片机的仿真机,就是由电脑经过下载线下载程序到仿真机上。
而仿真机就能按照你设定的程序的顺序RUN。。
同样的,这种方法,一样适用到任何开发板上的。

所以说,8951,AVR,PIC,CPLD/FPGA,DSP,ARM,MIPS,PPC,只要是开发板,就都是一样的方法。

不对,你的方法不是这样的??我刚没看明白。
你是要把开发板的VGA接口,连接到笔记本的“VGA输出接口”??
然后,在笔记本本身的液晶显示器上,看到自己用FPGA写的程序的现象??
是不是这样??
这样是不对的,笔记本的“VGA接口”是输出型态的。
开发板的VGA接口,是要连接到另一台VGA显示器的“输入接口”。。

首先需要一个缓存,然后将图片存到缓存中,用FPGA不断调用缓存中的数据

请问如何通过FPGA驱动VGA显示一个圆形
答:VGA显示器是模拟的三基色输入,所以用FPGA驱动的话,首先要三个D/A转换器,当然如果只是显示一个圆形,FPGA用I/O口外搞几个电阻也是可以实现显示一个只有几种颜色的圆形。不知道你的具体要求,如果有实验箱什么的,一般上面应该有D/A转换器,而且有VGA接口,只要正确驱动就可以了。那你再具体描述一下你的要求? 已赞...

...笔记本的VGA接口,使笔记本显示器能看到自己用FPGA写的程序的现象...
答:开发板的VGA接口,是要连接到另一台VGA显示器的“输入接口”。。

怎样用基于FPGA的VGA显示一个球?
答:if((bcntX_buf>=ballX and (bcntX_buf<=ballX+80) and (bcntY_buf>=ballY) and (bcntY_buf<=ballY+80)) then ballflag_buf<='1';else ballflag_buf<='0';end if;if(ballflag_buf='1') then inDisplay<='1';else inDisplay<='0';bcntX,bcntY为当前扫描坐标,ballX,ballY为...

如何基于FPGA进行VGA设计
答:利用现场可编程逻辑器件FPGA产生VGA时序信号和彩条图像信号,并将其作为信号源,应用于彩色等离子显示器的电路开发,方便彩色等离子显示器驱动控制电路的调试。FPGA芯片具有可靠性高、编程灵活、体积小等优点,实验经 过 软硬件调试,最终在显示器上显示彩条正确图像。利用此原理,可以设计更多的彩色图像,且可将...

...最近FPGA刚入门,因为听说硬件工程师除了掌握FPGA和DSP。
答:1.用PFGA控制VGA显示器,大多数开发板上自带的例子都是显示16色VGA显示器的,你可以做一个32位真彩色的制作,这个用来体现FPGA速度快再合适不过了。2.涉及信号处理的,中等级别的FPGA开发应该算视频采集了吧,买个摄像头,不要那种USB借口的,纯信号线控制的那种,随便采集个图像,拍照显示到屏幕上,存...

基于FPGA的VGA图片显示
答:看你的板子 VGA 没有加DAC芯片,所以也就是只能显示8种颜色的图片,这样的图片数据需要转换,你可以先用一种颜色试试。你板卡没有能存图片的器件,比如flash,而你有不想用SD卡,那么可以给你建议,将图片写在片内rom里面,然后读出来,虽然有点费资源,但是方案可行的。

各位大家好,我在fpga上用verilog实现vga字符显示,将字符的十六进制存放...
答:显示汉字呢,还是英文字符呢,VGA显示重点是字符库的存储,你需要首先把字符库做好,然后每次从ram中读取一个数据之后,去查找一下字符库,查找完之后,送到VGA控制时序进行显示就可以,字符做成多大的也是有讲究的,如果你做成小的话,显示的东西就比较小了,计算机为什么能显示,也是这个原理。

摄像机的数据通过FPGA,显示到显示器上是什么流程?
答:。FPGA要做的就是,配置CCD,配置AD,然后把AD上输出的数据接收,然后处理,最后按VGA方式输出。其中的各种时序问题都是需要好好钻研手册。至于是用的CMOS相机比如OV系列的,那个就可以看手册配置就可以了。因为相机直接输出数字信号。与前面同理FPGA要做的只是配置、缓存数据、转码、输出。

怎样用verilog编写fpga的vga显示
答:html 在设计时,先设计一个底层模块,输入是上层模块提供的屏幕上当前点的RGB值,输出是向VGA接口输出符合VGA时序的RGB、HS、VS信号,并将当前扫描的点的值输出给上层模块。再设计上层模块,利用点阵或坐标绘图即可。上层模块收到底层模块的当前坐标,算出RGB传给底层模块。让底层模块负责显示就好了。

毕业设计 基于FPGA的图形控制器的设计
答:利用可编程器件CPLD/FPGA实现VGA彩色显示控制器在工业现场中有许多实际应用。以硬件描述语言VHDL对可编程器件进行功能模块设计、仿真综合,可实现VGA显示控制器显示各种图形、图像、文字,并实现了动画效果。 VGA 接口及设计参数 VGA接口是与显示器进行通信的唯一接口。通过CPLD/FPGA器件对RGB信号、行同步信号、场同步信号...