CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 嵌入式/单片机编程 单片机(51,AVR,MSP430等)

文件名称:example1_TIM

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    272.12kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!
电信下载 联通下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。

介绍说明--下载内容来自于网络,使用问题请自行百度

本例展示了如何利用外设TIM2来产生四路频率不同的信号。



TIM2时钟设置为36MHz,预分频设置为2,使用输出比较-翻转模式(Output Compare Toggle Mode)。



TIM2计数器时钟可表达为:TIM2 counter clock = TIMxCLK / (Prescaler +1) = 12 MHz



设置TIM2_CCR1寄存器值为32768,则CC1更新频率为TIM2计数器时钟频率除以CCR1寄存器值,为366.2 Hz。因此,TIM2通道1可产生一个频率为183.1 Hz的周期信号。



同理,根据寄存器TIM2_CCR2 、TIM2_CCR3和 TIM2_CCR4的值,TIM2通道2可产生一个频率为366.3 Hz的周期信号;TIM2通道3可产生一个频率为732.4 Hz的周期信号;TIM2通道4可产生一个频率为1464.8 Hz的周期信号。



可以通过示波器观察各路输出。-This example shows how to use peripherals the TIM2 to produce four different frequencies of the signal. The TIM2 clock is set to 36 MHz, the prescaler is set to 2, use the output- flip mode (Output Compare Toggle Mode). TIM2 counter clock can be expressed as: TIM2 is counter clock = TIMxCLK/(prescaler. Ppls1) to 12 MHz 32768 set TIM2_CCR1 register, the CC1 update frequency of the TIM2 the counter clock frequency divided by the CCR1 register value, 366.2 Hz,. Therefore, TIM2 channel 1 can produce a periodic signal with a frequency of 183.1 Hz. The same token, value register TIM2_CCR2, TIM2_CCR3 and TIM2_CCR4, TIM2 is channel 2 can produce a frequency of 366.3 Hz periodic signal TIM2 is channel 3 can produce a frequency of 732.4 Hz periodic signal TIM2 is channel 4 can produce a frequency of 1464.8 Hz periodic signal. Each output can be observed through the oscilloscope.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

