Shop OBEX P1 Docs P2 Docs Learn Events
Democode Variable-access across Cogs and across objects — Parallax Forums

Democode Variable-access across Cogs and across objects

StefanL38StefanL38 Posts: 2,292
edited 2009-10-10 13:24 in Propeller 1
Hello,

as these questions come up again every few weeks. I wrote two demo-codes that show how variable-access across cogs and across objects work.

There are some more methods to realise that. The way it is described here is the the way that is easier to understand by newbees.
If someone would like to add the other ways feel free to do it.

Download attached zip-files and play around with them.

The demos require just any kind of propellerboard, propeller-IDE, PST.EXE and programming-cable
(no additional hardware)

PST.EXE is the Propeller-Serial-Terminal that can receive serial data.

best regards

Stefan

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2009-10-08 15:34
    I think this is because the manual doesn't talk enough about the use and relationship of RAM and COG

    I think in the variable section it should discuss the many different ways to work with data and cogs and objects.

    The method of using DAT to share variables between COG's is missing from the manual. (or im blind)
  • mparkmpark Posts: 1,305
    edited 2009-10-08 20:01
    Clock Loop said...
    ...
    The method of using DAT to share variables between COG's is missing from the manual. (or im blind)
    What method is that?
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-10-08 20:14
    mpark said...
    What method is that?

    This thread talks about it and my last post in that thread shows the owner of that thread a method to use the same variable in two cogs.

    http://forums.parallax.com/forums/default.aspx?f=25&m=391108
  • mparkmpark Posts: 1,305
    edited 2009-10-08 21:36
    OK, thanks, but there's nothing particularly DAT-specific, is there? I mean, one can also share a VAR variable.
  • RS_JimRS_Jim Posts: 1,768
    edited 2009-10-10 13:24
    Thanks Stefan, I am sure this is going to help in my struggles with this issue
    rs_jim
Sign In or Register to comment.