资源简介
实现:
1.定时器检测按键;
2.红外的学习和发送;
说明:
1.硬件电路更改:
去掉R2电阻,用470欧姆电阻串接在PB8和三极管Q1的B级;
2.操作:
a.长按KEY1按键,待LED9点亮后进入学习。任意按一个遥控按键,系统将会学习到相应的按键信息;
b.短按KEY1按键,红外发射口将发射最新学习到的红外信号。
代码片段和文件信息
/**
******************************************************************************
* @file system_stm32f10x.c
* @author MCD Application Team
* @version V3.5.0
* @date 11-March-2011
* @brief CMSIS Cortex-M3 Device Peripheral Access layer System Source File.
*
* 1. This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): Setups the system clock (System clock source PLL Multiplier
* factors AHB/APBx prescalers and Flash settings).
* This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the “startup_stm32f10x_xx.s“ file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK) it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
* 2. After each device reset the HSI (8 MHz) is used as system clock source.
* Then SystemInit() function is called in “startup_stm32f10x_xx.s“ file to
* configure the system clock before to branch to main program.
*
* 3. If the system clock source selected by user fails to startup the SystemInit()
* function will do nothing and HSI still used as system clock source. User can
* add some code to deal with this issue inside the SetSysClock() function.
*
* 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz depedning on
* the product used) refer to “HSE_VALUE“ define in “stm32f10x.h“ file.
* When HSE is used as system clock source directly or through PLL and you
* are using different crystal you have to adapt the HSE value to your own
* configuration.
*
******************************************************************************
* @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
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32f10x_system
* @{
*
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 281149 2014-05-27 11:14 IR(OK)\obj\delay.crf
文件 1557 2014-05-27 11:14 IR(OK)\obj\delay.d
文件 301368 2014-05-27 11:14 IR(OK)\obj\delay.o
文件 595 2014-05-27 09:41 IR(OK)\obj\delay._2i
文件 19 2014-05-26 17:25 IR(OK)\obj\ExtDll.iex
文件 365484 2014-05-27 11:14 IR(OK)\obj\IR.axf
文件 293 2014-06-14 17:39 IR(OK)\obj\IR.build_log.htm
文件 284704 2014-05-27 11:14 IR(OK)\obj\ir.crf
文件 1628 2014-05-27 11:14 IR(OK)\obj\ir.d
文件 6104 2014-05-27 09:41 IR(OK)\obj\IR.fed
文件 84197 2014-05-27 11:14 IR(OK)\obj\IR.htm
文件 547 2014-05-27 09:42 IR(OK)\obj\IR.l2p
文件 547 2014-05-27 11:14 IR(OK)\obj\IR.lnp
文件 308808 2014-05-27 11:14 IR(OK)\obj\ir.o
文件 479 2014-05-14 14:09 IR(OK)\obj\IR.sct
文件 592 2014-05-27 09:41 IR(OK)\obj\ir._2i
文件 280921 2014-05-27 11:14 IR(OK)\obj\key.crf
文件 1551 2014-05-27 11:14 IR(OK)\obj\key.d
文件 301616 2014-05-27 11:14 IR(OK)\obj\key.o
文件 585 2014-05-27 09:41 IR(OK)\obj\key._2i
文件 281282 2014-05-27 11:14 IR(OK)\obj\led.crf
文件 1515 2014-05-27 11:14 IR(OK)\obj\led.d
文件 301420 2014-05-27 11:14 IR(OK)\obj\led.o
文件 585 2014-05-27 09:41 IR(OK)\obj\led._2i
文件 283595 2014-05-27 11:14 IR(OK)\obj\main.crf
文件 1707 2014-05-27 11:14 IR(OK)\obj\main.d
文件 307280 2014-05-27 11:14 IR(OK)\obj\main.o
文件 590 2014-05-27 09:41 IR(OK)\obj\main._2i
文件 281474 2014-05-27 11:14 IR(OK)\obj\misc.crf
文件 1680 2014-05-27 11:14 IR(OK)\obj\misc.d
............此处省略82个文件信息
相关资源
- K5环境+STM32+MPU6050+卡尔曼滤波源码
- STM32 UIP演示
- STM32直流无刷电机电路图
- 共享STM32F103CBT6嵌入式以太网WEB服务器
- 2017年电子设计大赛_滚球控制系统源代
- stm32移植uCosIIV2.86源码
- stm32双串口与CC2541蓝牙模块通信
- STM32-串口1收发+串口2
- STM32自定义HID设备块传输+libusb上位机
- STM32 TCS34725程序
- STM32的CC1101手法程序
- stm32 产生的pwm的硬件电路
- 基于STM32的NRF多机通信三台STM32的源码
- STM32按键中断+串口回显
- 基于STM32和AD9850的波形发生器2012
- stm32f407VET6数据手册.pdf中文资料
- STM32 18B20完整程序
- STM32F103驱动ILI9341DS18B20RTCADCIRED
- STM32汉字系统菜单
- STM32F4 EMWIN开发手册_V3.1.pdf
- STM32F103RB最小系统原理图+PCB
- STM32 四通道4-20mA模拟量采集板485接口
- STM32F746串口收发
- STM32 RS232串口控制
- 基于stm32的单相逆变代码可调压调频
- 基于STM32C8t6实现的温度控制系统
- stm32GPIO模拟spi驱动NRF2401
- STM32程序。多串口。DMA方式。C代码
- STM32F407+LWIP+DP83848+多端口
- 基于stm32的lcd1602
评论
共有 条评论