PDA

View Full Version : Solved basic question about sharing I/O pin as input



courtens
11-11-2011, 12:09 AM
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.

kuroneko
11-11-2011, 12:22 AM
... 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 :)


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?

courtens
11-11-2011, 12:39 AM
Thanks kuroneko!


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?

kuroneko
11-11-2011, 12:44 AM
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.

courtens
11-11-2011, 12:49 AM
Thanks :smile: