> bsf PORTB, 4 > bsf PORTB, 1 ;--------------------- > ; delay for at least 2ms > movlw 0x95 > movwf Dlay > movlw 0x02 > movwf Dlay + 1 > decfsz Dlay > goto $ - 1 > decfsz Dlay + 1 > goto $ - 3 Hi Mike, the problem is that the inner loop (decfsz Dlay, goto $-1) is being executed only twice. So your total delay is $195, not $295, or 770us short. Make it MOVLW 0x03, MOVWF Dlay+1 and you'll be in business -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads