wugenyu 发表于 2010-8-5 16:18:38

为什么第一帧扫描玩以后,以后的帧就不从头开始了

请问一下,为什么第一帧扫描玩以后,以后的帧就不从头开始了,谢谢?

wugenyu 发表于 2010-8-5 16:20:55

LIBRARY ieee;
USE ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity sram is
   port(CLK   :instd_logic;
          RST   :instd_logic;
          HS    :OUTstd_logic;
          VS    :OUTstd_logic;
          STVL:buffer std_logic;
          CKV   :out std_logic;
          OEV   :out std_logic;
          VCOM:buffer std_logic;
          OEH   :out std_logic;
          STHL:out std_logic;
          CPH1:bufferstd_logic;
      CPH2:bufferstd_logic;
      CPH3 :bufferstd_logic;
      model:out std_logic
          );
          end entity;
architecture dd of sram is
          signal counter,column,senddata:std_logic_vector(11 downto 0) ;
               begin   
                  
                   process(CLK)
                   begin
   if CLK'event and CLK='1' AND RST='1' then
      counter<=counter+1;
      if counter>=0 and counter<20 then
       OEV<='0';
       STHL<='0';
       OEH<='1';
       STVL<='0';
elsif counter>=1500 then
       counter<="000000000000";
       end if;
   if rst='0' then
       OEV<='0';
       STHL<='0';
       OEH<='1';
       STVL<='0';
       VCOM<='0';
       counter<="000000000000";
       end if;      
   if counter=50 then
    column<=column+1;
      end if;
         if column>234 then
          column<=(others=>'0');
      end if;
ifcounter=235 THEN
         VCOM<=NOT VCOM;
         
            end if;



if counter=133 and   (column>0 and column<=234) then
            VS<='1';
   elsif counter=133 and column=0 then
            VS<='0';
            end if;
if counter>=423 and counter<=1424 then
            HS<='1';
            else
         HS<='0';
            end if;         
if counter>=0 and counter<50 then
            OEV<='0';
            elsif counter>=50 and counter<185 then
            OEV<='1';
            elsif counter>=185 and counter<216 then
            OEV<='0';
            OEH<='0';
            elsif counter>=216 or counter<50 then
             OEV<='0';
             OEH<='1';
            end if;
             if counter>=423 and counter<429 then
                      STHL<='1';
            elsif counter>429 or counter<423 then
                      STHL<='0';
               end if;
            if(counter>=133 and counter<1480)and column=1 then
                STVL<='1';
                else
                   STVL<='0';
               end if;
               if counter>=144 and counter<249then
               CKV<='1';
               elsif counter>=249 or counter<144 then
                  CKV<='0';
                  end if;
                  if (counter>=425 and counter<1425)then
                     CPH1<=NOT CPH1;
                   end if;
if(counter>=0 and counter<=1500)then
                     CPH2<='0';
                     CPH3<='0';
                     model<='1';
                     end if;
               
                end if;
               end process;         
               end dd;

wugenyu 发表于 2010-8-5 16:23:53

刚上电,有显示,但过了一会之后,就没了。为什么?

zgq800712 发表于 2010-8-14 14:18:12

朋友你也做模拟屏吗?请加我QQ
QQ:147479023
e妹儿 seedfpga@163.com


刷屏也重复不断的刷的
页: [1]
查看完整版本: 为什么第一帧扫描玩以后,以后的帧就不从头开始了