PDA

View Full Version : Can one Cog override another Cog's output?



kenmac
09-07-2007, 03:12 PM
Hi,
If one Cog sets a Pin as output/high, can another Cog over-ride that by a DIRA[x]~, or OUTA[x]~ action on the same Pin?

kenmac

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

Graham Stabler
09-07-2007, 03:26 PM
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

kenmac
09-07-2007, 07:35 PM
OK - understood.
Thanks Graham.

kenmac

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