In SX Microcontrollers, SX/B Compiler and SX-Key Tool, _djm wrote: I'm writing a video game and this variable code is the game logic which runs in the vsync. In the past I have used the RTCC and lived with the slight variances each frame but this has an effect on the picture. I'm now trying to get an exact number of cycles in this section each frame to improve the picture quality. Even if I can't get exactly 20320 cycles, if I could get an exact figure below this then I could pad it out with a few nops after to get the delay I want. The problem is that depending on the amount of cycles the variable code (ie game logic) takes then I get a different delay (the range of the prescaler). I've attached a simple example showing this. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=112331#m112400 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)