View previous topic :: View next topic |
Author |
Message |
joshkeys
Joined: 16 Aug 2005 Posts: 37 Location: Fredericton,NB
|
PIC with 4 external interrupts |
Posted: Fri Feb 16, 2007 10:00 am |
|
|
Hello,
Just a quick question. i am curious if there is any PIC's with at least 4 external interrupts.. I saw an old datasheet of the PIC 18F4431 with 4 ineterrupts..but when i go on the microchip site, it only shows 3 external interrupts like most PICs. I need it to be a 40 pin DIP..
Thanks,
Josh |
|
|
Ttelmah Guest
|
|
Posted: Fri Feb 16, 2007 10:37 am |
|
|
Remember you can use CCP inputs potentially as an interrupt. You can program these to capture on every falling, or rising edge, and simply ignore the count involved. Using one of these (or both!), allows any PIC with three external interrupts to behave as if it has four.
Best Wishes |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Fri Feb 16, 2007 11:18 am |
|
|
You can also use the RB interrupt as well. Since it fires whenever there is a change in B4 - B7, it's up to you to keep track of what happened (i.e. rise, fall, on which pin, etc.) Not overly simple, but not impossible. |
|
|
joshkeys
Joined: 16 Aug 2005 Posts: 37 Location: Fredericton,NB
|
|
Posted: Fri Feb 16, 2007 11:22 am |
|
|
Perfect! I did not feel like multiplexing the interrupts or using the portB interrupt on change as these are critical time constraining interrupts and real estate and extra hardware are an issue.
Thanks!
Josh |
|
|
joshkeys
Joined: 16 Aug 2005 Posts: 37 Location: Fredericton,NB
|
|
Posted: Fri Feb 16, 2007 11:25 am |
|
|
Thanks also newguy, the only problem with that is the extra overhead involved, and the system i am using this on is a critical system that needs immediate response, so determining which pin went may affect performance.
Thanks |
|
|
|