Shop OBEX P1 Docs P2 Docs Learn Events
Can one Cog override another Cog's output? — Parallax Forums

Can one Cog override another Cog's output?

kenmackenmac Posts: 96
edited 2007-09-07 11:35 in Propeller 1
Hi,
If one Cog sets a Pin as output/high, can another Cog over-ride that by a DIRA[noparse][[/noparse]x]~, or OUTA[noparse][[/noparse]x]~ action on the same Pin?

kenmac

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Perth, Western Australia
Time Zone = GMT + 8

Comments

  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-09-07 07:26
    If you look at this diagram you will find that both the dira and outa register are the result of all the cogs' outa and dira registers being ORed. This means if one cog make a pin an output then it is an output (although other cogs can read it as an input, one way to communicate!) and if one or more cogs set a pin high then the pin is high. A cog cannot force a pin low.

    http://www.parallax.com/dl/docs/prod/prop/PchipBlockRev.pdf

    Graham
  • kenmackenmac Posts: 96
    edited 2007-09-07 11:35
    OK - understood.
    Thanks Graham.

    kenmac

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Perth, Western Australia
    Time Zone = GMT + 8
Sign In or Register to comment.