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

標題: 圓弧插補,直線插補 51單片機能夠同時控制兩個步進電機正反轉 [打印本頁]

作者: 朱青竹    時間: 2017-5-3 00:31
標題: 圓弧插補,直線插補 51單片機能夠同時控制兩個步進電機正反轉
急求!急求!步進電機是兩個45bf005-2型反應式步進電機,驅動用ULN2003a,51單片機能夠同時控制兩個步進電機正反轉,畫圓弧,可以的話可以給報酬的。謝謝!
作者: yzwzfyz    時間: 2017-5-3 01:34
單片機不僅可以控制兩個電機正反轉,再多也行啊。
作者: 朱青竹    時間: 2017-5-3 06:56
我只知道一個的#include<reg52.h>#define uchar unsigned char#define uint  unsigned int#define MotorData P0                    //步進電機控制接口定義uchar phasecw[3] ={0x04,0x02,0x01};//正轉 電機導通相序 C-B-Auchar phaseccw[3]={0x01,0x02,0x04};//反轉 電機導通相序 A-B-C//ms延時函數void Delay_xms(uint x){ uint i,j; for(i=0;i<x;i++)  for(j=0;j<112;j++);}//順時針轉動void MotorCW(void){ uchar i; for(i=0;i<3;i++)  {   MotorData=phasecw[i];   Delay_xms(3);//轉速調節  }}//逆時針轉動void MotorCCW(void){ uchar i; for(i=0;i<3;i++)  {   MotorData=phaseccw[i];   Delay_xms(3);//轉速調節  }}//停止轉動void MotorStop(void){ MotorData=0x00;}//主函數void main(void){ uint i; Delay_xms(50);//等待系統穩定 while(1) {  for(i=0;i<500;i++)  {   MotorCW();   //順時針轉動  }   MotorStop();  //停止轉動  Delay_xms(500);  for(i=0;i<500;i++)  {   MotorCCW();  //逆時針轉動  }   MotorStop();  //停止轉動  Delay_xms(500);   }}
作者: 朱青竹    時間: 2017-5-3 06:56
有沒有具體的程序啊
作者: 朱青竹    時間: 2017-5-3 07:00
yzwzfyz 發表于 2017-5-3 01:34
單片機不僅可以控制兩個電機正反轉,再多也行啊。

#include<reg52.h>#define uchar unsigned char#define uint  unsigned int#define MotorData P0                    //步進電機控制接口定義uchar phasecw[3] ={0x04,0x02,0x01};//正轉 電機導通相序 C-B-Auchar phaseccw[3]={0x01,0x02,0x04};//反轉 電機導通相序 A-B-C//ms延時函數void Delay_xms(uint x){ uint i,j; for(i=0;i<x;i++)  for(j=0;j<112;j++);}//順時針轉動void MotorCW(void){ uchar i; for(i=0;i<3;i++)  {   MotorData=phasecw;   Delay_xms(3);//轉速調節  }}//逆時針轉動void MotorCCW(void){ uchar i; for(i=0;i<3;i++)  {   MotorData=phaseccw;   Delay_xms(3);//轉速調節  }}//停止轉動void MotorStop(void){ MotorData=0x00;}//主函數void main(void){ uint i; Delay_xms(50);//等待系統穩定 while(1) {  for(i=0;i<500;i++)  {   MotorCW();   //順時針轉動  }   MotorStop();  //停止轉動  Delay_xms(500);  for(i=0;i<500;i++)  {   MotorCCW();  //逆時針轉動  }   MotorStop();  //停止轉動  Delay_xms(500);   }}我只知道控制一個的,你有沒有具體的控制兩個電機的程序啊
作者: 2441982213    時間: 2022-11-24 21:50
有沒有具體的程序啊
作者: TTQ001    時間: 2022-11-25 01:57
http://m.raoushi.com/bbs/dpj-34111-1.html
http://m.raoushi.com/bbs/dpj-51834-1.html
http://m.raoushi.com/bbs/dpj-220045-1.html




歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1