Dear All, I have a looping problem, it might be simple for your, and I don't know why I tried the whole morning till now, still can make it works. I plan to output bit7 of portB, on and off, and make use of and variable, counter to do the looping counting. But don't why, when it runs, I use logic probe and can't get signal (high low high low .... ) My program calls the output sub-routine. Please help me, and look at my partial code below, what's wrong? ------------ output movlw 0x10 ; loop 16 times movf counter loop1 bsf PORTB,7 ;set bit7 ON call wait_high bcf PORTB,7 ; set bit7 OFF call wait_low decfsz counter,1 goto loop1 return ------------- Please point out my mistake, and your help is very much appreciate. Thanks. -- Regards, William Tan -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.