Question about pulsout timing...

Adamey

Senior Member
If I use the commands
Code:
pulsout 1,300
pulsout 2,100
then I'll get a pulse on output 1 for 3ms (300 x 10us)

So what happens with my second pulsout command? Does it output a 1ms pulse after the first pulse is over (program execution waits for the first pulsout command to finish) or does the second pulsout command execute immeditely and I get two simultaneous pulses on outputs 1 & 2 (of differing lengths)?
 

lanternfish

Senior Member
Hi and welcome to the forum.

To answer your question(s)

So what happens with my second pulsout command? Does it output a 1ms pulse after the first pulse is over (program execution waits for the first pulsout command to finish)
Yes

... or does the second pulsout command execute immeditely and I get two simultaneous pulses on outputs 1 & 2 (of differing lengths)?
No

PICAXE commands execute sequentially i.e. the following command does not execute until the first is completed.

There are some exceptions to this, notably commands using hardware features e.g. hspiout, hserout and some others.

Hope this helps
 

hippy

Ex-Staff (retired)
As Westaust55 says, all PICAXE Commands execute sequentially - that will be the same on M2's with multi-tasking though it won't be as obvious which will follow another. There will also be a small period when pin 1 has been high and gone low before pin2 goes high.
 
Top