On May 27, 2005, at 5:59 AM, Farzlina Ab.Hadi wrote: > hello everyone, > i intend to use interrupt driven timer 1 and uart. i set the timer > 1 for 10ms interrupt. is it possible to apply this together with > uart? what if the interrupts occur at the same time ? would my > serial data be lost if i was attending the timer 1 isr? > my main program is to loop for 10 ms and also do serial communication. Very rudimentary stuff. The first interrupt to occur gets serviced first. On exit from the interrupt service routine any new pending interrupt is dispatched. If more than one new then priority is given as documented in the CPU manual. There isn't any problem as long as one does not spend so much time servicing an interrupt that the "sweet spot of opportunity" for other events passes. As for UARTs there is generally a shift register for assembling incoming and a holding register for the previous completed. No data is lost so long as one can read the previous assembled data before the current incoming is complete. -- David Kelly N4HHE, dkelly@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.
Message
Re: [AVR-Chat] interrupts
2005-05-27 by David Kelly
Attachments
- No local attachments were found for this message.