Mike Keitz wrote: >burst > movlw .2 ;2 byte cycle counter - initialize to 770 dec. > movwf ccntl ;Need 2 RAM variables. > movlw .3 > movwf ccnth >burstfl > nop ;Equalize loop time if only low byte dec. > nop >burstsl > nop ;May be removed for slower clocks. > bsf PORT_B,0 ;Set output high. (can use any port here) > goto $+1 ;2- cycle NOPs. > goto $+1 > nop > bcf PORT_B,0 ;Output was high for 6 cycles, now low. >; From here, always 5 cycles back to burstsl. > decfsz ccntl > goto burstfl > decfsz ccnth > goto burstsl >;Fall thru to here when burst is done. Mike: Won't work. Instead of generating a 10-ms burst, your code will generate on ly a 6.67-ms burst. To make your DECFSZs work properly, you'll need to load ccnth with 4, not 3. If 9.974 ms is close enough, the following bit of code will do the job using only one register: CLRF COUNT L1: MOVLW 00000001B ;The "1" in W corresponds to the PORTB bit that GOTO $+1 ;we'll be toggling. This example is for PORTB,0 . L2: XORWF PORTB BTFSC PORTB,0 GOTO L1 L3: GOTO $+1 NOP XORWF PORTB BTFSC PORTB,0 GOTO L3 L4: GOTO $+1 NOP XORWF PORTB BTFSC PORTB,0 GOTO L4 DECFSZ COUNT GOTO L2 -Andy -- Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California