From: Tobias Reneskog <reneskog@swipnet.se>
Reply-To: bascom@grote.net
To: bascom@grote.net
Subject: Re: [bascom] duel interupt
Date: Fri, 31 Aug 2007 22:13:52 +0200
Does the serial interrupt take long to execute?
Unless timer0 has higher priority, it won't interrupt the serial isr.
So if the serial isr takes several mS to execute, you will miss some
interrupts from timer 0.
If possible, make the timer 0 isr execution time shorter than the time it
takes to send one character (rs232), and set timer 0 to a higher priority
than the uart. This way you won't miss any characters even if you flood the
serial port. Unless the serial isr itself takes longer to execute than it
takes to send one character.
Hope that wasn't too messy. I'm really too tired to write anything that
makes sense right now...
Regards
Tobias
devidas bhonde wrote:
Hi,
I am using interrupt based rs232 link to pc.
There is also timer 0 used as millisec clock for a solenoid valve.
Independently both work fine.
but while timer is working, if I send data to the 8052, the timer stops
for that duration.
Something to do with interrupt priorities ?
Please suggest me something...
Regards,
Devidas
_________________________________________________________________
Tried the new MSN Messenger? It?s cool! Download now.
http://messenger.msn.com/Download/Default.aspx?mkt=en-in