Thanks for the advice Tony. I tried what you suggested still with no luck though. I set porta to all outputs and changed the goto statement. I originally had the values for the counters set at 0xff (255) but changed them so I could step through the program in MPLAB without having to press the step button 512 times. I know the polarity on the LEDs are correct as I just checked them by connecting a 330 Ohm resistor to one of them and it lit up. I even tried a much more simple program where I moved 0xff into the work register then moved that value into portb, then looped infinitely with: loopme goto loopme That program didn't work either. Is it possible I might have burned up portb somehow? I assume the PIC would still allow itself to be programmed even if a port was burned up, would it not? Thanks again. Sincerely, Scott Pierce At 10:18 AM 8/26/2002 +1000, you wrote: >Scott Pierce wrote: > >Don't forget PORTA works even though you are not using it. The inputs >will float if left as unconnected inputs, so set them as outputs to keep >the chip happy. > > > start movlw 0x00 > tris porta ;<<<<< ADDED > > tris portb ;set portb to all outputs > > movlw 0xff ;set portb high > > movwf portb ;set portb to all 0's > > clrf counti ;set counti to 0 > > clrf countj ;set countj to 0 > > clrf count ;set count to 0 > > ; > > > ;============================================================================== > > ; > > dispcnt movf count,w ;move contents of count into work register > > movwf portb ;output contents of count to portb > > call pause > > incf count,f ;increment count by one, results stored in file reg > > goto dispcnt ;start loop over again > > ; > > > ;============================================================================== > > ; > >The counter values were not as you say in your comments. You also had >the delay kept in a permanent loop. The code changes appear below. > > > > pause movlw 0x0f ;set counter to 254 > > movlw 0xFE ;set counter to 254 > > > movwf counti ;move work register to counti file register > > loadj movlw 0x0f ;set countj to 255 > movlw 0xFF ;set countj to 255 > > > movwf countj ;move work register to countj file register > > decj decfsz countj,f;decrement countj, if zero skip next instruction > > goto decj ;loop decj again until countj = 0 > > decfsz counti,f;decrement counti, if zero skip next instruction > > goto decj ;loop loadj again until counti = 0 > > goto loadj ;loop loadj again until counti = 0 > > return ;when nested loops are done, return to dispcnt loop > > >-- >Best regards > >Tony > >mICros >http://www.bubblesoftonline.com >mailto:sales@bubblesoftonline.com > >-- >http://www.piclist.com hint: PICList Posts must start with ONE topic: >[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads