On Tue, 11 Dec 2001, Andre Abelian wrote: > Scott, > > Thanks for your replay. What about changing duty cycle > On all of them? http://www.dattalo.com/technical/software/pic/pwm8.asm Another technique is to use phased-counters: movlw DELTA_PHASE addwf c0,f rlf ns,f addwf c1,f rlf ns,f addwf c2,f rlf ns,f addwf c3,f rlf ns,w xorwf current_state,w ; toggle I/O's if the andlw 0x0f ; counters roll over movwf current_state movwf PORTB If you want to change the relative timing between edges then change the contents of c0,c1,c2, or c3 individually. E.g. ; speed up c2 by 5 samples: movlw 5*DELTA_PHASE addwf c2,f movf current_state,W skpnc xorlw 00000100b ; Toggle the state on roll over movwf current_state movwf PORTB Scott -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body