Joe Smith wrote: > > 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? > Loop > incf COUNT,1 ;increment count > movf COUNT,0 ; > comf W, 0 > movwf PORTB ;display on port b > > goto Loop Try.. Loop incf COUNT,F ; increment COUNT comf COUNT,W ; compliment COUNT into W movwf PORTB ; then write to PORTB call Delay ; wait so you can see result goto 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