In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: One way is the just generate another random number if the value is over 200 DO RANDOM tempByte UNTIL temp <= 200 Or you could scale the value using WORD variables RANDOM tempWord tempWord = tempWord / 327 Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=204778#m204799 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)