I just looked at your code and everything's fine except the readoing of PORTB and the clearing of the interrupt pending status in INTCON I'd also be interested to hear when you have finished your RS232 routine. Any chance of posting the final result? Thanks Pete > -----Original Message----- > From: ext Peter Betts [mailto:ext-peter.betts@NOKIA.COM] > Sent: Thursday, February 22, 2001 7:29 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] 16F84 -> RB0/INT-interrupt only once after wakeup ? > > > Yes the spec for the 16F84 says you have to > > make a read of PORTB and > THEN > Clear the interrupt flag > > Note: BOTH! > > I've done this inside the ISR and it's fine. > > movf PORTB,w > bcf INTCON,XXX ; Clear pending interrupt flag > > > Don't quote me on the "XXX" bit I cannot remember the exact flag, it's > something like RBE ?. It's in the register descriptions. Note > there's one > flag in the register to turn the interrupt on (RBE ?) and one which > indicates a pending interrupt. You need to turn the interrupt > on once in the > background main loop of your code and then clear the pending > flag each time > the interrupt service routine is called. > > Also remember that the interrupt vector table calls only one > function upon > interrupt (the goto at address 04). You have to read the status of the > interrupts and determine where it came from :-) > > Hope that helped. > > Pete > > > > My interrupt routine only runs once. After powering up, the > > > instruction > > > works fine once, the next time a interrupt occurs the PC > doesn't go > > > to > > > 04h, but the main routine keeps running. Is this normal for a > > > RB0/INT-port > > > on a 16f84 ? I use the RB0/INT-port because i can detect a falling > > > edge > > > (rs-232 startbit) there. > > > > > > Milan. > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics