本例展示了如何設置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