![]() |
![]() |
![]() |
|
|
|||||||
| Datasheet/Parts Requests Request a datasheet or enquire about part equivalents and/or difficult-to-find parts here. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
I remember in one of my university classes discussing a device refered to as a "Priority Interrupt Controller". The device allows you to service many interrupts with only a single external interrupt on a microprocessor/controller.
The interrupt controller basically monitors a set of 8 (or more) inputs and when one of them is activated, it puts the interrupt in a queue and sends an interrupt to the micro. The micros interrupt service routine then queries the interrupt controller and proceeds to empty the queue of interrupts, servicing each one as it goes. Does anybody know of a device like this? I've considered just using a big or gate but that makes it more difficult to figure out which of the eight devices triggered the interrupt and others could be ignored if they are asserted and removed while other interrupts are active. I've also considered using a 8-to-1 decoder, but then you get a problem when multiple interrupts occur at the same time. Let me know what suggestions you have. I'd like to try and keep this down to a single device. Maybe I'll end up having to use another smaller micro and just program it to behave in this way. |
|
|
|
|
|
|
(permalink) |
|
Probably better if you mention what you're trying to do, and what processor you're using?.
|
|
|
|
|
|
|
(permalink) |
|
I'm using a PIC mcu, and I'd like to have 8 external interrupts with a minimum number of pins.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
But you might try looking at 'interrupt on change on PortB'. |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Look here: http://www.intersil.com/data/an/an109.pdf
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Lefty |
||
|
|
|
|
|
(permalink) |
|
a well known PIC is 82C59 but requires 8+ i/o lines for access
is better if you can find a serial access PIC |
|
|
|
|
|
|
(permalink) |
|
You have still to answer Nigel's question regarding what it is you are trying to do. It makes a difference.
You could program a 2nd PIC to act as an interrupt controller. Again it depends on you application.
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, Homepage The 15 Minute Printed Circuit Board! (+drill time) |
|
|
|
|
|
|
(permalink) |
|
Hey,
Well, I've got 8 16-bit I/O expanders configured as inputs and they each have their own interrupt line. When I receive an interrupt from the expanders I'd like to be able to quickly determine which expander caused the interrupt and service it. I've looked at the 82C59 device, but as mentioned it doesnt seem like it will save me much in terms of I/O on the PIC. Earlier I wasnt aware of any external interrupts other than on Port E, but my compiler does seem to support interrupts for the other ports as well, although oddly enough they dont cover the entire ports. I think I'll end up using A0-A4 and C4-C7 for my interrupts. |
|
|
|
|
|
|
(permalink) |
|
hi,
For reference, look at the HEF4532B, 8 input priority encoder.
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
Quote:
|
|||
|
|
|
|
|
(permalink) |
|
Get one more I/O expander, hook up the 8 interrupts to its inputs. Then just hook the interrupt to one input on the MCU.
Last edited by mneary; 11th September 2007 at 12:53 AM. |
|
|
|
|
|
|
(permalink) |
|
I tried that, didnt work too well because the I/O expander only remembers the state of the inputs at the last time *any* of the inputs change.
The problem is that the interrupt lines dont go high and remain high until serviced, they just fire a pulse. When the expander senses an interrupt on its input lines, it overwrites its internal buffer with the current state of the inputs. So in the event that an interrupt occurs and then another interrupt occurs before the first one has been serviced, the first one is forgotten. I think I should be able to use straight I/O pins on the PIC to handle the interrupts. |
|
|
|
|
|
|
(permalink) |
|
Can you disclose what I/O expander you're using? Why is it so hard to get this information from you?
We really want to help. |
|
|
|
|
|
|
(permalink) |
|
the expander I have been trying is the MCP23016, but I am most likely switching to the MAX7313 for its added LED intensity control.
|
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Help with timer and interrupt please.. | AntRoFiZ | Micro Controllers | 2 | 29th May 2007 11:48 AM |
| what is a microcontroller made of ? | pinblaster73 | Micro Controllers | 9 | 16th May 2007 04:48 AM |
| Question about Interrupt | tinhnho | Micro Controllers | 3 | 11th February 2007 07:07 PM |
| Xbox 360 Tilt Controller | adamthole | Electronic Projects Design/Ideas/Reviews | 0 | 20th January 2007 05:24 PM |
| HANDLING THE INTERRUPT. | alamy | Micro Controllers | 6 | 26th March 2005 03:37 PM |