完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
0_5hz library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity fenpin is port(clk: in std_logic;clk0_5Hz:out std_logic); end fenpin; architecture segled of fenpin is begin p1:process(clk) variable count:integer range 0 to 6249999; begin if clk'event and clk='1' then if count<=3124999 then clk0_5Hz<='0'; count:=count+1; elsif count>3124999 and count<=6249999 then clk0_5Hz<='1'; count:=count+1; else count:=0; end if; end if; end process p1; END ARCHITECTURE SEGLED; 1hz分频计程序 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity fenpin1 is port(clk: in std_logic;clk1Hz:out std_logic); end fenpin1; architecture segled of fenpin1 is begin p1:process(clk) variable count:integer range 0 to 49999999; begin if clk'event and clk='1' then if count<=24999999 then clk1Hz<='0'; count:=count+1; elsif count>24999999 and count<=49999999 then clk1Hz<='1'; count:=count+1; else count:=0; end if; end if; end process p1; END ARCHITECTURE SEGLED; |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 16:25 , Processed in 0.978696 second(s), Total 78, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号