|
STM8S+ULN2003+5VDC 4相5线电机 只抖动不转动
[复制链接]
程序如:
INT8U F_Rotation[4]={0x02,0x04,0x08,0x10};//正转表格
GPIO_Init( GPIOB, GPIO_PIN_4|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, GPIO_MODE_OUT_PP_HIGH_SLOW ); //PB的1234作为输出接UNL2003 ,配置为GPIO_MODE_OUT_PP_HIGH_SLOW
while(1)
{
for(motor_count = 0; motor_count < 4; motor_count++) //4相
{
GPIO_Write(GPIOB, B_Rotation[motor_count]);
for(motor_delay = 0; motor_delay <40000; motor_delay++);
}
}
为什么电机只抖动不转动,是电压太低(STLINK的5V),还是程序有问题啊
|
|