超声波雷达
大小:327.49KB
价格:12积分
下载量:0
评分:
5.0
上传者:wda_lon
更新日期:2025-09-22

STM32C8T6库函数实现SG90和SH04扫描测距完整代码工程

资源文件列表(大概)

文件名
大小
超声波雷达/
-
超声波雷达/DebugConfig/
-
超声波雷达/DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf
6.79KB
超声波雷达/Hardware/
-
超声波雷达/Hardware/Key.c
1.74KB
超声波雷达/Hardware/Key.h
95B
超声波雷达/Hardware/LED.c
2.53KB
超声波雷达/Hardware/LED.h
200B
超声波雷达/Hardware/OLED.c
7.72KB
超声波雷达/Hardware/OLED.h
567B
超声波雷达/Hardware/OLED_Font.h
8.94KB
超声波雷达/Hardware/SG90.c
1.58KB
超声波雷达/Hardware/SG90.h
105B
超声波雷达/Hardware/SR04.c
5.56KB
超声波雷达/Hardware/SR04.h
631B
超声波雷达/keilkill.bat
399B
超声波雷达/Library/
-
超声波雷达/Library/misc.c
6.88KB
超声波雷达/Library/misc.h
8.77KB
超声波雷达/Library/stm32f10x_adc.c
46.09KB
超声波雷达/Library/stm32f10x_adc.h
21.18KB
超声波雷达/Library/stm32f10x_bkp.c
8.26KB
超声波雷达/Library/stm32f10x_bkp.h
7.38KB
超声波雷达/Library/stm32f10x_can.c
44.05KB
超声波雷达/Library/stm32f10x_can.h
26.91KB
超声波雷达/Library/stm32f10x_cec.c
11.38KB
超声波雷达/Library/stm32f10x_cec.h
6.42KB
超声波雷达/Library/stm32f10x_crc.c
3.27KB
超声波雷达/Library/stm32f10x_crc.h
2.11KB
超声波雷达/Library/stm32f10x_dac.c
18.64KB
超声波雷达/Library/stm32f10x_dac.h
14.88KB
超声波雷达/Library/stm32f10x_dbgmcu.c
5.03KB
超声波雷达/Library/stm32f10x_dbgmcu.h
3.73KB
超声波雷达/Library/stm32f10x_dma.c
28.91KB
超声波雷达/Library/stm32f10x_dma.h
20.27KB
超声波雷达/Library/stm32f10x_exti.c
6.8KB
超声波雷达/Library/stm32f10x_exti.h
6.66KB
超声波雷达/Library/stm32f10x_flash.c
61.08KB
超声波雷达/Library/stm32f10x_flash.h
24.85KB
超声波雷达/Library/stm32f10x_fsmc.c
34.65KB
超声波雷达/Library/stm32f10x_fsmc.h
26.38KB
超声波雷达/Library/stm32f10x_gpio.c
22.68KB
超声波雷达/Library/stm32f10x_gpio.h
19.7KB
超声波雷达/Library/stm32f10x_i2c.c
44.71KB
超声波雷达/Library/stm32f10x_i2c.h
29.33KB
超声波雷达/Library/stm32f10x_iwdg.c
4.8KB
超声波雷达/Library/stm32f10x_iwdg.h
3.74KB
超声波雷达/Library/stm32f10x_pwr.c
8.55KB
超声波雷达/Library/stm32f10x_pwr.h
4.28KB
超声波雷达/Library/stm32f10x_rcc.c
50.07KB
超声波雷达/Library/stm32f10x_rcc.h
29.74KB
超声波雷达/Library/stm32f10x_rtc.c
8.4KB
超声波雷达/Library/stm32f10x_rtc.h
3.77KB
超声波雷达/Library/stm32f10x_sdio.c
28.25KB
超声波雷达/Library/stm32f10x_sdio.h
21.35KB
超声波雷达/Library/stm32f10x_spi.c
29.52KB
超声波雷达/Library/stm32f10x_spi.h
17.31KB
超声波雷达/Library/stm32f10x_tim.c
106.6KB
超声波雷达/Library/stm32f10x_tim.h
51.2KB
超声波雷达/Library/stm32f10x_usart.c
37.41KB
超声波雷达/Library/stm32f10x_usart.h
16.16KB
超声波雷达/Library/stm32f10x_wwdg.c
5.6KB
超声波雷达/Library/stm32f10x_wwdg.h
2.9KB
超声波雷达/Listings/
-
超声波雷达/Objects/
-
超声波雷达/Objects/Project.hex
25.1KB
超声波雷达/Project.uvguix.Admin
87.48KB
超声波雷达/Project.uvguix.wdada
85.98KB
超声波雷达/Project.uvoptx
32.44KB
超声波雷达/Project.uvprojx
26.38KB
超声波雷达/Start/
-
超声波雷达/Start/core_cm3.c
16.87KB
超声波雷达/Start/core_cm3.h
83.71KB
超声波雷达/Start/startup_stm32f10x_cl.s
15.4KB
超声波雷达/Start/startup_stm32f10x_hd.s
15.14KB
超声波雷达/Start/startup_stm32f10x_hd_vl.s
15.32KB
超声波雷达/Start/startup_stm32f10x_ld.s
12.09KB
超声波雷达/Start/startup_stm32f10x_ld_vl.s
13.34KB
超声波雷达/Start/startup_stm32f10x_md.s
12.47KB
超声波雷达/Start/startup_stm32f10x_md_vl.s
13.74KB
超声波雷达/Start/startup_stm32f10x_xl.s
15.58KB
超声波雷达/Start/stm32f10x.h
619.08KB
超声波雷达/Start/system_stm32f10x.c
35.7KB
超声波雷达/Start/system_stm32f10x.h
2.04KB
超声波雷达/System/
-
超声波雷达/System/Delay.c
838B
超声波雷达/System/Delay.h
135B
超声波雷达/User/
-
超声波雷达/User/main.c
689B
超声波雷达/User/stm32f10x_conf.h
3.18KB
超声波雷达/User/stm32f10x_it.c
4.3KB
超声波雷达/User/stm32f10x_it.h
2.04KB

