發表文章

題目:多位元計數器設計VHDL20240601_Counter8Bits

圖片
  https://youtu.be/OyL_oZnofgQ 題目:多位元計數器設計 設計一個 8 位元二進制計數器,具有以下功能: 當 reset 為高電位時,計數器重置為 0。 當 enable 為高電位時,計數器每個時鐘周期遞增 1。 當計數器到達 255 時,溢出並重新開始從 0 計數。 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std.all; entity VHDL20240601_Counter8Bits is port( clk_4M:in std_logic; reset:in std_logic; enable:in std_logic; BCD:buffer std_logic_vector(7 downto 0):="00000000"); end VHDL20240601_Counter8Bits; architecture aa of VHDL20240601_Counter8Bits is signal cnt1:integer range 0 to 1999999:=0; signal clk_sec:std_logic:='0'; begin process(clk_4M) begin if rising_edge(clk_4M) then cnt1<=cnt1+1; if cnt1=199999 then cnt1<=0; clk_sec<=not clk_sec; end if; end if; end process; process(reset, enable, clk_sec) begin if reset='0' then BCD<="00000000"; elsif rising_edge(clk_sec) then if enable='0' then BCD<=BCD+1; end if; en...

簡單的交通信號燈控制系統VHDL20240601_TrafficLightController

圖片
  https://youtube.com/shorts/5IS8Gvxwax4 題目:簡單的交通信號燈控制系統 說明: 設計一個簡單的交通信號燈控制系統,該系統有三個狀態:綠燈、黃燈和紅燈。信號燈按照固定時間順序切換:綠燈 -> 黃燈 -> 紅燈 -> 綠燈。 要求: 使用有限狀態機 (FSM) 設計交通信號燈控制邏輯。 每個燈的持續時間為: 綠燈:10 秒 黃燈:2 秒 紅燈:8 秒 輸出信號: green : 綠燈信號 (1 為亮,0 為滅) yellow : 黃燈信號 (1 為亮,0 為滅) red : 紅燈信號 (1 為亮,0 為滅) library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity VHDL20240601_TrafficLightController is port( clk_4M:in std_logic; reset:in std_logic; seg7_out:out std_logic_vector(6 downto 0); seg7_scan:out std_logic_vector(3 downto 0):="1110"; LED_GYB:out std_logic_vector(2 downto 0):="100"; seg7_sec:out std_logic); end VHDL20240601_TrafficLightController; architecture aa of VHDL20240601_TrafficLightController is signal cnt1:integer range 0 to 1999999:=0; signal clk_sec:std_logic:='0'; type state_type is(green, yellow, red); signal state:state_type:=green; signal cnt2:integer range 0 to 11:=0; begin proces...

VHDL20240527_counter_fsm 有限狀態計數器

圖片
https://youtube.com/shorts/xX-JP7SjK-I?si=XezkWrq6dcKhDNTT  library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std.all; entity VHDL20240527_counter_fsm is port( clk_4M:in std_logic; reset:in std_logic; start:in std_logic; seg7_scan:out std_logic_vector(3 downto 0):="1110"; state_BCD:out std_logic_vector(2 downto 0):="000"; seg7_out:out std_logic_vector(6 downto 0)); end VHDL20240527_counter_fsm; architecture aa of VHDL20240527_counter_fsm is signal cnt1:integer range 0 to 1999:=0; signal cnt2:integer range 0 to 1999:=0; signal clk_2k:std_logic:='0'; signal clk_sec:std_logic:='0'; type state_type is (IDLE, COUNTING, DONE); signal state:state_type:=IDLE; signal counter:std_logic_vector(3 downto 0):="0000"; begin process(clk_4M) begin if rising_edge(clk_4M) then cnt1<=cnt1+1; if cnt1=1999 then cnt1<=0; clk_2k<=not...

數位電子乙級第1題腳位E顯示M 20240522

