• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: 計時器問題
#6
高級會員
高級會員


查看用戶資訊
回R大 謝謝你
問題已經解決了

感恩

發表於: 2009/10/22 10:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 計時器問題
#5
版主
版主


查看用戶資訊
看一下 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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 計時器問題
#4
高級會員
高級會員


查看用戶資訊
回RYANG版大

當我把計時器從TIMER1換成TIMER2或其他TIMER
會出現

T2_SYNC_EXT_OFF' undeclared (first use in this function)
(Each undeclared identifier is reported only once

此行錯誤
小弟不太曉得他們的Sync的位置差別在哪??

可能要請你指導一下或者有其參考的paper



PS. C30 Use's Guide已找到 謝謝你

發表於: 2009/10/22 10:28
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 計時器問題
#3
版主
版主


查看用戶資訊
dsPIC30F4011 的Timer 基本上的使用方式都一樣,timer.h 的定義也都一樣。只有 Sync 的位置不一樣而已。

auto-psv 在新版的 C30 Use's Guide 有說明,搜尋一下 pdf 檔。

發表於: 2009/10/22 10:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 計時器問題
#2
高級會員
高級會員


查看用戶資訊
請問各位大大:

Timer1和timer2和3
只有同步與非同步的差別
是不是用Timer2和3要寫入特別的宣告??

發表於: 2009/10/21 23:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


計時器問題
#1
高級會員
高級會員


查看用戶資訊
各位大大

我原先計時器中斷程式為
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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------