Discussion forum for the BasicX family of microcontroller chips.
|
I've uploaded my next step in making a PID controller(PID2.BAS)under BX24 files. Just a 4-button user interface it still lacks the best parts, PID algorithm etc, but it DOES multitask. I hope that when compared with the original form (PID.BAS) it may be educational for the next poor soul who may have trouble getting multitasking to work on a barebones BX24. I'm very grateful for all of the help and suggestions to flatten the stack. I basically turned the program inside out to reduce my call stack to no more than two calls inside of any given routine. I also had to make most variables globally available instead of local. I can't say that it is pretty code, but it works! Thanks again to all of you, Charles Rich (Seattle-area, USA) |