• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問有關INTx外部中斷的問題....
#7
版主
版主


查看用戶資訊
RB Port Change 是指 只要 RB4~RB7 只要有任何一隻腳的電壓變化就可以透過此機制直接產生中斷,可以參考右邊範例程式裡的第四項範例就知道了。

發表於: 2005/9/3 11:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關INTx外部中斷的問題....
#6
高級會員
高級會員


查看用戶資訊
Sorry....
在此再補上一個問題....煩請指教....

請問INTCON中的RBIE的RB Port Change是啥功能...
請問有人能告訴我嗎..!!!!

謝謝..

發表於: 2005/8/31 13:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關INTx外部中斷的問題....
#5
高級會員
高級會員


查看用戶資訊
Sorry......
目前已經可以動了...
我忘了指定INT2為High priority....指定之後就可以了..

不過目前又有一個新的問題了....
它只會中斷一次......

我在中斷後已經將INT2IF清為0了....
不過就是只能中斷一次...

煩請指教...謝謝..

發表於: 2005/8/30 20:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關INTx外部中斷的問題....
#4
高級會員
高級會員


查看用戶資訊
Sorry...補上我的中斷設定.....

void InitializeINT(void)
{
//Clear all Interrupt setting & Flag
PIR1=0;
PIR2=0;
INTCON=0;
INTCON2=0;
INTCON3=0;
PIE1=0;
PIE2=0;

//Enable priority interrupts
RCONbits.IPEN=1;
RCONbits.RI=0;
// Disable Low Priority Interrupt
INTCONbits.GIEL=0;

//disable global and enable TMR0 interrupt
INTCON = 0x20;
//TMR0 high priority
INTCON2 = 0x04;

//enable priority levels
RCONbits.IPEN = 1;

//enable interrupts
INTCONbits.GIEH = 1;

請問這樣設定可以嗎..?





發表於: 2005/8/30 14:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關INTx外部中斷的問題....
#3
高級會員
高級會員


查看用戶資訊
Sorry....沒寫詳細....

PIC18F2455
C18

目前有兩個問題...
1.中斷的寫法(結構)
2.中斷設定(Register)...

#pragma code interrupt_vector_section=0x0008
void interrupt_vector(void)
{
_asm goto isr_high _endasm
}
#pragma code


我用的中斷是INT2(RB2),上面有接一個按鍵(平常為Hi),...
如果我的INT設定無誤..那我按下按鍵(為Lo)..PIC會跳到上面那段程式執行嗎..?

#pragma interrupt isr_high
void isr_high(void)
{
if(INTCON3bits.INT2IF==1)
{
PORTBbits.RB3 = 0;
Delay1KTCYx(150);
PORTBbits.RB3 = 1;
Delay1KTCYx(200);
PORTBbits.RB3 = 0;

INTCON3bits.INT2IF=0;
}
}

這是我的中斷服務副程式.....

可是目前不會動..
煩請版主...救救我ㄚ..!!....謝謝..

發表於: 2005/8/30 14:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關INTx外部中斷的問題....
#2
版主
版主


查看用戶資訊
PIC16 , PIC18 or dsPIC30 ?
那一家的 C (Hi-Tech , CCS, IAR, Microchip) or Assembly ?

發表於: 2005/8/30 11:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問有關INTx外部中斷的問題....
#1
高級會員
高級會員


查看用戶資訊
請問哪裡有"INTx外部中斷"的相關範例...?
或是誰能告訴我它的程式架構(寫法).....?
謝謝..

發表於: 2005/8/30 10:57
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... ]

教育訓練中心

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