Multiple signals on different pins at different times
Jkane
Posts: 113
in Propeller 1
Hello,
I was wondering is there a way to send independent signals on pins, I was thinking I needed multiple cogs, set to start at a specific time, but I think there would be an issue of drift.
I have to send data on 8 pins, all have different signals on each pin, Is there a way to do this
regards
Jeff
I was wondering is there a way to send independent signals on pins, I was thinking I needed multiple cogs, set to start at a specific time, but I think there would be an issue of drift.
I have to send data on 8 pins, all have different signals on each pin, Is there a way to do this
regards
Jeff
Comments
You'll have to tell us more about what you're trying to do.
so could you give me an example of two independent cogs toggling two different pins at a few microsecond difference (independent of each other, I was wondering how to sync them together.
regards
Jeff
Here is an example code. The first cog toggles P0 in a Spin loop, the second cog waits for the pos-edge on P0 and toggles P1 with 4us delay for 4us. This cog is programmed with assembly, because Spin is not fast enough for us timings.
Andy
I would like them to be completely independent of each other, you mentioned that "waiting for the same CNT value" would be another way, vs watch each other, do you have an example of this, two cogs waiting for the a specific cnt timer value to begin transmission?
regards
Jeff
the future that it can't be missed by either cog (cog start up takes about 8192 clks, not counting any
code overhead). WAITCNT is global and precise to the clock.
One cog has to be the "Master" and tell the other one the CNT value to sync to.
Here is an example with two Spin cogs, they output a short pattern every 1ms started at the same time. After the syncpoint they are independent and can do different timings until the next syncpoint.
Andy