Due to the complexity of the rest of the code, I have the main code setting the pause time. The three gosub commands I have written will be immediate, so as not to interfere with the timing cycle of the aforementioned pause.
I have multiple outputs being controlled by two inputs. The outputs must reflect what the inputs are doing in real time, however, two of the outputs must run this code and not affect the timing of the rest of the outputs. A third set of outputs will execute another routine, but that code has already been written and tested. This is the last piece I have to finish.
Using the method I mentioned above, it adds 240 words to my assembly. The way I came up for this program to work in my setup is to have the counter increment with each pass. Half of the count will be dedicated to LED1 and the other half to LED2. It will simply alternate flash the way the code is written.
As I said, the timing portion is set by the main code, so no delays are in these subroutines, and hence, not affect the real time reflection of the inputs.
Bookmarks