单片机控制两个步进电机
一次控制两个电机#include#defineGPIO_MOTORP1sbitK1=P3^6;sbitK2=P3^5;sbitK3=P3^4;sbitK4=P3^3;unsignedcharcodeZHENG1[8]={0xf1,0xf3,0xf2,0xf6,0xf4,0xfc,0xf8,0xf9};//正转顺序编码unsignedcharcodeFAN1[8]={0xf9,0xf8,0xfc,0xf4,0xf6,0xf2,0xf3,0xf1};//反转顺序编码unsignedcharcodeZHENG2[8]={0x1f,0x3f,0x2f,0x6f,0x4f,0
用户评论