Shop OBEX P1 Docs P2 Docs Learn Events
Is the propeller multitask or a 8 tasks microcontroller ? — Parallax Forums

Is the propeller multitask or a 8 tasks microcontroller ?

JoeJoe Posts: 184
edited 2006-03-31 20:18 in Propeller 1
Hi,

Only to know :

Is the propeller multitask or a 8 tasks microcontroller ?

( In other words, Do you know if each internal proccesor could manage more than one task ? )

joe confused.gif

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-31 01:19
    The Propeller has eight independent Cogs (processors), so it is indeed multi-tasking/processing.· On top of that, each cog has two specialized counters that can manipulate output pins independent of that Cog's code, so you could in fact be doing two or three "tasks" (mainline code plus two counter driven outputs) per Cog.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • cgraceycgracey Posts: 14,206
    edited 2006-03-31 02:29
    You can do single-instruction task switching within each COG to run multiple programs within a COG. They must be in assembler, though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • JoeJoe Posts: 184
    edited 2006-03-31 20:06
    Thanks Chip:

    Then the propeller is a 8 task micro using Spin language
    or
    more than 8 task using Assembly Language ( is this ok? ) .

    Sorry, my english is not good and I don't know the meaning of COG.


    Thanks, Joe
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-31 20:16
    Remember that no matter what language you use, each cog has two counter moduels with pin control that can be started and will run independently of everything else. Propeller assembly is VERY fast, so a crafty programmer (like Chip) can get quite a lot done with it in just one cog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Ken GraceyKen Gracey Posts: 7,395
    edited 2006-03-31 20:18
    Hi Joe,

    Cogs are processors, and there are eight (8) of them in Propeller. You have eight cogs to use as you see fit, which all run concurrently and access the same I/O pins on Propeller. Additionally, depending on your needs, you can multi-task within a single cog using Spin or assembly language. Objects are Spin/ASM files. You can launch many objects from a single cog. It all depends on what you want to do and how you design your program to use Propeller's hardware.

    Hopefully this helps clarify a bit. Keep asking questions.

    Ken Gracey
    Parallax, Inc.
Sign In or Register to comment.