欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2356|回復: 0
收起左側

新人求助.eda步進電機設計.大家幫忙看看.感謝

[復制鏈接]
ID:356821 發表于 2018-6-23 10:42 | 顯示全部樓層 |閱讀模式
分頻計模塊
library ieee;
use ieee. std_logic_1164. All;
use ieee. std_logic_arith. all;
use ieee. std_logic_unsigned. All;
entity freq is
port(clk_sys : in std_logic;

clk_new: out std_logic);

end freq;

architecture one of freq is
signal set : std_logic;

signal cnt : std_logic_vector ( 17 downto 0 );
begin

process ( clk_sys)

begin

if set ='1'then
cnt <="011111111111111111";
elsif clk_sys'event and clk_sys = '1'then

Cnt <= cnt-1;

end if;
end process;
set<= cnt( 17);
clk_new <= cnt ( 16);
end one;
控制器模塊
tibrary ieee;
use ieee. std_logic_1164. All;
use ieee. std_logic_arith. All;
use ieee. std_logic_unsigned. All;
entity step_motor IS

porti( clk : in std_logic;
      Starstop : in std_logic;
      ForRev : in std_logic :'0';

      speed : in std_logic_vector ( 1 domto 0)
      ForLED : out std_logic;

      RevLED : out std_logic;

      coil : out std)_logic_vector (3 domto 0));
end step_motor;

architecture two OF step_motor IS

signal ind_coil: std_logic_vector(3 downto 0):=" 0001";
signal clk_scan : STD_LOGIC;

signal PHASE, DIRECHON : STD_LOGIC;

signal moto:std_logic_vector(3 downto 0);
signal comp : integer range 0 to 2500;

signal osc:std_logic;

begin

Coil<= moto;

P1 : process(clk, osc)

variable delay : integer range 0 to 50;
begin

if(clk'event and clk ='1') then
if delay> = 50 then

delay:=0;osc<= not osc;
else delay :=delay+ 1;
end if;

end if;
if (Osc'event and osc='1') then
case speed is

回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表