Shop OBEX P1 Docs P2 Docs Learn Events
Question About P2 Timing Methods — Parallax Forums

Question About P2 Timing Methods

WAITCT(Tick)

I didn't see Tick defined anywhere in the documentation. I'm assuming it's the old CNT from P1.

GETCT() : Count

Is Tick just the Count from GETCT()?

Comments

  • JonnyMacJonnyMac Posts: 8,927
    edited 2020-10-12 03:42
    The waitct() instruction works just like waitcnt in the P1; you need to give it a target. If, for example you wanted to wait n system ticks, you could code it like this:
      waitcnt(getct() + n)
    
Sign In or Register to comment.