首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

STM32 ULN2003驱动28BYJ-48 工程源码文件

硬件开发 323.49KB 31 需要积分: 1
立即下载

资源介绍:

很多人问我要源码,在这里把【STM32】步进电机及其驱动(ULN2003驱动28BYJ-48丨按键控制电机旋转)文章配套资源,这是编译之后的Keil 5工程源码文件,对应STM32F103C8T6,欢迎大家交流参考
/** ****************************************************************************** * @file stm32f10x_tim.c * @author MCD Application Team * @version V3.5.0 * @date 11-March-2011 * @brief This file provides all the TIM firmware functions. ****************************************************************************** * @attention * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * *

© COPYRIGHT 2011 STMicroelectronics

****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_tim.h" #include "stm32f10x_rcc.h" /** @addtogroup STM32F10x_StdPeriph_Driver * @{ */ /** @defgroup TIM * @brief TIM driver modules * @{ */ /** @defgroup TIM_Private_TypesDefinitions * @{ */ /** * @} */ /** @defgroup TIM_Private_Defines * @{ */ /* ---------------------- TIM registers bit mask ------------------------ */ #define SMCR_ETR_Mask ((uint16_t)0x00FF) #define CCMR_Offset ((uint16_t)0x0018) #define CCER_CCE_Set ((uint16_t)0x0001) #define CCER_CCNE_Set ((uint16_t)0x0004) /** * @} */ /** @defgroup TIM_Private_Macros * @{ */ /** * @} */ /** @defgroup TIM_Private_Variables * @{ */ /** * @} */ /** @defgroup TIM_Private_FunctionPrototypes * @{ */ static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); /** * @} */ /** @defgroup TIM_Private_Macros * @{ */ /** * @} */ /** @defgroup TIM_Private_Variables * @{ */ /** * @} */ /** @defgroup TIM_Private_FunctionPrototypes * @{ */ /** * @} */ /** @defgroup TIM_Private_Functions * @{ */ /** * @brief Deinitializes the TIMx peripheral registers to their default reset values. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @retval None */ void TIM_DeInit(TIM_TypeDef* TIMx) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); if (TIMx == TIM1) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE); } else if (TIMx == TIM2) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE); } else if (TIMx == TIM3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE); } else if (TIMx == TIM4) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE); } else if (TIMx == TIM5) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE); } else if (TIMx == TIM6) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE); } else if (TIMx == TIM7) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE); } else if (TIMx == TIM8) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, DISABLE); } else if (TIMx == TIM9) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, DISABLE); } else if (TIMx == TIM10) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, DISABLE); } else if (TIMx == TIM11) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, DISABLE); } else if (TIMx == TIM12) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, DISABLE); } else if (TIMx == TIM13) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, DISABLE); } else if (TIMx == TIM14) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, DISABLE); } else if (TIMx == TIM15) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, DISABLE); } else if (TIMx == TIM16) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, DISABLE); } else { if (TIMx == TIM17) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, DISABLE); } } } /** * @brief Initializes the TIMx Time Base Unit peripheral according to * the specified parameters in the TIM_TimeBaseInitStruct. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @param TIM_TimeBaseInitStruct: pointer to a TIM_TimeBaseInitTypeDef * structure that contains the configuration information for the * specified TIM peripheral. * @retval None */ void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct) { uint16_t tmpcr1 = 0; /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~((uint16_t)(TIM_CR1_DIR | TIM_CR1_CMS))); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; } if((TIMx != TIM6) && (TIMx != TIM7)) { /* Set the clock division */ tmpcr1 &= (uint16_t)(~((uint16_t)TIM_CR1_CKD)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; } TIMx->CR1 = tmpcr1; /* Set the Autoreload value */ TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; /* Set the Prescaler value */ TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; if ((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM15)|| (TIMx == TIM16) || (TIMx == TIM17)) { /* Set the Repetition Counter value */ TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; } /* Generate an update event to reload the Prescaler and the Repetition counter values immediately */ TIMx->EGR = TIM_PSCReloadMode_Immediate; } /** * @brief Initializes the TIMx Channel1 according to the specified * parameters in the TIM_OCInitStruct. * @param TIMx: where x can be 1 to 17 except 6 and 7 to select the TIM peripheral. * @param TIM_OCInitStru

资源文件列表:

