本例展示了如何设置TIM工作在输出比较-非主动模式(Output Compare Inactive mode),并产生相应的中断。 TIM2时钟设置为36MHz,预分频设置为35999,TIM2计数器时钟可表达为: TIM2 counter clock = TIMxCLK / (Prescaler +1) = 1 KHz 设置TIM2_CCR1寄存器值为1000, CCR1寄存器值1000除以TIM2计数器时钟频率1KHz,为1000毫秒。因此,经过1000毫秒的时延,置PC.06输出为低电平。 同理,根据寄存器TIM2_CCR2 、TIM2_CCR3和 TIM2_CCR4的值,经过500毫秒的时延,置PC.07输出为低电平;经过250毫秒的时延,置PC.08输出为低电平;经过125毫秒的时延,置PC.09输出为低电平。 输出比较寄存器的值决定时延的大小,当计数器的值小于这个值的时候,点亮与PC.06-PC.09相连的LED;当计数器的值达到这个值得时候,产生中断,在TIM2的4个通道相应的中断里,把它们一一关闭。
标签: Inactive Compare Output mode
上传时间: 2013-12-20
上传用户:ghostparker
Radix-2 Fast Fourier Transform, real or complex sin/cos transform
标签: Transform transform Fourier complex
上传时间: 2013-12-30
上传用户:rocketrevenge
DSP算法 Exercise the rfft function for real FFTs
标签: Exercise function rfft FFTs
上传时间: 2017-02-21
上传用户:wys0120
DSP算法(ANSI_C) PROGRAM TO DEMONSTRATE REAL TIME FILTERING USING fir_filter() AND iir_filter()
标签: DEMONSTRATE fir_filter iir_filter FILTERING
上传时间: 2013-12-14
上传用户:vodssv
icreate i5128 usb controller development tool. Resize your fake i5128 base usb device to real size. Tweak other settings too.
标签: i5128 development controller usb
上传时间: 2013-12-30
上传用户:bjgaofei
icreate i5127 usb controller development tool. Resize your fake i5127 based usb device to real size. Tweak other settings too.
标签: i5127 development controller usb
上传时间: 2017-03-03
上传用户:yyq123456789
RTOS ThreadX Real-time Embedded Multithreading: Using ThreadX and ARM Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where CMP is aware of a trademark claim, the product name appears in initial capital letters, in all capital letters, or in accordance with the vendor鈥檚 capitalization preference. Readers should contact the appropriate companies for more complete information on trademarks and trademark registrations. All trademarks and registered trademarks in this book are the property of their respective holders.
标签: ThreadX Multithreading Designations Real-time
上传时间: 2013-12-18
上传用户:ZJX5201314
Tim duong di trong me cung mot thuat toan kha hay
上传时间: 2017-03-05
上传用户:zycidjl
TouchPanel driver which encapsulate real driver. This driver helps to hook by user application touchscreen(TouchPanel) events before windows process this events.
标签: driver application encapsulate TouchPanel
上传时间: 2013-12-23
上传用户:xuanchangri
Real working watchdog
上传时间: 2017-03-15
上传用户:jennyzai