>-----Original Message----- >From: Jan-Erik Soderholm XA (TN/PAC) >[mailto:jan-erik.xa.soderholm@ERICSSON.COM] >Sent: 06 January 2004 13:27 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] getting serial overrun on 16F877 in HT PICC? >Let the TMR1IF generate an interrupt (as now). Then in the ISR >just set your own "PID-flag" saying that your PID routine has >to be run now (or rather "soon"). Then leave the ISR and let >your main-loop detect your PID-flag and run the PID code. >During that time, you are able to service other interrupts >like the UART receive interrupt. Note that there is no need to even have an interrupt if it's only purpose is to set a flag. Simple using the TMR1IF flag in the main loop will work fine without the extra interrupt overhead. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu