作者mics (Mics)
看板C_and_CPP
標題Re: [問題] c語言程式求助
時間Thu Oct 15 00:01:58 2009
來個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