【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48).zip 大约有94个文件
  1. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/DebugConfig/
  2. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf 6.79KB
  3. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/EventRecorderStub.scvd 339B
  4. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/
  5. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Key.c 1.29KB
  6. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Key.h 97B
  7. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/LED.c 2.22KB
  8. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/LED.h 204B
  9. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Motor.c 1.07KB
  10. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Motor.h 112B
  11. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/OLED.c 7.77KB
  12. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/OLED.h 567B
  13. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/OLED_Font.h 8.94KB
  14. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/PWM.c 1.95KB
  15. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/PWM.h 111B
  16. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Servo.c 208B
  17. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Servo.h 111B
  18. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Stepper.c 3.35KB
  19. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Hardware/Stepper.h 1.05KB
  20. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/keilkill.bat 399B
  21. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/
  22. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/misc.c 6.88KB
  23. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/misc.h 8.77KB
  24. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_adc.c 46.09KB
  25. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_adc.h 21.18KB
  26. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_bkp.c 8.26KB
  27. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_bkp.h 7.38KB
  28. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_can.c 44.05KB
  29. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_can.h 26.91KB
  30. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_cec.c 11.38KB
  31. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_cec.h 6.42KB
  32. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_crc.c 3.27KB
  33. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_crc.h 2.11KB
  34. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dac.c 18.64KB
  35. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dac.h 14.88KB
  36. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dbgmcu.c 5.03KB
  37. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dbgmcu.h 3.73KB
  38. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dma.c 28.91KB
  39. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_dma.h 20.27KB
  40. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_exti.c 6.8KB
  41. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_exti.h 6.66KB
  42. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_flash.c 61.08KB
  43. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_flash.h 24.85KB
  44. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_fsmc.c 34.65KB
  45. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_fsmc.h 26.38KB
  46. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_gpio.c 22.68KB
  47. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_gpio.h 19.7KB
  48. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_i2c.c 44.71KB
  49. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_i2c.h 29.33KB
  50. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_iwdg.c 4.8KB
  51. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_iwdg.h 3.74KB
  52. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_pwr.c 8.55KB
  53. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_pwr.h 4.28KB
  54. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_rcc.c 50.07KB
  55. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_rcc.h 29.74KB
  56. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_rtc.c 8.4KB
  57. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_rtc.h 3.77KB
  58. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_sdio.c 28.25KB
  59. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_sdio.h 21.35KB
  60. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_spi.c 29.52KB
  61. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_spi.h 17.31KB
  62. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_tim.c 106.6KB
  63. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_tim.h 51.2KB
  64. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_usart.c 37.41KB
  65. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_usart.h 16.16KB
  66. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_wwdg.c 5.6KB
  67. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Library/stm32f10x_wwdg.h 2.9KB
  68. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Listings/
  69. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Objects/
  70. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Project.uvguix.DELL 90.18KB
  71. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Project.uvoptx 30.64KB
  72. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Project.uvprojx 25.74KB
  73. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/
  74. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/core_cm3.c 16.87KB
  75. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/core_cm3.h 83.71KB
  76. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_cl.s 15.4KB
  77. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_hd.s 15.14KB
  78. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_hd_vl.s 15.32KB
  79. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_ld.s 12.09KB
  80. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_ld_vl.s 13.34KB
  81. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_md.s 12.47KB
  82. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_md_vl.s 13.74KB
  83. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/startup_stm32f10x_xl.s 15.58KB
  84. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/stm32f10x.h 619.08KB
  85. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/system_stm32f10x.c 35.7KB
  86. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/Start/system_stm32f10x.h 2.04KB
  87. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/System/
  88. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/System/Delay.c 838B
  89. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/System/Delay.h 135B
  90. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/User/
  91. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/User/main.c 553B
  92. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/User/stm32f10x_conf.h 3.18KB
  93. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/User/stm32f10x_it.c 4.3KB
  94. 【STM32F103】驱动步进电机(ULN2003驱动28BYJ-48)/User/stm32f10x_it.h 2.04KB
0评论
提交 加载更多评论
其他资源 aircrack-ng-1.0-rc1-win
aircrack-ng1.0 for Windows 破解无线AP专用
pb快速操作json库
pb 操作json的demo。支持json的解析和写入。支持大数据快速处理,功能强大。 函数说明见示例代码的global external declare
STM32进行FFT傅里叶变换 CUBEMX
STM32进行FFT傅里叶变换 CUBEMX
罗技GHUB驱动安装包
罗技GHUB调节鼠标,键盘,耳机等设备,更好的服务于自己。
jar包it.sauronsoftware.jave
it.sauronsoftware.jave包下载
Dependencies_x64_1.11.zip
win10上好用的dll或exe依赖查看工具Dependencies,版本1.11
vep视频快速加密提取器
vep视频快速加密提取器
vep视频快速加密提取器
oracle内部培训教程
oracle内部培训教程
oracle内部培训教程 oracle内部培训教程 oracle内部培训教程