用的是PIC16F1503,代码如下,为什么程序进不了中断呢?求大神帮忙看看
#include <stdio.h>
#include <stdlib.h>
#ifndef __PICCPRO__
#define __PICCPRO__
#endif
#include <htc.h>
__CONFIG(0x0860);
__CONFIG(0x0801);
__IDLOC(0000);
#define INTOSCFrequency 1000000
#define _XTAL_FREQ INTOSCFrequency
unsigned int int_delay_time=50000;
int main(void)
{
IRCF3 = 1;
IRCF2 = 0;
IRCF1 = 1;
IRCF0 = 1;
SCS1 = 1;
__delay_us(200);
TRISA=0x04;
INTEDG=0;
INTF=0;
INTE=1;
GIE=1;
TRISC=0x30;
PORTC=0x30;
while(1);
return (EXIT_SUCCESS);
}
void interrupt ISR(void)
{
if (INTF==1)
{
INTF=0;
}
PORTC |=0x0F;
}
|