I gave this change a try. The system still counts to 111 then either resets= or rolls back over to 000 in an endless loop. Good thing is I think you just taught me how to name a register. Use that n= ame and tranfer data from one register to another using W as the intermed= iary. :-)) -----Original Message----- From: Jan-Erik Soderholm To: PICLIST@MITVMA.MIT.EDU Date: Tue, 9 Mar 2004 17:37:48 +0100 Subject: Re: [PIC:] Newbie trying to assemble using MPASM for 16f876 Sorry, the code should have been : > > clrf counter > > again: incf portb_tmp, w ; inc portb_tmp and move to W. > > movwf portb_tmp ; save incremented value. > > movwf portb ; move to LEDs. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.