piclist 2001\02\22\022923a >
Thread: 16F84 -> RB0/INT-interrupt only once after wakeup ?
www.piclist.com/techref/microchip/ints.htm?key=interrupt
picon face BY : Peter Betts email (remove spam text)



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

{Quote hidden}

--
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


<FFD4860870E0D2119F8C0008C78949800462283A@caeis01nok.europe.nokia.com>

See also: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) 16F84 -> RB0/INT-interrupt only once after wakeup ?

month overview.

new search...