资源内容介绍

包含超声波模块和舵机模块配合实现扫描测距功能的代码
/** ****************************************************************************** * @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. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */#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 * @{ */#define SMCR_ETR_Mask ((uint16_t)0x00FF) #define CCMR_Offset ((uint16_t)0x0018)#define CCER_CCE_Set ((uint16_t)0x0001) #defineCCER_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){ 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; 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)) { tmpcr1 &= (uint16_t)(~((uint16_t)(TIM_CR1_DIR | TIM_CR1_CMS))); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; } if((TIMx != TIM6) && (TIMx != TIM7)) { tmpcr1 &= (uint16_t)(~((uint16_t)TIM_CR1_CKD)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; } TIMx->CR1 = tmpcr1; TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; if ((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM15)|| (TIMx == TIM16) || (TIMx == TIM17)) { TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; } 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

用户评论 (0)

发表评论

captcha

相关资源

基于随机森林算法RF的数据分类预测详解:从代码注释到Excel数据存储的全面指南,基于随机森林算法RF的数据分类预测详解:从代码注释到Excel数据存储之道,基于随机森林算法RF的数据分类预测代码含

基于随机森林算法RF的数据分类预测详解:从代码注释到Excel数据存储的全面指南,基于随机森林算法RF的数据分类预测详解:从代码注释到Excel数据存储之道,基于随机森林算法RF的数据分类预测代码含详细注释,不负责数据存入Excel,替方便,基于随机森林算法; 代码含详细注释; 数据存入Excel; 方便替换数据。,基于随机森林算法的详细注释数据分类预测代码:Excel数据存储与替换方便

2.16MB42积分

资源-网络工程师知识点

资源-网络工程师知识点

838.42KB49积分

《免费模电-Multisim电路仿真大合集(120例)-电子类专业实验/毕设实战资源库》

知识领域:电子技术技术关键词:Multisim仿真内容:模拟电路实战仿真电路图,包含各种简单的共基,共射放大电路,差分放大电路,恒流电路,反馈电路,比例,运算,积分电路,振荡电路,波形发生电路,功放,滤波电路用途:课程设计/实验毕设+ 大学生专属特点:免费

25.29MB24积分

基于MATLAB的智能抠图系统:GUI界面与两万字详解文档,基于MATLAB的智能抠图系统:GUI界面与两万字详解文档,基于MATLAB的抠图系统+GUI界面+两万字文档本程序利用基于学习的抠图方法

基于MATLAB的智能抠图系统:GUI界面与两万字详解文档,基于MATLAB的智能抠图系统:GUI界面与两万字详解文档,基于MATLAB的抠图系统+GUI界面+两万字文档本程序利用基于学习的抠图方法得出图片的alpha图之后,可以将原图与背景图融合得到以假乱真的效果。具体效果看下图本链接附两万字文档,非常详细,MATLAB; 抠图系统; GUI界面; 图片处理; 融合效果; 文档,MATLAB学习抠图系统融合算法及GUI操作详解两万字文档

1.63MB20积分