In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: pjv, It is fine that you disagree with me and fine for you to so state. That is one of the things that make these forums so helpful and great. People get to discuss and offer advice on different ways to do things. Sometimes differences are really only one opinion versus another. But sometimes someone really does have a better way of doing things. I have learned a great deal from you in the past and respect your opinions and advice, as it seems your statements often come from much thought and experience. If you think it is better to do most of the signal processing outside the ISR, then I am sure that it is. However, at my present programming level (which uses SX/B almost exclusively) I am really only proficient with doing things either inside an ISR or inside a main program loop. Short of your task-switching model I do not know how to run more than two program loops. Within that context it seems better to me to handle time sensitive tasks with the ISR. So yes, I will concede that a/your task-switching scheme might be a better approach than doing heavy processing with the ISR itself. I think either approach can work well if the timing is correct. I certainly think yours is a more adaptable method that once learned can be readily applied to a variety of programming tasks. I wish I had a better grasp of your concept! I have examined your task switching method. I like the idea. If you can show datacps how to use your task-switching methods to accomplish his goals that would be great! I can probably only help with creating a single ISR that handles multiple tasks. This has much more to do with the way I am accustomed to thinking rather than a philosophical belief that it is the best way to accomplish this task. I can recall when a multi-function ISR was a great challenge for me. So I have grown and learned much both from you and many others in these forums. I still struggle with wrapping my mind around the concepts required to enable multiple tasks to be running within different time frames and yet with all parts being short enough that none of them overrun their time allotment and thereby messing up the timing of other processes waiting for a chance to run. I think I understand the concepts in a vague intellectual yet distant way that is similar to studying the grammatical structure of a foreign language without the benefit of actually being able to read and write it. I do hope that some day I will be able to look at multiple tasks needing to run on the same CPU and think, "[I]Ok. No sweat! I'll just pass a few parameters to the cooperative RTOS when the task starts and I should be off and running.[/I]" I do wish that it seemed that simple to me. The problem I seem to have is that I do not know what thoughts to think in order for it to be that simple! I appreciate your comments. I am sure others do as well. Please let us know what additional thoughts you have. - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=226156#m229418 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)