Shop OBEX P1 Docs P2 Docs Learn Events
Access to CNT register — Parallax Forums

Access to CNT register

I apparently have suffered drain bamage. I cannot find how to read the cnt register. If I say
mov  stime, cnt      'get pulse start time
it says "error symbol cnt is not constant".

Please help.

Comments

  • For prop2, use GETCT instruction. WAITCNT is replaced by WAITCTx and ADDCTx for x=1,2,3
            getct   stime
    
  • RaymanRayman Posts: 13,797
    Hmm... I wonder how the new 64-bit CT register will handle rollover for wait and add...

    Guess it works out to be the same as with 32 bit CT register...
  • Thank you, @Mark_T .
  • Cluso99Cluso99 Posts: 18,066
    Rayman wrote: »
    Hmm... I wonder how the new 64-bit CT register will handle rollover for wait and add...

    Guess it works out to be the same as with 32 bit CT register...

    Same as it does now. The only change is the cnt is extended to 64 bits and you can read the high 32bits. Otherwise those top 32 bits are hidden/unused.
Sign In or Register to comment.