parallel tasks

technokid

Member
Hello,

I have a 20M2 picaxe and I need to know 3 things.
1. Can this particular chip do parallel tasks?
2. If so, how do I run two completely different tasks at once?
3. Can I set a variable on one parallel task, and have the other task read it (does each task have their own set of variables, or are the variables shared), like one task reads inputs and sets variables to the on state, while the other task runs the main program?

P.S is there a way to get 2 picaxes working together using only one pin, like one chip reads 15 inputs (temperature, light levels, etc), and sends the data to another chip that handles the outputs?
 
Last edited:

technokid

Member
I found the commands and the answers to these questions.
Although, is the run command the same as a parallel task command, or is there a difference?

P.S does anyone know how to delete threads?
 

westaust55

Moderator
The RUN command is only for the X2 parts with multiple program slot ( and where only one slot is active/running at a time)

With M2 parts each task with a Start<x>: label will start and run in parallel.
The RESUME and SUSPEND commands are used the further control the M2 "parallel" tasks.

General forum members canner delete threads or the first post in a thread.
Only the Administration and Moderators can totally delete a thread and this is normally only done in cases of spam or forum infractions (eg bad language).
 
Top