Dario Greggio wrote: > Nice indeed! I'd use a 18F PIC though, and C language. The whole program is in C, I've written less than 50 lines of assembler in my entire life. What's the benefits of using a 18F over a 16F? My program runs in the following eternal loop: for(;;) { ColI i = GetRawPushButtonInput(); /* Check to see if a button is pressed */ DisplayScan(); /* Flash the display multiplexer */ if (BAD_COL != i) /* If a button is actually held down */ { if ( !ProposePlacement(i) ) continue; /* Check if column is empty, and if so place a chip */ IncrementAndUpdateSegs(); /* Increment the number shown on the seven seg displays */ CheckForConnection(); /* Check to see if we've achieved Connect 4 */ if ( CheckIfConnectionValid() ) IndicateGameWon(); /* Game is finished, this function doesn't return */ ProgressNextPlayer(); /* Move on to the next player's go */ } } -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist