Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/05/04 12:17
Read: times


 
#66038 - RE: 16 ext. interrups sources
Responding to: ???'s previous message
hi,
I suggest you to use external PLD. I have used it for such purpose once. Look at the picture below (it was modifyed a little due my project was more complex):



Who-is-who here:
nRST - negative level clears interrupt flags (provided with external SV chip). May be ejected, but the first read will return not defined result then.
pINT - interrupt request flag (output positive).
nINT - input for low level interrupt event. Input signal should be debounced and must have minimal width not less than 6T (for standard parts; for custom chips it must not be less than /RD width, including stretch cycles!).
nRD - read signal provided from a decoder of the external memory access.

How does it work:

There are 8 such modules. Their pINTs are combined to one byte (D7..0) which may be read as external memory location with MOVX command. As well, they are connected to 8NOR gate, which output is connected to /INT0.

So, after reset, all DFFs are cleared, 8NOR gate produces high level to /INT0 which is configured as level-activated (it is important!)
Now a negative event occures for one or more modules. Each event are lock-upped by DFF-OR2 loop back. At the same time, one or more pINT outputs produce high level. 8NOR gate outputs low level to /INT0 of MCU.
My program goes to its ISR and do read "virtual interrupt port" with MOVX command then puts "image byte" into software FIFO buffer which is analysed latter in main().
By this read corresponded DFFs are cleared as well and so nINT inputs are ready to accept new events again.

For 16 inputs you may use /INT1 and one more external address for "virtual" port.

Now about timings. As I said, input pulse of interrupt event must be more than /RD width. And the sequence of events must not be more than worst case of ISR response Time (9 cycles + ISR time) otherwise second event has chance to be lost. As well, you need with enough FIFO buffer and be ready that it may be overflooded when interrupts come often and often. Moreover, due /INT0 is level activated then you should be ready for that its ISR "eats" all productivity.

Regards,
Oleg

List of 8 messages in thread
TopicAuthorDate
16 ext. interrups sources            01/01/70 00:00      
   RE: 16 ext. interrups sources            01/01/70 00:00      
      Triscend            01/01/70 00:00      
   RE: 16 ext. interrups sources            01/01/70 00:00      
   RE: 16 ext. interrups sources            01/01/70 00:00      
   RE: 16 ext. interrups sources            01/01/70 00:00      
      RE: 16 ext. interrups sources            01/01/70 00:00      
   RE: 16 ext. interrups sources            01/01/70 00:00      

Back to Subject List