Two ideas: 1: Don't output the bits for each PWM one at a time. Instead accumulate them into a single byte of memory using an rrf or rlf instruction, then just copy that byte to the output. 2: Use the following (warning: untested code!) movlw 8 movwf pwm_count movlw 1 movwf bit_mask pwm_loop: .... ; to turn on the bit: movf bit_mask,w iorwf portb,w movwf portb ; to turn off the bit comf bit_mask,w andwf portb,w movwf portb rlf bit_mask,f decfsnz pwm_count,f goto pwm_loop Bob Ammerman RAm Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist