⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scandispled.vhd

📁 many application on kit SP-3: VGA, digital clock, counter, interface PS2....
💻 VHD
📖 第 1 页 / 共 3 页
字号:
										display <= s(13);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(12);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(15)	;											AN(0) <= '0';										end if;	 																end if;											if count2 = 16 then									s(16) <= dispKB1;									if (AN(0)='0') then 											AN(0) <= '1';										display <= s(15);												AN(1) <= '0';									elsif (AN(1)='0') then 											AN(1) <= '1';										display <= s(14);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(13);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(16)	;											AN(0) <= '0';										end if;	 								end if;								if count2 = 17 then									s(17) <= dispKB1;									if (AN(0)='0') then 											AN(0) <= '1';										display <= s(16);												AN(1) <= '0';									elsif (AN(1)='0') then 											AN(1) <= '1';										display <= s(15);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(14);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(17)	;											AN(0) <= '0';										end if;	 								end if;								if count2 = 18 then									s(18) <= dispKB1;									if (AN(0)='0') then 											AN(0) <= '1';										display <= s(17);												AN(1) <= '0';									elsif (AN(1)='0') then 											AN(1) <= '1';										display <= s(16);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(15);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(18)	;											AN(0) <= '0';										end if;									end if;								if count2 = 19 then									s(19) <= dispKB1;									if (AN(0)='0') then 											AN(0) <= '1';										display <= s(18);												AN(1) <= '0';									elsif (AN(1)='0') then 											AN(1) <= '1';										display <= s(17);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(16);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(19)	;											AN(0) <= '0';										end if;	 								end if;								if count2 = 20 then									s(20) <= dispKB1;									if (AN(0)='0') then 											AN(0) <= '1';										display <= s(19);												AN(1) <= '0';									elsif (AN(1)='0') then 											AN(1) <= '1';										display <= s(18);												AN(2) <= '0';										elsif (AN(2)='0') then 											AN(2) <= '1';										display <= s(17);												AN(3) <= '0';										elsif (AN(3)='0') then 												AN(3) <= '1';										display <= s(20)	;											AN(0) <= '0';										end if;	 								end if;							end if;	--CTR1							CTR <= CTR + "0000000000001";							if (CTR > "1000000000000") then   									CTR <= "0000000000000";							end if;								else	-- kiem tra dung la ky tu Enter+cho phep chay ky tu hien thi								for i in 1 to 20 loop								a(i) <= s(i);							end loop;							count2 <= count2 -1;							if count2 = 1 then								for j in 2 to 20 loop									a(j) <= (others =>'1');								end loop;														elsif count2 = 2 then								for j in 3 to 20 loop									a(j) <= (others =>'1');								end loop;															elsif count2 = 3 then								for j in 4 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 4 then												for j in 5 to 20 loop									a(j) <= (others =>'1');								end loop;															elsif count2 = 5 then													for j in 6 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 6 then													for j in 7 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 7 then														for j in 8 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 8 then								for j in 9 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 9 then														for j in 10 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 10 then													for j in 11 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 11 then								for j in 12 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 12 then								for j in 13 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 13 then								for j in 14 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 14 then															for j in 15 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 15 then															for j in 16 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 16 then															for j in 17 to 20 loop									a(j) <= (others =>'1');								end loop;								elsif count2 = 17 then															for j in 18 to 20 loop									a(j) <= (others =>'1');								end loop;									elsif count2 = 18 then															for j in 19 to 20 loop									a(j) <= (others =>'1');								end loop;									elsif count2 = 19 then															a(20) <= (others =>'1');													end if;								if count1 < max1 THEN--thoi gian de chay ky tu								count1 <= count1 + 1;							else																count1 <= 0;							end if;								if (CTR = "0000000000000") then --quet led cho moi lan dich								if count1 < 150000000 then														if(AN(0)='0') then 										AN(0) <= '1';										display <= a(3);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(2);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(1);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(4);             										AN(0) <= '0';									end if;								elsif (count1 > 149999999 and count1 < 200000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(4);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(3);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(2);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(5);             										AN(0) <= '0';									end if;									elsif (count1 > 199999999 and count1 < 250000000) then-- 3									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(5);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(4);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(3);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(6);             										AN(0) <= '0';									end if;									elsif (count1 > 249999999 and count1 < 300000000) then-- 3									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(6);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(5);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(4);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(7);             										AN(0) <= '0';									end if;									elsif (count1 > 299999999 and count1 < 350000000) then-- 3									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(7);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(6);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(5);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(8);             										AN(0) <= '0';									end if;									elsif (count1 > 349999999 and count1 < 400000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(8);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(7);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(6);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(9);             										AN(0) <= '0';									end if;									elsif (count1 > 399999999 and count1 < 450000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(9);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(8);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(7);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(10);             										AN(0) <= '0';									end if;									elsif (count1 > 449999999 and count1 < 500000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(10);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(9);             										AN(2) <= '0';									elsif (AN(2)='0') then 											AN(2) <= '1';											display <= a(8);             											AN(3) <= '0';									elsif (AN(3)='0') then 											AN(3) <= '1';											display <= a(11);             											AN(0) <= '0';									end if;									elsif (count1 > 499999999 and count1 < 550000000) then-- 3									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(11);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(10);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(9);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(12);             										AN(0) <= '0';									end if;																	elsif (count1 > 549999999 and count1 < 600000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(12);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(11);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(10);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(13);             										AN(0) <= '0';									end if;									elsif (count1 > 599999999 and count1 < 650000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(13);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(12);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(11);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(14);             										AN(0) <= '0';									end if;																	elsif (count1 > 649999999 and count1 < 700000000) then									if(AN(0)='0') then 										AN(0) <= '1';										display <= a(14);										AN(1) <= '0';									elsif (AN(1)='0') then 										AN(1) <= '1';										display <= a(13);             										AN(2) <= '0';									elsif (AN(2)='0') then 										AN(2) <= '1';										display <= a(12);             										AN(3) <= '0';									elsif (AN(3)='0') then 										AN(3) <= '1';										display <= a(15);             										AN(0) <= '0';

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -