In SX Microcontrollers, SX/B Compiler and SX-Key Tool, baba40 wrote: Hi to all who are contributing to this dialogue. I especially want to thank Chris and Howard for their recent contributions. I hope it is not premature to say that I am somewaht releaved to learn that I am not going nuts! The logic is so simple that I originally thought I was over looling something obvious (may not be out of the woods on that, yet). Just a brief note on the use of assembler for the ISR return. While the SX/B compiler allows you to to replace "retiw" and the use of the offset (in this case -50), when I tried it, it did not work properly. While the code executed, it appeared that the timing loop slowed down by one or two orders of magnitude so that instead of executing: if minutes<>1 then iout 'set for a one minute period for debugging and causing the process to fall out of the interrupt after one minute, it would take over 10 minutes. By replacing "RETURNINT" (supposedly you do not need to include the offset value[-50] as with "retiw") with the following snippet of assember, I was able to restore the correct timing created by the interrupt code. iout: ASM mov w,#-50 'Interrupt very 1us retiw ENDASM I look forward to the continuing dialogue on this issue and want to thank Chris (and perhaps others withing Parallax), Howard and all those who have and may add their insights going forward. Thanks for your help with this and the restoration of my mental health (I hope). Baba40 ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=363831#m366644 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)