资源简介
利用STM32F103开发板驱动HC-SR04超声波模块,可以实现基本的测距功能,同时讲测得的距离通过串口输出,本人亲测,保证可用,献给需要的朋友们。
代码片段和文件信息
/**************************************************************************//**
* @file core_cm3.c
* @brief CMSIS Cortex-M3 Core Peripheral Access layer Source File
* @version V1.30
* @date 30. October 2009
*
* @note
* Copyright (C) 2009 ARM Limited. All rights reserved.
*
* @par
* ARM Limited (ARM) is supplying this software for use with Cortex-M
* processor based microcontrollers. This file can be freely distributed
* within development tools that are supporting such ARM based processors.
*
* @par
* THIS SOFTWARE IS PROVIDED “AS IS“. NO WARRANTIES WHETHER EXPRESS IMPLIED
* OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
* ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
* CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
*
******************************************************************************/
#include
/* define compiler specific symbols */
#if defined ( __CC_ARM )
#define __ASM __asm /*!< asm keyword for ARM Compiler */
#define __INLINE __inline /*!< inline keyword for ARM Compiler */
#elif defined ( __ICCARM__ )
#define __ASM __asm /*!< asm keyword for IAR Compiler */
#define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
#elif defined ( __GNUC__ )
#define __ASM __asm /*!< asm keyword for GNU Compiler */
#define __INLINE inline /*!< inline keyword for GNU Compiler */
#elif defined ( __TASKING__ )
#define __ASM __asm /*!< asm keyword for TASKING Compiler */
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
#endif
/* ################### Compiler specific Intrinsics ########################### */
#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
/* ARM armcc specific functions */
/**
* @brief Return the Process Stack Pointer
*
* @return ProcessStackPointer
*
* Return the actual process stack pointer
*/
__ASM uint32_t __get_PSP(void)
{
mrs r0 psp
bx lr
}
/**
* @brief Set the Process Stack Pointer
*
* @param topOfProcStack Process Stack Pointer
*
* Assign the value ProcessStackPointer to the MSP
* (process stack pointer) Cortex processor register
*/
__ASM void __set_PSP(uint32_t topOfProcStack)
{
msr psp r0
bx lr
}
/**
* @brief Return the Main Stack Pointer
*
* @return Main Stack Pointer
*
* Return the curren
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 885 2015-08-26 18:59 HC-SR04\Devices\led.c
文件 431 2015-08-26 18:59 HC-SR04\Devices\led.h
文件 2456 2015-08-26 18:59 HC-SR04\Devices\usart1.c
文件 595 2015-08-26 18:59 HC-SR04\Devices\usart.h
文件 653 2015-08-26 18:58 HC-SR04\User\main.c
目录 0 2015-08-26 16:50 HC-SR04\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\CoreSupport\
文件 17273 2014-02-12 10:23 HC-SR04\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2014-02-12 10:23 HC-SR04\CMSIS\CM3\CoreSupport\core_cm3.h
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\ST\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
文件 26297 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\
文件 12604 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_cl.s
文件 12592 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd.s
文件 12239 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd_vl.s
文件 9826 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_ld.s
文件 10275 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_ld_vl.s
文件 10275 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_md.s
文件 10757 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_md_vl.s
文件 13252 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_xl.s
目录 0 2015-08-26 16:50 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
文件 15766 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15503 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15692 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12376 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13656 2014-02-12 10:23 HC-SR04\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
............此处省略222个文件信息
相关资源
- 单片机超声波模块HC-SR04说明
- HC-SR04 STM32程序
- HC-SR04超声波测距 STM32 keil
- STM32F1控制HC-SR04超声波测距
- HC-SR04 全套超声波测距资料
- 关于测距模块HC-SR04的内部电路图 ,
- HC-SR04超声波测距资料及例程代码 51单
- STM32F103VET6驱动HC-SR04.rar
- STM32HC-SR04程序
- STM32F103VE_Sonic HC-SR04超声波模块程序
- hc-sr04超声波测距
- 基于STM32的超声波测距程序
- HC-SR04超声波模块+STM32F103
- 基于STM32F103ZET6芯片的超声波模块HC-
- STM32超声波测距代码-HC-SR04.zip
- HC-SR04超声波测距显示LED灯闪烁
- STM32F10X 和HC-SR04 测距
- LCD12864串行显示DS18B20温度和超声波测
- 嵌入式linux之mini2440的hc-sr04超声波驱动
- 超声模块HC-SR04说明及例程
- 基于HC-SR04超声波测距LCD12864显示源码
- MSP430G2*单片机利用HC-SR04测距
- stm32f103rc_hcsr04.rar
- HC-SR04超声波测距模块及原理图
- HC-SR04 超声波测距C51程序,精度2MM
- HC-SR04+89C52RC+11.0592Mhz高精度驱动程序
- STC15/STC15F2K60S2/STC15W4K32S4系列读取超声
- 51单片机超声波测距HC-SR04程序
- CC2530与HC-SR04超声波模块通信
- HC-SR04超声波测距模块+OLED12864显示
评论
共有 条评论