| ??? 06/06/02 13:02 Read: times |
#24009 - RE: 8051 vs microchip pic / Peter |
Peter Dannegger wrote: ---------------------- I give also a try to the PIC family (SX18), but I found no way to use external interrupts and lose no timer interrupt at the same time. But this was impossible, since always the same interrupt vector was used and no timer interrupt pending flag exist, which can be checked. In my opinion the possibility to lose interrupts point to an extremely bad design and so I stopped further using of the PICs. Peter is mistaken here about pics, its true that there is one interrupt vector and you have to poll the interrupt flags to see which interrupt to service but there is no chance of missing interrupts because when one interrupt is serviced the isr will not go back to the forground program as long as another (enabled) interrupt flag is set. Thats why the pic hangs up in interrupt loop if you dont clear the interrupt flag in software after it has been serviced. maybe his english is bad and he means to say that 8051 is more advanced in interrupt handling because it has 2 levels of interrupt priorities, if he gives timer1 a priority it will interrupt the interrupt and gets serviced in time. This is true to a certain extent but we usually keep the interrupt as short as possible and do most of the work in the forground. Also the speed difference between pics and most 8051 members minimises this effect. Regards Mahmood |



