Shop OBEX P1 Docs P2 Docs Learn Events
basic question about sharing I/O pin as input — Parallax Forums

basic question about sharing I/O pin as input

courtenscourtens Posts: 101
edited 2011-11-10 17:49 in Propeller 1
I feel kind of stupid asking this question - but is it OK to have one (the same) pin be an input for 2 cogs? So two cogs reading the same signal?

And, one more basic question: - is it OK to have cogs run at different speeds?

Thanks for the feedback.

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2011-11-10 17:22
    courtens wrote: »
    ... but is it OK to have one (the same) pin be an input for 2 cogs? So two cogs reading the same signal?
    No problem at all. All cogs can read all pins without anyone else noticing :)
    courtens wrote: »
    And, one more basic question: - is it OK to have cogs run at different speeds?
    That doesn't work. There is one system clock for all 8 cogs. If you change it from one cog it affects all of them. What made you ask?
  • courtenscourtens Posts: 101
    edited 2011-11-10 17:39
    Thanks kuroneko!
    kuroneko wrote: »
    What made you ask?

    I wasn't sure about that, and could not find the right answer in any of the documentations ...
    It can be all a bit confusing mixing in snippets of code from different files and seeing the speed in it re-declared. I guess this would need to be left out -- for all "includes" / files?
  • kuronekokuroneko Posts: 3,623
    edited 2011-11-10 17:44
    courtens wrote: »
    It can be all a bit confusing mixing in snippets of code from different files and seeing the speed in it re-declared. I guess this would need to be left out -- for all "includes" / files?
    Ah, I see. Only the primary (top) object clock settings are used. Anything defined in child objects is ignored. HTH.
  • courtenscourtens Posts: 101
    edited 2011-11-10 17:49
    Thanks :smile:
Sign In or Register to comment.