I am trying to get this code to output binary on 8 leds attached to port b, but when I try it all 8 leds stay on constantly. Any ideas? //code title "Binary" LIST R=DEC INCLUDE "p16f84a.inc" ; Registers COUNT equ 0x00 Temp equ 12 __CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON PAGE ; Mainline of ledon org 0 nop ; "nop" is Required for Emulators clrf PORTB bsf STATUS, RP0 ; Set RB7 to Output clrf TRISB ^ 0x080 bcf STATUS, RP0 ; Go back to Bank 0 clrf COUNT Loop incf COUNT,1 ;increment count movf COUNT,0 ; comf W, 0 movwf PORTB ;display on port b goto Loop Dlay ifndef Debug ; If Debug NOT Defined movlw 0 ; Actual Setup the Delay Value movwf Temp movlw 128 movwf Temp + 1 else ; If Debug Defined movlw 2 ; Programming Debug Delay Value movwf Temp movlw 1 movwf Temp + 1 endif D_Loop ; Loop Around Here until Complete decf Temp ; Decrement the lo Value btfsc STATUS, Z ; Is the Zero Flag Set? decf Temp + 1 movf Temp, w ; Are we At Zero for Both? iorwf Temp + 1, w btfss STATUS, Z goto D_Loop return end _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body