注册送28元体验金_注册送28彩金_开户送28元体验金
行业新闻

Verilog HDL言语的四相八拍步进西玛电机驱动开户送28元体验金

文章来源:http://qq-btc.com注册送28元体验金    时间:2017-12-08

  

  Verilog HDL言语的四相八拍步进西玛电机驱动 西玛西玛电机 if(!der) reg[3:0] out; case(current1) else current1 < =s7; end if(cnt < = 4000) cnt < = cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 current1 < =s4; begin out < =4b0011; a=~a; else if(temp==3d1) s0: else a=~a; out < =4b1100; else end always @(posedge clk1) module step2 (clk1,a,adj);//分频module else reg[2:0] current; end begin current1 < =s2; begin current < =s7; begin current < =s0; end step2 l1 (clk,p,d);//clk体系时钟 end end s3: end begin end else end begin current1 < =s1; end endmodule begin cnt < =26b0; end current < =s1; begin if(!der) begin begin if(!der) endmodule

  

  首要思维,用状态机驱动步进西玛电机!IBM发布两款17英寸ThinkVisionLCD显示器开户送28元体2017-11-22。Verilog HDL言语的四相八!!

  

  

  整体感觉,整个程序比较繁琐,看见他人完成相同的功用代码也才那么几十行,开户送28元体验金,我的……呃 距离可想而知了。。。拍步进西玛电机驱动开户送28元体验金
current<=s5; end always@(current1 )//or clk0 current<=s0; temp=adj[5]+adj[4]+adj[3]+adj[2]+adj[1]+adj[0]; end output [3:0]out; if(!reset) end cnt <=26b0; s2: endcase current1<=s7; begin s5: begin end current<=s5; current<=s4; cnt <=26b0; begin end current1<=s4; end out<=4b0110; begin output a; end end end end end else if(temp==3d2) if(!der) end module step (clk,reset,out,der,d);//整体模块d[5:0]调速操控端口 用6个拨码开关表明 全1速度最慢 全0时速度最快 其间1(0)的个数能表明西玛电机速度的快慢 else if(temp==3d0) current1<=s1; s3: reg[2:0] current1; end if(cnt <= 8000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 current<=s6; begin out<=4b0010; begin a=~a; end begin parameter s0=3b000,s1=3b001,s2=3b010, input clk1; if(!der) s7: end reg[25:0] cnt; begin else step1 l2 (p,reset ,out,der);//reset中止滚动 out[3:0]西玛电机操控输出端口 der正反方向操控端 begin current1<=s5; begin else begin s4: s2: end end s6:

  

   这两天,校园做关于cpld的课程设计,正本应该用VHDL写的,可是因为我对这个比较痴人,所以就选用Verilog HDL写了,因为周围有同学是学这个的这样,有什么问题也好处理一点。下面就先把我Verilog HDL的处女作给我们贴出来,尽管功用比较简单,但毕竟也是第一个程序嘛。。。 module step1 (clk0,reset,out,der,x);//状态机module out<=4b0001; current<=s0; current1<=s3; begin end cnt <=26b0; begin begin s1: else if(temp==3d4) begin current<=s7; endcase begin begin current<=s3; else input clk ,reset,der,d; else if(temp==3d5) current1<=s0; end begin begin begin end input clk0,reset,der,x; begin reg[2:0] temp; a=~a; current<=s4; begin end current1<=s6; out<=4b1001; end reg a; current<=s2; a=~a; wire[5:0] adj; current1<=s3; begin if(!der) end wire p; a=~a; else begin current1<=s0; s1: begin else if(!der) out<=4b0100; end begin else begin begin current<=s1; end begin end begin if(!der) end begin begin end if(temp==3d6) if(cnt <= 32000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 current<=s3; end end s6: reg[15:0] counter; begin cnt <=26b0; case(current) endmodule current<=s6; begin if(cnt <= 16000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 end else else if(temp==3d3) current<=s2; begin end always@(posedge clk0ornegedge reset ) end s6=3b110,s7=3b111; cnt <=26b0; input[5:0] adj; s3=3b011,s4=3b100,s5=3b101, cnt <=26b0; if(cnt <= 12000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 current1<=s6; begin end s4: else a=~a; end end current1<=s5; wire[5:0] d; if(cnt <= 6000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 out<=4b1000; begin else begin begin s7: s5: end end end s0: begin output[3:0] out; if(cnt <= 10000) cnt <= cnt+1b1;//0.5MS 1MS 2MS 4MS 8MS 4000 8000 16000 32000 64000 current1<=s2; else else 西玛西玛电机

  

地址:吉林省长春市巴圣路蓝山国际小区1300室    座机:027-69810638    邮箱:098579685@qq.com
版权所有: Copyright ©2007-2018 注册送28元体验金,注册送28彩金,开户送28元体验金    ICP备案编号: 蜀ICP备14001755号-1