In SX Microcontrollers, SX/B Compiler and SX-Key Tool, electronic wrote: hi SXers I have written an SX28 general purpose pulse generator program that functions as expected. I now wish to use the interrupt routine to modify the program parameters (ie pulse on and off times) while the program is running. My program uses two different pulse generating subroutines depending on the output pulse times; one subroutine uses 8bit time constants (the first 8bits of 32bit word) for narrow/fast pulses, the other subroutine uses 32bit (the complete 32bit word) time constants for wider/slower pulses. The program decides which subroutine to use depending on the number of populated bits in the 32bit word time constants after reading the user input from the up/down keys. I do not wish to check the keyboard during the pulse generating subroutines because this will reduce the maximum frequency and increase the minimum pulse width that can be generated. If the program returns from an interrupt with time constants out of range (after user modification) for the calling subroutine a problem occurs !!!! Is it possible to return from the interrupt routine to a different point than called from? or Is it possible to software reset the processor during the interrupt subroutine to clear the stack and interrupt status? ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=162350 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)