In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote: Since the ISR is always running (in the "background") that code gets executed every time through, so "seed" changes with every interrupt call (1000 times per second in my program). When I need a random value I just copy "seed" into another variable. LFSR: is just a label; LFSR stands for Linear Feedback Shift Register. The program in question will appear in the March issue of Nuts & Volts. It's a mini game board that uses an 8x8 LED array as the screen, and has four push-buttons for controls. The demo program is an embedded version of Conway's Game of Life. One of the setup options is to randomize the colony, hence the need for the code above. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=167121#m167236 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)