OK, I think I've got it working... I changed the initial call to for(n=0;nstate=0; // initial state So far, so good... Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist