看板 C_and_CPP 關於我們 聯絡資訊
來個VHDL版... 正好在學XD library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_unsigned.all; entity 體重轉換 is port( input : in STD_LOGIC_VECTOR(7 downto 0); output : out STD_LOGIC_VECTOR(7 downto 0); --輸出公斤 output2 : out STD_LOGIC_VECTOR(7 downto 0) --輸出磅 ); end 體重轉換; architecture a of 體重轉換 is signal count:INTEGER; signal div:INTEGER; begin output <= input; --此為公斤輸出; output2 <= input + input; END a; ================寫的很爛 不保證能用 且磅的數據不準卻 請見諒... =============== 我是新手 我知道我寫很爛 囧 -- ╭─────────────────────╮ │ Mics ♂ 的名片         ㊣│ │                     │ │ 無內容 請不要再看了 謝謝 XD    │ │                    ㊣│ ╰─────────────────────╯ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.46.244 ※ 編輯: mics 來自: 220.134.46.244 (10/15 00:06) ※ 編輯: mics 來自: 220.134.46.244 (10/15 00:07) ※ 編輯: mics 來自: 220.134.46.244 (10/15 00:08)
zptdaniel:這串...應該夠了吧 10/15 00:19
softwind:scala啦 10/15 00:20
yoco315:不要夠啦, 人家還想玩 qq 10/15 00:23