Shop OBEX P1 Docs P2 Docs Learn Events
How to handle "cnt" overflows ? — Parallax Forums

How to handle "cnt" overflows ?

DavidGregDavidGreg Posts: 38
edited 2009-11-18 02:51 in Propeller 1
Is the following construct valid? Will it handle CNT overflow?

repeat
       counter1 := cnt + CLKFREQ/2
       doSomething()
       repeat until (cnt > counter1)
              counter2 := cnt + CLKFREQ/20
              doSomethingElse()
             waitcnt(counter2)


Post Edited By Moderator (Bean (Hitt Consulting)) : 11/18/2009 2:59:13 PM GMT

Comments

Sign In or Register to comment.