In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Kenneth wrote: You can find the "delay value" m in this loop: mov m,#? delay decsz m ; m + 1 jmp delay ; 3*(m - 1) by the formula: x = (1/fclk)*(4m - 2) <==> m = (x*fclk + 2) / 4 . If you keep fclk in MHz you will have x in usec. Keep in mind that m >= 1. cheers, Kenneth ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=90754#m90910 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)