On Sat, 2 Oct 2004, Adam Woodworth wrote: > I even tried setting PORTB = 0 instead of 255 in case 0 meant high and 1 > meant low (which seems to be the case with gpasm). Hi-Tech doesn't do any strange translations; a 0 is a 0. > I would assume that the compiler would generate > code that would have an instruction to terminate the program, so that the > PIC wouldn't go off into never never land. I was expecting the code to > run, change the state of PORTB, and exit cleanly and the PIC would be > sitting "idle". Am I wrong? The only thing approaching an "idle" state with a PIC is the sleep instruction. Also note that you had the watchdog timer enabled, which will cause the PIC to periodically reset. This, along with the powerup timer, means PORTB will return to hi-z state for ~72 ms after a reset. -- John W. Temples, III _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist