> From: DREITEK > In a message dated 98-03-12 13:18:02 EST, you write: > > You certainly can do this on a PIC! At the start of the interupt routine you > simply check the INTCON reg to see what generated the interupt and jump > accordingly. > > Then Motorolla parts have different kinds of interupts, thus the different > vectors. One vector for an IRQ and another for the NMI another for SWI etc. > It still won't tell you what device generated the interupt, You have to resort > to polling the devices inside the interupt routine. > > Dave Duley > The difference between Motorola (at least the 68000-series) and PIC is that a Motorola processor has different priorities on the interrupts. One interrupt can interrupt another so to speak. On a PIC only one interrupt at a time is allowed to execute. If an interrupt is triggered when the PIC is already in the interrupt service routine the PIC waits for the retfie instruction before this interrupt is processed. There is a way around this of you enable the global interrupt bit at the beginning of the ISR, but this leads to code that is very hard to debug and there can be effects which are hard to predict. Danjel McGougan