At 08:19 PM 10/9/01 +1000, brah wrote: >Olin Lathrop wrote: > > > > > You can only do this for real on an 18 family PIC. On the other PICs, > there > > is no way to pop a stack location and then continue returning to previous > > stack locations. > > > > ******************************************************************** >Yes, it's a problem not worth pursuing, I think! >I'm trying a new approach by avoiding the "interrupt - retfie" track, >and merely testing for a timer interrupt flag at appropriate places >within the program where there can be endless loops. If the only purpose of the interrupt is to set a flag when the timer wraps, there is no need for the interrupt! Just test the timer interrupt flag. In other words, the timer interrupt (T0IE) is disabled and can't cause an interrupt. Clear T0IF during initialization, then periodically test T0IF during execution of your code. Even though the TMR0 interrupt itself is disabled, the interrupt flag still works. Be sure to clear T0IF after you have done whatever processing needs to be done with it. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 17 years of Engineering Innovation (1984 - 2001) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads