Hi all,
may I ask a question which is perhaps somewhat rudimentary but it's doing my head in anyway!
What I wonder is how do you run through a program and do something which takes some amount of time, without stalling the overall program execution to do it. So for example, I have a piece of code which makes a LED flash ON-OFF-ON for 80mS (see below) - there are times where I want to make the time periods 1 second, as opposed to 80mS.
The issue I have with the way I am doing it is that when I am in the middle of a pause etc(which might be 1 second) I'm not able to process other event, like a button push etc. I really want some way to fire off (aka spawn) a process and keep running program execution.
So.. just wondering - is this the challenged faced by all and you just have to deal with it best you can, or is there something fundamental I'm missing. I guess I could calculate the speed of the processor, the number of lines of code and run a loop to control the time periods, as opposed to using pause etc.?
appreciate all input.
Thanks!
may I ask a question which is perhaps somewhat rudimentary but it's doing my head in anyway!
What I wonder is how do you run through a program and do something which takes some amount of time, without stalling the overall program execution to do it. So for example, I have a piece of code which makes a LED flash ON-OFF-ON for 80mS (see below) - there are times where I want to make the time periods 1 second, as opposed to 80mS.
The issue I have with the way I am doing it is that when I am in the middle of a pause etc(which might be 1 second) I'm not able to process other event, like a button push etc. I really want some way to fire off (aka spawn) a process and keep running program execution.
So.. just wondering - is this the challenged faced by all and you just have to deal with it best you can, or is there something fundamental I'm missing. I guess I could calculate the speed of the processor, the number of lines of code and run a loop to control the time periods, as opposed to using pause etc.?
appreciate all input.
Thanks!
for b8 = 1 to 4
high 2
pause 80
low 2
pause 80
next b8
high 2
pause 80
low 2
pause 80
next b8