【文章內(nèi)容簡(jiǎn)介】
轉(zhuǎn)換 ADC0809 是帶有 8 位 A/D 轉(zhuǎn)換器、 8路多路開關(guān)以及微處理機(jī)兼容的控制邏輯的CMOS 組件 組成,電路圖如下: 圖 8: 8 位 AD 轉(zhuǎn)換電路 液晶顯示 library IEEE。 use 。 use 。 use 。 entity ctrl is Port (sysclk : in std_logic。 reset : in std_logic。 ad: out std_logic_vector(9 downto 0)。 10位地址輸出 A0: out std_logic。 設(shè)置控制命令與數(shù)據(jù) CS1:out std_logic。 片選信號(hào) SED1502(1) CS2:out std_logic)。 片選信號(hào) SED1502(2) end ctrl。 architecture Behavioral of ctrl is signal divt : std_logic_vector(11 downto 0)。 系統(tǒng)計(jì)數(shù) signal data : std_logic_vector(9 downto 0)。 地址輸出 signal clk1,clk2,a01,cs11,cs21,flag,csflag : std_logic。 begin process(sysclk,reset) 初始計(jì)數(shù) begin if reset=39。039。 then divt = (others=39。039。)。 flag=39。139。 elsif sysclk39。event and sysclk=39。139。 then if divt=100000010011 then 102067。 flag=39。039。 divt=000000000000。 else divt = divt + 1。 end if。 end if。 end process。 data=divt(11 downto 2)。最高 10位為地址 clk1=divt(0) and flag。 clk2=divt(1) and flag。 process(clk1,clk2) begin if clk139。event and clk1=39。139。 then if clk2=39。039。 th