hi m trying to make a led status reverse on interrupt using pic16f684.below is the code...cant find the mistake...please help..the code isnt running
#include<pic16f684.h>
#define PORTBIT(adr, bit) ((unsigned)(&adr)*8+(bit))
static bit Led1 @ PORTBIT(PORTC, 5);
static bit Led1_tris @ PORTBIT(TRISC, 5);
static void interrupt isr ()
{
if(INTF)
{
Led1=1;
INTF=0;
INTE=1;
PEIE=1;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
void main(void){
TRISC=0x00;
PORTC=0x00;
TRISA=0x00;
PORTA=0x00;
CMCON0=0;
ANSEL=0;
GIE=1;
PEIE=1;
INTE=1;
INTF=0;
WPUA2=1;
RAIE=1;
IOCA=0x0F;
INTEDG=1;
Led1=0;
for( ; ; )
{
}
}