步进电机的proteus仿真图#include#defineuintunsignedint#defineucharunsignedcharuintcodesp[]={50,130,70};sbitKEY1=P0^0;//步进电机的起停sbitKEY2=P0^1;//步进电机的正转反转sbitKEY3=P0^2;//步进电机的速度选择sbitgreen=P2^0;//速度1指示sbityellow=P2^1;//速度2指示sbitred=P2^2;//速度3指示sbitstart=P2^3;ucharcount;uintspeed_flag;bit