Repeat loop for set amount of time?
Carl Lawhon
Posts: 36
Hey guys, this should be an easy one. How can I repeat a loop for a set number of clock cycles (a set amount of time)? Say I want to repeat a loop for 500 clock cycles, how could I do that?
Comments
Will the loop always execute the same commands?
Rick
Do you want to delay something by 500 clock cycles (just use a WAITCNT) or do you want to exit the loop if at least 500 clock cycles have passed? In the latter case, you save the initial clock setting, then start the REPEAT and exit when at least 500 clock cycles have passed (like this):