本例展示了如何設(shè)置TIM工作在輸出比較-非主動(dòng)模式(Output Compare Inactive mode),并產(chǎn)生相應(yīng)的中斷。 TIM2時(shí)鐘設(shè)置為36MHz,預(yù)分頻設(shè)置為35999,TIM2計(jì)數(shù)器時(shí)鐘可表達(dá)為: TIM2 counter clock = TIMxCLK / (Prescaler +1) = 1 KHz 設(shè)置TIM2_CCR1寄存器值為1000, CCR1寄存器值1000除以TIM2計(jì)數(shù)器時(shí)鐘頻率1KHz,為1000毫秒。因此,經(jīng)過(guò)1000毫秒的時(shí)延,置PC.06輸出為低電平。 同理,根據(jù)寄存器TIM2_CCR2 、TIM2_CCR3和 TIM2_CCR4的值,經(jīng)過(guò)500毫秒的時(shí)延,置PC.07輸出為低電平;經(jīng)過(guò)250毫秒的時(shí)延,置PC.08輸出為低電平;經(jīng)過(guò)125毫秒的時(shí)延,置PC.09輸出為低電平。 輸出比較寄存器的值決定時(shí)延的大小,當(dāng)計(jì)數(shù)器的值小于這個(gè)值的時(shí)候,點(diǎn)亮與PC.06-PC.09相連的LED;當(dāng)計(jì)數(shù)器的值達(dá)到這個(gè)值得時(shí)候,產(chǎn)生中斷,在TIM2的4個(gè)通道相應(yīng)的中斷里,把它們一一關(guān)閉。
標(biāo)簽: Inactive Compare Output mode
上傳時(shí)間: 2013-12-20
上傳用戶:ghostparker
Radix-2 Fast Fourier Transform, real or complex sin/cos transform
標(biāo)簽: Transform transform Fourier complex
上傳時(shí)間: 2013-12-30
上傳用戶:rocketrevenge
DSP算法 Exercise the rfft function for real FFTs
標(biāo)簽: Exercise function rfft FFTs
上傳時(shí)間: 2017-02-21
上傳用戶:wys0120
DSP算法(ANSI_C) PROGRAM TO DEMONSTRATE REAL TIME FILTERING USING fir_filter() AND iir_filter()
標(biāo)簽: DEMONSTRATE fir_filter iir_filter FILTERING
上傳時(shí)間: 2013-12-14
上傳用戶:vodssv
icreate i5128 usb controller development tool. Resize your fake i5128 base usb device to real size. Tweak other settings too.
標(biāo)簽: i5128 development controller usb
上傳時(shí)間: 2013-12-30
上傳用戶:bjgaofei
icreate i5127 usb controller development tool. Resize your fake i5127 based usb device to real size. Tweak other settings too.
標(biāo)簽: i5127 development controller usb
上傳時(shí)間: 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.
標(biāo)簽: ThreadX Multithreading Designations real-time
上傳時(shí)間: 2013-12-18
上傳用戶:ZJX5201314
Tim duong di trong me cung mot thuat toan kha hay
標(biāo)簽: duong trong thuat cung
上傳時(shí)間: 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.
標(biāo)簽: driver application encapsulate TouchPanel
上傳時(shí)間: 2013-12-23
上傳用戶:xuanchangri
Real working watchdog
標(biāo)簽: watchdog working Real
上傳時(shí)間: 2017-03-15
上傳用戶:jennyzai
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1