Browsing this Thread:
2 Anonymous Users
|
进不了捕捉中断,烦死了!!
|
|
新會員
Joined
: 2008/3/27 16:32 最後登入時間
: 2008/6/11 10:18
Group:
註冊會員
Level : 1 HP : 0 / 21 MP : 3 / 1047 EXP : 86
|
#include "p33FJ32GP204.h" _FOSCSEL(FNOSC_PRI&IESO_OFF); _FOSC(FCKSM_CSDCMD&OSCIOFNC_ON&POSCMD_XT); _FWDT(FWDTEN_OFF);
unsigned int a;
void main(void) { IPC0bits.IC1IP0=1; IPC0bits.IC1IP1=0; IPC0bits.IC1IP2=0; IFS0bits.IC1IF=0; IEC0bits.IC1IE=1; AD1PCFGL = 0XFFFF; __builtin_write_OSCCONL(OSCCON&0xbf); //unlock RPINR7 = 0x1F04; __builtin_write_OSCCONL(OSCCON|0x40); // lock
TRISB=0XFFFF; T2CON=0X0000; T2CONbits.TON=1; IC1CON=0X0083; while(1) { ; } } void __attribute__((__interrupt__)) _IC1Interrupt( void ) { if(IEC0bits.IC1IE&IFS0bits.IC1IF) { a=IC1BUF; TMR2 = 0; IFS0bits.IC1IF = 0; } }
用其他30或33系列的都可以,就是33FJ32GP204不行,真郁闷.各位大大能不能帮我看下.TKS.
發表於: 2008/6/6 9:17
|
|
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.