sanaprog
Newbie level 6
int run=0;
void interrupt(void){
INTCON.INTF = 0;
portd=~portd;
}
void main()
{
TRISB = 0x01;
PORTB=0;
TRISd = 0x00;
portd=0x3f;
INTCON.GIE = 1;
INTCON.INTE = 1;
intcon.intf=0;
INTCON.PEIE = 0;
OPTION_REG.INTEDG = 1;
do
{
}while(1);
}
can anyone tell me what is the wrong with this code...interrupt occurs but it returns to 0 if interrupt not given within few seconds....
void interrupt(void){
INTCON.INTF = 0;
portd=~portd;
}
void main()
{
TRISB = 0x01;
PORTB=0;
TRISd = 0x00;
portd=0x3f;
INTCON.GIE = 1;
INTCON.INTE = 1;
intcon.intf=0;
INTCON.PEIE = 0;
OPTION_REG.INTEDG = 1;
do
{
}while(1);
}
can anyone tell me what is the wrong with this code...interrupt occurs but it returns to 0 if interrupt not given within few seconds....