Shop OBEX P1 Docs P2 Docs Learn Events
Can you use waitcnt with the frequency synch object? — Parallax Forums

Can you use waitcnt with the frequency synch object?

Dennis FerronDennis Ferron Posts: 480
edited 2007-06-28 10:35 in Propeller 1
I'm using the "standard" frequency synth object from the object exchange to clock an A/D converter chip at 640 KHz. I need to wait 64 clock cycles for it to complete a conversion, and I'd like to be able to use waitcnt for that.

Can I drive the counter for waitcnt with a pin instead of the internal reference? And since the synth object itself uses a counter, is it conflicting with my existing counter? Or does the counter waitcnt uses already run at the same frequency as my synth object is outputting?

Comments

  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-28 10:35
    waitcnt counts the main clock it does not effect the hardware counters in any way.

    If you want to wait for 64 clock cycles of the 640khz clock then you should use a counter in edge detect mode (where phsA is incremented on each positive edge on a pin). You have two counters per cog, one does not effect the other and if your synth object is running in a different cog to the wait then you have two at your disposal.

    Graham
Sign In or Register to comment.