peter howarth
New Member
Just want to know which , if any, of the picaxe micros can do parallel tasking, ie more than 1 start block in the flowchart programming chart technique..
As above, with multiple STARTs, but note that this is time-slicing, not true parallel execution. Usually, a time-slicing operation can also be coded as a single chunk of code. Multiple STARTs can make some kinds of time-slicing conceptually easier to follow.Just want to know which , if any, of the picaxe micros can do parallel tasking
#Picaxe 08M2
#No_Data
#Terminal 4800
Symbol BTN = pinC.3
Symbol timeoutMs = w0
Start0:
Do
SerTxd("Press the button ...", CR, LF)
timeoutMs = 2000
Do : Loop Until BTN = 1 Or timeoutMs = 0
If timeoutMs = 0 Then
SerTxd("Too late!", CR, LF)
Else
SerTxd("Well done", CR, LF)
End If
Do : Loop Until BTN = 0
Pause 10000
Loop
Start1:
Symbol LOOP_TIME_MS = 100
Do
timeoutMs = timeoutMs Min LOOP_TIME_MS - LOOP_TIME_MS
Pause LOOP_TIME_MS
Loop