Shop OBEX P1 Docs P2 Docs Learn Events
Picaxe ide — Parallax Forums

Picaxe ide

OrbilusOrbilus Posts: 10
edited 2012-06-11 08:54 in BASIC Stamp
I was doing some research for a project that requires program tasks to be run simultaneously (or near parallel, including priority high speed switching of tasks). Specifically I need to drive motors continuously while the MAIN lines calculate PWM duty cycle variables for navigation. Inputs include: IR Proximity, GPS, Compass, Tilt, Altitude etc.

Does the BS2 IDE provided by parallax have the capability to run multiple sections of code at the same time similar to the PICAXE IDE? If so can someone provide sample code? If not, can I use the PICAXE IDE to run my BS2?

I was throwing around the idea of using multiple controllers, but I'm also trying to minimize weight.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2012-05-31 12:32
    Hi,

    Relatively few hobbiest microcontrollers do true multi-tasking. Many, including the Parallax Stamp products can be programmed to appear to do simultaneous tasks. The Propellor has the ability to multi-task.

    The IDE has little to do with the ability of the microcontroller to do multi-tasking. It is simply a convenient way to compose and edit code. Once downloaded to the controller, the code runs within the controller, not the IDE. It would be unlikely the Picaxe IDE could be used program a Stamp and vice versa.

    As you work out the details of your project, there are techniques that can be employed to let a single-threaded processor operate multiple tasks. This might include using smart motor controller boards and prioritizing the amount of processing used for various tasks.

    The best way to get maximum help is to provide specific examples of where you have problems and to ask focused questions here in the Forum.

    Cheers,
  • Mike GreenMike Green Posts: 23,101
    edited 2012-05-31 12:33
    None of the Basic Stamps have the capability to run multiple sections of code at the same time. You can only program the Basic Stamps (like the BS2) with the Stamp Editor.

    The Propeller can handle all the things you want to do with a single controller because it has 8 separate processors on the chip. If you're interested, have a look through the Propeller Object Exchange for ready-to-go "objects" ... essentially library packages. There are objects for handling PWM simultaneously on any combination of I/O pins, objects for decoding GPS serial output strings, objects for doing floating point, and handling typical devices used for navigation.
  • ercoerco Posts: 20,256
    edited 2012-05-31 15:30
    The PicAxe M2 series only pseudo-multitasks at the slowest operating speed of 4 MHz. Note that some commands stop all tasks simultaneously. In most cases, you're actually better off writing a single program (non-multitasking) and operating at a higher speed, up to 32 MHz. That's faster than a Stamp, but slower than a Propeller.
  • OrbilusOrbilus Posts: 10
    edited 2012-06-04 05:35
    Awesome Replies!!

    looks like I need to do quite a bit more research. It looks like I either need to upgrade my MC or get creative with motor controllers. Thanks for the help.

    Now how do I mark this thread SOLVED?
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-06-04 07:51
    Orbilus wrote: »
    Awesome Replies!!

    looks like I need to do quite a bit more research. It looks like I either need to upgrade my MC or get creative with motor controllers. Thanks for the help.

    Now how do I mark this thread SOLVED?

    Edit the original post and change it at the top - (you may need to use advanced mode)
  • OrbilusOrbilus Posts: 10
    edited 2012-06-11 08:54
    Edit the original post and change it at the top - (you may need to use advanced mode)
    Thanks!
Sign In or Register to comment.