Re: 計時器問題
|
||||
---|---|---|---|---|
高級會員
|
回R大 謝謝你
問題已經解決了 感恩
發表於: 2009/10/22 10:50
|
|||
|
Re: 計時器問題
|
||||
---|---|---|---|---|
版主
|
看一下 C:\Program Files\Microchip\MPLAB C30\support\peripheral_30F_24H_33F.timer.h 檔案裡的定義。
Timer2 的 SYNC 基本上就有了,他無法像 Timer1 (Type A) 一樣有 SYNC 選擇的 Options。所以刪掉它。
發表於: 2009/10/22 10:35
|
|||
|
Re: 計時器問題
|
||||
---|---|---|---|---|
版主
|
dsPIC30F4011 的Timer 基本上的使用方式都一樣,timer.h 的定義也都一樣。只有 Sync 的位置不一樣而已。
auto-psv 在新版的 C30 Use's Guide 有說明,搜尋一下 pdf 檔。
發表於: 2009/10/22 10:17
|
|||
|
Re: 計時器問題
|
||||
---|---|---|---|---|
高級會員
|
請問各位大大:
Timer1和timer2和3 只有同步與非同步的差別 是不是用Timer2和3要寫入特別的宣告??
發表於: 2009/10/21 23:42
|
|||
|
計時器問題
|
||||
---|---|---|---|---|
高級會員
|
各位大大
我原先計時器中斷程式為 ConfigIntTimer1( T1_INT_PRIOR_3& T1_INT_ON) ; OpenTimer1(T1_ON & T1_GATE_OFF &T1_PS_1_256& T1_SYNC_EXT_OFF &T1_SOURCE_INT,0xE100); 實驗可以RUN 但是後來改為用TIMER2卻出現錯誤 void __attribute__((interrupt,auto_psv)) _T2Interrupt(void) { LATEbits.LATE0=!LATEbits.LATE0; IFS0bits.T2IF=0; } void T2_initial(void) { ConfigIntTimer2( T2_INT_PRIOR_3& T2_INT_ON) ; OpenTimer2(T2_ON & T2_GATE_OFF &T2_PS_1_256& T2_SYNC_EXT_OFF &T2_SOURCE_INT,0xE100); } 請問為何會這樣 auto_psv這個是代表什麼意思 書上比較沒提到
發表於: 2009/10/21 21:42
|
|||
|