Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem External interrupt RB0/INT in pic16f877

Status
Not open for further replies.

sanaprog

Newbie level 6
Joined
Aug 5, 2011
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,395
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....
 

Re: prolem External interrupt RB0/INT in pic16f877

What compiler are you using? And did you disable the watchdog timer in your configuration bit settings?

BigDog
 

Re: prolem External interrupt RB0/INT in pic16f877

THANKS for the reply...i am using mikro-c8....n how 2 set wdt off in mikro C...??in mPLAB i know its just ...#pragma config WDT = OFF... bt in mikro c:sad:
 

Re: prolem External interrupt RB0/INT in pic16f877

To set the Configuration Bits in MikroC,

Goto Menu:

"Project" -> "Edit Project ..."

MikroCConfigBits.jpg

BigDog
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top