Hi, I'm doing a project with a 80C32 processor. I'm lacking, however, interrupts. Is there a (tricky) way to have more than the standard provided interrupts at your disposal? --Geert
I think you can have two or more interupts on the same pin.. Inside the interrupt routine you have to check which source caused that interrupt (for example: you can have the external interrupt sources place a certain word on one of the ports or simply make one of the port pins go low) but of course you have to be sure that no 2 interrupts on the same pin can occcur simultaneously.. Hope I was helpful..
I assume by "tricky" you mean something other than dropping an external interrupt controller onto the board?
Hi, If you have spare pins available on your micro, you could try (wire) anding all your external interupt sources together and feeding that resultant signal to an interrupt pin but you also have to connect each interrupt source to a separate pin that you can then test to see what caused the interrupt. The interrupt is set as edge rather than level triggered and once you hit the routine you MUST check all of the interrupt sources's (by checking each of the port pins you have connected them to) to ensure that you pick up (near) simultaneous interrupts because only one irq request will be generated. Also DONT clear the interrupt flag (e.g. clr EX0) within the routine as it is perfectly possible that a new irq can occur once you are inside the irq. I seem to recall that we also had a status flag for each irq source that was set to TRUE/FALSE within the interrupt so that we could tell if we had alredy detected this source and take appropriate action if need be. You must also be careful that in the worst case that all interrupting source's servicing doesnt take too long such that whilst you are processing them that one of the other sources doesnt have time to go inactive before it can be processsed otherwise you will not know about it. Hope this helps, Mark.
View all questions in Keil forum