數位電子乙級第1題腳位E顯示M 20240522 https://youtu.be/qaVNEgb1fi0 打chrome 搜尋測試參考資料 進入勞動部網站gov.tw 搜尋數位電子 下載術科題本PDF 位置放桌面(老師是SD卡),學號(老師是class1110XX),建立新資料夾DE1_20240522 進入DE1_20240522資料夾 儲存PDF檔 下載library及燒錄檔 位置就預設(剛剛的位置) 進入剛剛的資料夾 對著7z按右鍵解壓縮至此 再對著kicad_library(2).zip按右鍵解壓縮至此 再對著燒錄檔.7z按右鍵解壓縮至此 打開題本117002B11.pdf 腳位E 顯示M 術科測試編號後3碼(學號後3碼) 試題編號1 舉例,廖東濬學號111033 廖東濬顯示033.1 汪軒承就是014.1 張泳儕就是015.1 林威廷就是004.1 劉華恩就是008.1 陳禹全就是003.1 老師就是0XX.1 kicad資料夾是崗位號碼(座號)_LAYOUT 假設老師的座號78 老師的資料夾就要設 78_LAYOUT 78_CPLD 四位數顯示裝置 腳位E 顯示M 老師要顯示0XX.1 打開kicad 關掉舊專案 file, close project 建立新專案 file, new project 專案的位置 桌面(老師是SD卡),學號(老師是class1110XX),DE1_20240522,78_LAYOUT 檔名DE1_20240522 save kicad_library 進入kicad_library New_Library.kicad_sym檔案改成New_Library20240522.kicad_sym New_Library.pretty資料夾改成 New_Library20240522.pretty 回到kicad symbol editor(元件編輯器) 新增資料庫 file, add library global ok 位置 桌面(老師是SD卡),學號(老師是class1110XX),DE1_20240522,kicad_library New_Library20240522.kicad_sym 就會得到資料庫匯入 資料庫置頂 改資料庫內的元件 3x4keypad 第二題,暫時不用 4_digits_7seg_cc 要改腳位 ...

VHDL20240517_keyshow_a

 VHDL20240517_keyshow_a 感謝亞東電子系 https://youtube.com/shorts/BHhfNuC_SLg?si=OPEHQ5l7O17x3C_M num c2 c1 c0 r3 r2 r1 r0 g f e d c b a 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 2 1 0 1 0 1 1 1 0 1 0 0 1 0 0 3 1 1 0 0 1 1 1 0 1 1 0 0 0 0 4 0 1 1 1 0 1 1 0 0 1 1 0 0 1 5 1 0 1 1 0 1 1 0 0 1 0 0 1 0 6 1 1 0 1 0 1 1 0 0 0 0 0 1 0 7 0 1 1 1 1 0 1 1 1 1 1 0 0 0 8 1 0 1 1 1 0 1 0 0 0 0 0 0 0 9 1 1 0 1 1 0 1 0 0 1 1 0 0 0 s 0 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 下[ t 1 1 0 1 1 1 0 0 1 1 0 0 1 1 下] 8 c0 c2 9 c1 c1 11 c2 c0 12 r0 r3 14 r1 r2 16 r2 r1 18 r3 ...

VHDL20240517_seg7_ooxx_AEEE

圖片
 VHDL20240517_seg7_ooxx_AEEE show OOXX on AEEE board 謝謝亞東電子系 腳位 37 a 33 b 27 c 29 d 28 e 34 f 8 g 31 dp 9 d1 v3 千 11 d2 v2 百 12 d3 v1 十 14 d4 v0 個 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity VHDL20240517_seg7_ooxx_AEEE is port( clk_4M:in std_logic; seg7_high:out std_logic_vector(7 downto 0); seg7_scan:out std_logic_vector(3 downto 0)); end VHDL20240517_seg7_ooxx_AEEE; architecture aa of VHDL20240517_seg7_ooxx_AEEE is signal cnt1:integer range 0 to 1999:=0; signal clk_2k:std_logic:='0'; signal cnt2:std_logic_vector(1 downto 0); signal seg7_v3:std_logic_vector(7 downto 0):="00111111";--O signal seg7_v2:std_logic_vector(7 downto 0):="00111111";--O signal seg7_v1:std_logic_vector(7 downto 0):="01110110";--X signal seg7_v0:std_logic_vector(7 downto 0):="01110110";--X begin process(clk_4M) ...

VHDL20240517_seg7_OOXX

圖片
  library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity VHDL20240517_seg7_ooxx is port( clk_4M:in std_logic; seg7_sec_low:out std_logic:='1'; seg7_v3v2v1v0_low:out std_logic_vector(3 downto 0); seg7_gfedcba_low:out std_logic_vector(6 downto 0)); end VHDL20240517_seg7_ooxx; architecture aa of VHDL20240517_seg7_ooxx is signal cnt_1:integer range 0 to 1999:=0; signal cnt_2:std_logic_vector(1 downto 0):="00"; signal clk_2k:std_logic:='0'; signal seg7_gfedcba:std_logic_vector(6 downto 0); signal seg7_v3_gfedcba:std_logic_vector(6 downto 0):="0111111";--O signal seg7_v2_gfedcba:std_logic_vector(6 downto 0):="0111111";--O signal seg7_v1_gfedcba:std_logic_vector(6 downto 0):="1110110";--X signal seg7_v0_gfedcba:std_logic_vector(6 downto 0):="1110110";--X signal seg7_v3v2v1v0:std_logic_vector(3 downto 0); begin process(clk_4M) begin if ris...

數位電子乙級第2題 CPLD_20240410_DE2

