In SX Microcontrollers, SX/B Compiler and SX-Key Tool, mebikerider wrote: Since 20320 = 635 x 32, would this work for your program? Set the RTCC prescaler to divide by 32, set up to interrupt on RTCC rollover, and in the ISR, preset a 2-byte counter to 635, then decrement it each ISR. When it hits zero, you've reached exactly 20320 counts. Reset the countdown counter to 635 then do your action. This seems like it should repeat on an exact 20320 count interval. David ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=112331#m112450 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)