Are you sure it counts to 111 and resets to 000 or is that what you are seeing on the LEDs? Maybe your'e not lighting all of them. Randy Ott Richard S wrote: 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 name and tranfer data from one register to another using W as the intermediary. :-)) -----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. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.