• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   2 Anonymous Users






Re: dspic30f4011如何設定中斷?
#9
版主
版主


查看用戶資訊
參照:
那請問此Reference Manual適用在dsPIC33系列上嗎?
還有
void__attribute__((__interrupt__)) _T2Interrupt()
其中的T2Interrupt()名稱是自行定義的嗎?


不是自行定義的,是 Microchip 在GLD 檔裡設定的中斷定義字。可以將該元件的 gld 檔打開找一下各相關中斷的第一名稱。

建議看一下 dsPIC30F Peripheral 的教育訓練裡的中斷章節。
http://www.microchip.com.tw/modules/w ... glefile.php?cid=4&lid=229

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


Re: dspic30f4011如何設定中斷?
#8
初級會員
初級會員


查看用戶資訊
參照:

master 寫道:
左手邊的下載中心您找過了沒?
另外中斷設定在Datasheet的第五章,不要再說datasheet沒有!!
有關於暫存器設定詳細資料要查Reference Manual

http://ww1.microchip.com/downloads/en/DeviceDoc/70135e_cn.pdf

http://ww1.microchip.com/downloads/en/DeviceDoc/70267b_cn.pdf


那請問此Reference Manual適用在dsPIC33系列上嗎?
還有
void__attribute__((__interrupt__)) _T2Interrupt()
其中的T2Interrupt()名稱是自行定義的嗎?

發表於: 2009/4/19 21:51
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dspic30f4011如何設定中斷?
#7
新會員
新會員


查看用戶資訊
謝謝

發表於: 2009/4/19 11:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dspic30f4011如何設定中斷?
#6
版主
版主


查看用戶資訊
到 30F4011.h 檔裡找一下 _ISR 的定義就知道了。在 H 檔的最後面。

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


Re: dspic30f4011如何設定中斷?
#5
新會員
新會員


查看用戶資訊
那在請問一下
我有看過別人寫的範例程式
他宣告中斷副程式
void _ISR_INT0Interrupt(void)
{
}

這樣寫跟樓上的寫法有什麼差別嗎@@
謝謝指教

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


Re: dspic30f4011如何設定中斷?
#4
版主
版主


查看用戶資訊
在新的 C30 Compiler 有加入對 PSV 的檢查,所以在設定中斷函數時要加入 no_auto_psv 的屬性宣告。


void __attribute__((interrupt, no_auto_psv)) _INT0Interrupt(void)
{
IFS0bits.INT0IF = 0; /* Clear Timer3 interrupt Flag */

LED14= !LED14 ;

}

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


Re: dspic30f4011如何設定中斷?
#3
新會員
新會員


查看用戶資訊
void INT0_Initial( void )
{
TRISEbits.TRISE8 = 1;

INTCON2bits.INT0EP =1 ; /* INT0 interrupt on negative edge */
IFS0bits.INT0IF = 0; /*Reset INT0 interrupt flag */
IEC0bits.INT0IE = 1; /*Enable INT0 Interrupt Service Routine */
}

void __attribute__((__interrupt__)) _INT0Interrupt(void)
{
IFS0bits.INT0IF = 0; /* Clear Timer3 interrupt Flag */

LED14= !LED14 ;

}

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


Re: dspic30f4011如何設定中斷?
#2
資深會員
資深會員


查看用戶資訊
左手邊的下載中心您找過了沒?
另外中斷設定在Datasheet的第五章,不要再說datasheet沒有!!
有關於暫存器設定詳細資料要查Reference Manual

http://ww1.microchip.com/downloads/en/DeviceDoc/70135e_cn.pdf

http://ww1.microchip.com/downloads/en/DeviceDoc/70267b_cn.pdf

發表於: 2009/4/16 23:19
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


dspic30f4011如何設定中斷?
#1
新會員
新會員


查看用戶資訊
請問一下我如果要設定外部中斷
一些暫存器要怎麼設定?
能否請各位先進告訴小弟我
要去哪裡找各暫存器所代表的功能的資料
比方說該份資料會寫某個角位為高電位時就致能中斷之類的
找了好久都找不到@@
datasheet上也沒有
先謝謝各位先進了

發表於: 2009/4/16 21:34
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... ]

教育訓練中心

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