> > run RLF PORTD,1 ;Shift the HIGH up the column Modifying the port directly *may* get you in trouble. There's been quite some discussion on read-modify-write of port latches It's better practice to use a shadow register and use that. Don't read the port, but instead just write the shadow to the port, eg movlw 0x01 ;initialise shadow movwf shadow movf shadow,w ;write it to port movwf portd call delay bcf status,carry ;rlf will move the carry flag into bit0 of shadow rlf shadow,f ;modify shadow movf shadow,w movwf portd ;write it to port call delay btfss shadow,7 ;test for end goto............ etc -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads