begin
if (CLK'event and CLK='0') then
if (RESET='0') then
count_clk<="0000000000";
SCLK<='1';
SYNC_LOW<='1';
SDIN<='0';
elsif count_clk >= "0000110011" then
count_clk<=count_clk;
else
count_clk<=count_clk+'1';
end if;
if count_clk<"0000000011" then
SYNC_LOW<='1';
else
SYNC_LOW<='0';
end if;
if count_clk<"0000000100" then
SCLK<='1';
SDIN<=DATA(23);
elsif count_clk<"0000000101" then
SCLK<='0';
SDIN<=DATA(23); --翻一下SCLK,载入第二十三位命令
elsif count_clk<"0000000110" then
SCLK<='1';
SDIN<=DATA(22);
elsif count_clk<"0000000111" then
SCLK<='0';
SDIN<=DATA(22); --翻一下SCLK,载入第二十二位命令
。。。。。。。。。。。。中间就是不断重复这个过程,直到第一位
elsif count_clk<"0000110010" then
SCLK<='1';
SDIN<=DATA(0);
elsif count_clk<"0000110011" then
SCLK<='0';
SDIN<=DATA(0); --翻SCLK,载入最后一位命令