圖片
  -------------------------------------- 數位電子乙級 CPLD_20240410_DE2 part1 https://youtu.be/dEnK3tYH0e8 數位電子乙級第2題 桌面(老師SD卡),學號(老師class1110XX) 建立今天專案的資料,名稱 CPLD_20240410_DE2 裡面要有數位電子題本 打開chrome,輸入測試參考資料,會找到勞動部網站 搜尋數位電子,按查尋 下載數位電子術科,放在 桌面(老師SD卡),學號(老師class1110XX),CPLD_20240410_DE2 老師先前已經把kicad畫好轉輸出PDF已在LINE的班群上 蔡明耀_0 蔡明耀_1 蔡明耀_2 請下載放入 桌面(老師SD卡),學號(老師class1110XX),CPLD_20240410_DE2 勞動部網站術科library的壓縮檔也要放進去 在資料夾內解壓縮數次,全部解壓縮完 老師要檢查 桌面,學號資料夾,裡要有 1.數位電子乙級術科PDF題本 2.數位電子乙級術科library壓縮檔且全數解壓縮完成 3.kicad 蔡明耀_0.pdf 蔡明耀_1.pdf 蔡明耀_2.pdf -------------------------------------- -------------------------------------- 數位電子乙級 CPLD_20240410_DE2 part2 https://youtu.be/XQdKInMXo5c 打開數位電子乙級題本pdf 假設抽題 子板指定接腳A 七段顯示器顯示內容J 當按*,要亮d, e, g 當按#,要亮c, d, g 打開quartus getting started 關掉 建立新專案 file, new project wizard next 位置 桌面(老師SD卡),學號(老師class1110XX),CPLD_20240410_DE2 open 專案名稱 CPLD_20240410_DE2 next next family MAX3000A EPM3064ALC44-10 next next finish 專案建立完成 建立邏輯電路規劃 file, new Block Diagram/Schematic file ok 另存新檔 file, ...

112-2重補修說明20240227

 112-2重補修說明20240227 https://youtu.be/UEH7qGvSqGE 資二甲的課程地圖 歷年成績單 畢業條件 160學分 部定必修85%=110 資訊科專業修80過60 實習45 專題及格 沒有第三支大過 <註冊組>重補修公告如下檔,請協助公告班級學生,感謝~ 重補修相關重要時程: 一學生線上選課日期:113/2/27二 - 113/3/1五 二繳費日期:113/3/7四 - 113/3/8五 三重補修修課日期:113/3/18一 ~ 113/4/17三 ※教師登錄成績:113/4/1一 - 113/4/19五 ※學生查詢成績:113/4/26五 重補修→南強網頁→學生專區→數位校園服務 輸入帳密登入 07重修自學 重修學生線上選課 選科目,右邊點加選 列印重修自學報名單pdf 列存pdf 傳line給導師備存。 重補修申請教學完畢。

數位電子乙級112第2題 20240221

圖片
 數位電子乙級112第2題 20240221 part1 https://youtu.be/PEvWJp35hEY kicad_20240221_DE2 part1 鍵盤掃瞄裝置 打開chrome 測試參考資料 進入勞動部網站 搜尋數位電子 乙級術科 下載 桌面(老師SD卡),學號(老師class1110XX) 建立資料夾kicad_20240221_DE2 把術科題本PDF下載至此 術科(Library及燒錄檔)下載 位置預設(因為剛剛位置設定過了) save 進入kicad_20240221_DE2資料夾 解壓縮 library 燒錄檔 在117002B12.7z上面按右鍵,解壓縮至此(winrar) 得到兩個壓縮檔,kicad_library.zip, 燒錄檔.7z 再解壓縮兩者,解壓縮至此 進入kicad_library資料夾 改檔名 New_Library.kicad_sym改成New_Library20240221.kicad_sym 改資料夾名稱 資料夾New_Library.pretty改成New_Library20240221.pretty 老師檢查 1.桌面,有你的學號的資料夾 2.題本PDF在正確的位置 3.library解壓縮在正確的位置 4.測試燒錄檔在正確的位置 -------------------------------------- 數位電子乙級112第2題 20240221 part2 https://youtu.be/aZY637HIcl8 打開題本PDF 假設 子板指定接腳A P4,P5,P6,P8,P9 P24,P25,P26,P27,P28 七段顯示器顯示內容J 當按下米字鍵,亮d, e, g 按下井字鍵,亮c, d, g 題本PDF P26 使用kicad繪製 鍵盤輸入顯示裝置 參考電路圖 打開kicad 因為有舊專案,所以關舊專案 file, close project 開新專案 file, new project 位置,桌面(老師SD卡),學號(老師class1110XX),kicad_20240221_DE2 檔名kicad_20240221_DE2 save 老師檢查 1.專案位置 2.專案名稱 ------------------------------------- 數位電子乙級112第2題 2024...