程序思路很简单,就是利用50MHz的外部时钟输入,经过2次分频得到1秒的精确定时,给LED取反。 LIBRARY IEEE; USE
IEEE.STD_LOGIC_1164.ALL; --USE IEEE.STD_LOGIC_ARITH.ALL; --USE
IEEE.STD_LOGIC_UNSIGNED.ALL; entity led is
port(led1,led2,led3,led4:out bit;clk:in bit); end led;
architecture led_blink of led is begin
process(clk) variable s1:integer:=0;
variable s2:integer:=0; begin
i1:if (clk'event and clk='1')
then ...
阅读全文>>