yangliu793 发表于 2012-12-3 23:45:34

YOU1 发表于 2012-12-4 11:53:12

搞个驱动器,一驱动芯片个IO口输出方波脉冲就搞定了,反正你要用

ZL_electric 发表于 2012-12-4 11:58:29

针对两相四线步进电机,应该使用两个PWM来实现正弦波控制、细分····
原来搞了一段时间,但看不到什么市场,就不搞了

qq1806765274 发表于 2012-12-4 12:30:24

学习了{:smile:}

yangliu793 发表于 2012-12-4 18:35:54

pisayisi 发表于 2012-12-4 20:10:20

本帖最后由 pisayisi 于 2012-12-4 20:14 编辑

if you simply use delays with systick and ios you can use the code shown attachmetn for stm32f1xx. Otherwiseyou must use 2 timers and two ios as shown below...




u32 FFW={0xfffe,0xfffc,0xfffd,0xfff9,0xfffb,0xfff3,0xfff7,0xfff6}; //·´×ª
u32 FFZ={0xfff6,0xfff7,0xfff3,0xfffb,0xfff9,0xfffd,0xfffc,0xfffe}; //Õıת
voidmotor_ffw()
{
u8 i;
u8j;
        for (j=0; j<12; j++)         //ת1*nȦ
    {

      for (i=0; i<8; i++)       //Ò»¸öÖÜÆÚת30¶È
      {
         GPIO_Write(GPIOD,FFW); //È¡Êı¾İ
                  
          Delay(2);                   //µ÷½ÚתËÙ ,ÑÓʱԽ³¤£¬×ªËÙÔ½¿ì
                  Delay(1);
      }
   }
}
voidmotor_ffz()
{
u8 i;
u8 j;
for (j=0; j<12; j++)         //ת1*nȦ
   {

      for (i=0; i<8; i++)       //Ò»¸öÖÜÆÚת30¶È
      {
         
                   GPIO_Write(GPIOD,FFZ);
          Delay(2);                   //µ÷½ÚתËÙ
                  Delay(1);          
      }
   }
}

xyfaneast 发表于 2013-3-26 19:06:36

正在学习,参观下
页: [1]
查看完整版本: STM32,步进电机