Searching \ for '[PIC]: RB0 Interrupt problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'RB0 Interrupt problems'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: RB0 Interrupt problems'
2001\07\26@103744 by brah

flavicon
face
Hi All
I have found it difficult to get the RB0 interrupt working, and I've
tried on many occasions, with F86 F876 and F877.
I do all the right things, as per various books and notes.  I save
status and w, I branch to the routine, I came back and restore status
and w, and retfie.
All this seems to work, but if I make options,intedg falling edge (or
rising)I still get an interrupt on the opposite edge.
I have a simple reed switch on the pin, held high (or low) with 1K, and
switched low (or high)  I get an interrupt when the switch closes, and I
get another when the switch opens.
Switch bounce is most likey a problem, but even a 1 mS delay in the
routine doesn't always cure it, and I still get the 2nd interrupt
occasionally.
Is an external interrupt a really reliable way to get external events?
Is there a trick to it that I can't find to read about?  Has anyone had
really good results with RB0 int?
       thanks and regards to all.
       Howard

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\07\26@113604 by Dan Michaels

flavicon
face
Brah wrote:
.......
>Switch bounce is most likey a problem, but even a 1 mS delay in the
>routine doesn't always cure it, and I still get the 2nd interrupt
>occasionally.


Try a "much" longer debounce delay. 1 msec is far too short
for any mechanical devices that bounce.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\07\26@114421 by Roman Black

flavicon
face
Dan Michaels wrote:
>
> Brah wrote:
> .......
> >Switch bounce is most likey a problem, but even a 1 mS delay in the
> >routine doesn't always cure it, and I still get the 2nd interrupt
> >occasionally.
>
> Try a "much" longer debounce delay. 1 msec is far too short
> for any mechanical devices that bounce.


And take a tip from a hardware guy, use an RC network
on your reed switch, they are awful things for bounce.
Assuming the reed will not be switched at high frequencies
or anything, you can use one R and one C to give you
big (50mS+ ??) delays and eliminate those chatters.
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...