• 大小: 1.97MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-02
  • 语言: 其他
  • 标签: STM32  STM32F103ZET  

资源简介

单片机:STM32F103ZET6 电机类型:四相八步步进电机 编写stepper函数实现对多个电机的同步控制,控制任意电机i的转动角度,转动方向及转速

资源截图

代码片段和文件信息

#include“stm32f10x.h“
#include“stm32f10x_gpio.h“
#include“led.h“

void LED_Init()
{
  GPIO_InitTypeDef GPIO_InitStructure; //定义结构体变量
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOBENABLE);//开启时钟
GPIO_InitStructure.GPIO_Pin=GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7; //选择IO口
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;//设置推挽输出
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz; //设置传输仕俣?
GPIO_Init(GPIOB&GPIO_InitStructure);/*初始化GPIO */
GPIO_SetBits(GPIOBGPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7);//设置IO口为高电平
}

void delay(int i)
{
while(i>0)
i--;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        704  2018-10-21 14:26  stm32-SysTick模板\APP\led.c

     文件         42  2018-08-07 23:42  stm32-SysTick模板\APP\led.h

     文件       7122  2018-11-08 21:36  stm32-SysTick模板\APP\stepper.c

     文件       1114  2018-11-08 21:16  stm32-SysTick模板\APP\stepper.h

     文件       1741  2018-08-12 12:43  stm32-SysTick模板\APP\usart.c

     文件        134  2018-10-21 18:50  stm32-SysTick模板\APP\usart.h

     文件      17273  2010-06-07 10:25  stm32-SysTick模板\libraries\CMSIS\core_cm3.c

     文件      85714  2011-02-09 14:59  stm32-SysTick模板\libraries\CMSIS\core_cm3.h

     文件      15503  2011-03-10 10:52  stm32-SysTick模板\libraries\CMSIS\startup_stm32f10x_hd.s

     文件      36557  2011-03-10 10:51  stm32-SysTick模板\libraries\CMSIS\system_stm32f10x.c

     文件       2085  2011-03-10 10:51  stm32-SysTick模板\libraries\CMSIS\system_stm32f10x.h

     文件       8982  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\misc.h

     文件      21690  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h

     文件       7555  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_bkp.h

     文件      27559  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h

     文件       6573  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_cec.h

     文件       2162  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_crc.h

     文件      15233  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dac.h

     文件       3818  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dbgmcu.h

     文件      20754  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h

     文件       6824  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h

     文件      25445  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h

     文件      27016  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_fsmc.h

     文件      20175  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h

     文件      30029  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_i2c.h

     文件       3828  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_iwdg.h

     文件       4383  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_pwr.h

     文件      30452  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h

     文件       3857  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rtc.h

     文件      21863  2011-03-10 10:47  stm32-SysTick模板\libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_sdio.h

............此处省略104个文件信息

评论

共有 条评论