example1_TIM/App/bsp.c
example1_TIM/App/bsp.h
example1_TIM/App/main.c
example1_TIM/App/stm32f10x_conf.h
example1_TIM/App/stm32f10x_it.c
example1_TIM/App/stm32f10x_it.h
example1_TIM/FWLib/inc/cortexm3_macro.h
example1_TIM/FWLib/inc/stm32f10x_adc.h
example1_TIM/FWLib/inc/stm32f10x_bkp.h
example1_TIM/FWLib/inc/stm32f10x_can.h
example1_TIM/FWLib/inc/stm32f10x_crc.h
example1_TIM/FWLib/inc/stm32f10x_dac.h
example1_TIM/FWLib/inc/stm32f10x_dbgmcu.h
example1_TIM/FWLib/inc/stm32f10x_dma.h
example1_TIM/FWLib/inc/stm32f10x_exti.h
example1_TIM/FWLib/inc/stm32f10x_flash.h
example1_TIM/FWLib/inc/stm32f10x_fsmc.h
example1_TIM/FWLib/inc/stm32f10x_gpio.h
example1_TIM/FWLib/inc/stm32f10x_i2c.h
example1_TIM/FWLib/inc/stm32f10x_iwdg.h
example1_TIM/FWLib/inc/stm32f10x_lib.h
example1_TIM/FWLib/inc/stm32f10x_map.h
example1_TIM/FWLib/inc/stm32f10x_nvic.h
example1_TIM/FWLib/inc/stm32f10x_pwr.h
example1_TIM/FWLib/inc/stm32f10x_rcc.h
example1_TIM/FWLib/inc/stm32f10x_rtc.h
example1_TIM/FWLib/inc/stm32f10x_sdio.h
example1_TIM/FWLib/inc/stm32f10x_spi.h
example1_TIM/FWLib/inc/stm32f10x_systick.h
example1_TIM/FWLib/inc/stm32f10x_tim.h
example1_TIM/FWLib/inc/stm32f10x_tim1.h
example1_TIM/FWLib/inc/stm32f10x_type.h
example1_TIM/FWLib/inc/stm32f10x_usart.h
example1_TIM/FWLib/inc/stm32f10x_wwdg.h
example1_TIM/FWLib/src/stm32f10x_adc.c
example1_TIM/FWLib/src/stm32f10x_bkp.c
example1_TIM/FWLib/src/stm32f10x_can.c
example1_TIM/FWLib/src/stm32f10x_crc.c
example1_TIM/FWLib/src/stm32f10x_dac.c
example1_TIM/FWLib/src/stm32f10x_dbgmcu.c
example1_TIM/FWLib/src/stm32f10x_dma.c
example1_TIM/FWLib/src/stm32f10x_exti.c
example1_TIM/FWLib/src/stm32f10x_flash.c
example1_TIM/FWLib/src/stm32f10x_fsmc.c
example1_TIM/FWLib/src/stm32f10x_gpio.c
example1_TIM/FWLib/src/stm32f10x_i2c.c
example1_TIM/FWLib/src/stm32f10x_iwdg.c
example1_TIM/FWLib/src/stm32f10x_lib.c
example1_TIM/FWLib/src/stm32f10x_nvic.c
example1_TIM/FWLib/src/stm32f10x_pwr.c
example1_TIM/FWLib/src/stm32f10x_rcc.c
example1_TIM/FWLib/src/stm32f10x_rtc.c
example1_TIM/FWLib/src/stm32f10x_sdio.c
example1_TIM/FWLib/src/stm32f10x_spi.c
example1_TIM/FWLib/src/stm32f10x_systick.c
example1_TIM/FWLib/src/stm32f10x_tim.c
example1_TIM/FWLib/src/stm32f10x_tim1.c
example1_TIM/FWLib/src/stm32f10x_usart.c
example1_TIM/FWLib/src/stm32f10x_wwdg.c
example1_TIM/project/cortexm3_macro.s
example1_TIM/project/Debug/Exe/example1_TIM.out
example1_TIM/project/Debug/Obj/bsp.o
example1_TIM/project/Debug/Obj/bsp.pbi
example1_TIM/project/Debug/Obj/cortexm3_macro.o
example1_TIM/project/Debug/Obj/example1_TIM.pbd
example1_TIM/project/Debug/Obj/main.o
example1_TIM/project/Debug/Obj/main.pbi
example1_TIM/project/Debug/Obj/stm32f10x_flash.o
example1_TIM/project/Debug/Obj/stm32f10x_flash.pbi
example1_TIM/project/Debug/Obj/stm32f10x_gpio.o
example1_TIM/project/Debug/Obj/stm32f10x_gpio.pbi
example1_TIM/project/Debug/Obj/stm32f10x_it.o
example1_TIM/project/Debug/Obj/stm32f10x_it.pbi
example1_TIM/project/Debug/Obj/stm32f10x_lib.o
example1_TIM/project/Debug/Obj/stm32f10x_lib.pbi
example1_TIM/project/Debug/Obj/stm32f10x_nvic.o
example1_TIM/project/Debug/Obj/stm32f10x_nvic.pbi
example1_TIM/project/Debug/Obj/stm32f10x_rcc.o
example1_TIM/project/Debug/Obj/stm32f10x_rcc.pbi
example1_TIM/project/Debug/Obj/stm32f10x_tim.o
example1_TIM/project/Debug/Obj/stm32f10x_tim.pbi
example1_TIM/project/Debug/Obj/stm32f10x_vector.o
example1_TIM/project/Debug/Obj/stm32f10x_vector.pbi
example1_TIM/project/example1_TIM.dep
example1_TIM/project/example1_TIM.ewd
example1_TIM/project/example1_TIM.ewp
example1_TIM/project/example1_TIM.eww
example1_TIM/project/lnkarm_flash.xcl
example1_TIM/project/lnkarm_ram.xcl
example1_TIM/project/settings/example1_TIM.cspy.bat
example1_TIM/project/settings/example1_TIM.dbgdt
example1_TIM/project/settings/example1_TIM.dni
example1_TIM/project/settings/example1_TIM.wsdt
example1_TIM/project/settings/example1_TIM_Debug.jlink
example1_TIM/project/stm32f10x_flash.icf
example1_TIM/project/stm32f10x_ram.icf
example1_TIM/project/stm32f10x_vector.c
example1_TIM/project/Debug/Exe
example1_TIM/project/Debug/List
example1_TIM/project/Debug/Obj
example1_TIM/FWLib/inc
example1_TIM/FWLib/src
example1_TIM/project/Debug
example1_TIM/project/settings
example1_TIM/App
example1_TIM/FWLib
example1_TIM/project
example1_TIM

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com