2021-09-08 18:47:53 索炜达电子 662
项目编号:E873
文件大小:442K
源码说明:带中文注释
开发环境:C编译器
简要概述:
单定时器的多通道捕获程序,已经试验 亲测好用
实验目的:
学习定时器的输入捕获功能
硬件资源:
1,DS0(连接在PB5)
2,KEY_UP按键(PA0)
3,定时器5(TIM5),TIM5的通道1(TIM5_CH1,连接在PA0上面),使用定时器的输入捕获功能来
捕捉PA0上面的高电平脉宽.
实验现象:
本实验利用TIM5_CH1来做输入捕获,我们将捕获PA0上的高电平脉宽,并将脉宽时间通过串
口打印出来,大家可以通过按WK_UP按键,模拟输入高电平。同时,本实验将保留上一个实
验的PWM输出,DS0还是会由暗-->亮的循环变化,大家可以通过杜邦线连接PA0和PB5,来观
测PWM输出的高电平时间。
目录│文件列表:
└ 实验10 输入捕获实验
│ keilkilll.bat
│ README.TXT
├ CORE
│ │ core_cm3.c
│ │ core_cm3.h
│ └ startup_stm32f10x_hd.s
├ HARDWARE
│ ├ KEY
│ │ │ key.c
│ │ └ key.h
│ ├ LED
│ │ │ led.c
│ │ └ led.h
│ └ TIMER
│ │ timer.c
│ └ timer.h
├ OBJ
│ └ ICAPTURE.hex
├ STM32F10x_FWLib
│ ├ inc
│ │ │ misc.h
│ │ │ stm32f10x_adc.h
│ │ │ stm32f10x_bkp.h
│ │ │ stm32f10x_can.h
│ │ │ stm32f10x_cec.h
│ │ │ stm32f10x_crc.h
│ │ │ stm32f10x_dac.h
│ │ │ stm32f10x_dbgmcu.h
│ │ │ stm32f10x_dma.h
│ │ │ stm32f10x_exti.h
│ │ │ stm32f10x_flash.h
│ │ │ stm32f10x_fsmc.h
│ │ │ stm32f10x_gpio.h
│ │ │ stm32f10x_i2c.h
│ │ │ stm32f10x_iwdg.h
│ │ │ stm32f10x_pwr.h
│ │ │ stm32f10x_rcc.h
│ │ │ stm32f10x_rtc.h
│ │ │ stm32f10x_sdio.h
│ │ │ stm32f10x_spi.h
│ │ │ stm32f10x_tim.h
│ │ │ stm32f10x_usart.h
│ │ └ stm32f10x_wwdg.h
│ └ src
│ │ misc.c
│ │ stm32f10x_adc.c
│ │ stm32f10x_bkp.c
│ │ stm32f10x_can.c
│ │ stm32f10x_cec.c
│ │ stm32f10x_crc.c
│ │ stm32f10x_dac.c
│ │ stm32f10x_dbgmcu.c
│ │ stm32f10x_dma.c
│ │ stm32f10x_exti.c
│ │ stm32f10x_flash.c
│ │ stm32f10x_fsmc.c
│ │ stm32f10x_gpio.c
│ │ stm32f10x_i2c.c
│ │ stm32f10x_iwdg.c
│ │ stm32f10x_pwr.c
│ │ stm32f10x_rcc.c
│ │ stm32f10x_rtc.c
│ │ stm32f10x_sdio.c
│ │ stm32f10x_spi.c
│ │ stm32f10x_tim.c
│ │ stm32f10x_usart.c
│ └ stm32f10x_wwdg.c
├ SYSTEM
│ ├ delay
│ │ │ delay.c
│ │ └ delay.h
│ ├ sys
│ │ │ sys.c
│ │ └ sys.h
│ └ usart
│ │ usart.c
│ └ usart.h
└ USER
│ ICAPTURE.uvguix.Administrator
│ ICAPTURE.uvguix.wlz
│ ICAPTURE.uvoptx
│ ICAPTURE.uvprojx
│ JLinkSettings.ini
│ main.c
│ stm32f10x.h
│ stm32f10x_conf.h
│ stm32f10x_it.c
│ stm32f10x_it.h
│ system_stm32f10x.c
└ system_stm32f10x.h