Cog Master Slave Synchronizing System Question
Andy_ouhsc
Posts: 17
Hello,
I have four sensors and I want to use different cogs so that each cog will control one sensor.
I wish to use the master slave cog systems to synchronize my signals.
Can anyone provide me an example master/slave synchronizing code? It will be a great start for understanding this.
Thanks!
Andy
I have four sensors and I want to use different cogs so that each cog will control one sensor.
I wish to use the master slave cog systems to synchronize my signals.
Can anyone provide me an example master/slave synchronizing code? It will be a great start for understanding this.
Thanks!
Andy
Comments
With the Propeller, it's usually the case that you want to synchronize with regards to time so sensors are all read at the same time. That can be easily done using WAITCNT (see the Propeller Manual for details of how that works). Sometimes the time doesn't matter, just that each cog has to wait for another cog to do its thing. The LOCKxxx instructions/Spin statements can be used for this. Sometimes you can just use a bit to signal from the master cog to the slaves that they can proceed. It all depends on what you're trying to do.
Take a look at the thread below. While not exactly what you are looking for it contains much
good stuff. Again, a great help to me when I began building my system (six slave props
controlled by one master connected to Labview by serial port). My props are controlling
fast D2A converters for DDS. In the end I used a 10mhz master oscillator as the clock source
for all props.
http://forums.parallax.com/showthread.php?124343-Parallax-Propeller-Programs-Propellers-in-ParallelV1.0-Tribute-to-the-BigBoy-4
Regards,
Desiko