> Olin, you do bring up an interesting point. If the duty cycle is set to 0 > then does the output stay a flat low? Or does it glitch every cycle? I think the output will stay flat low. > For this purpose it probably doesn't matter. I was still interested in the > TRIS register because it only required manipulating a single bit and not have > to track the value in the ducy cycle register. You only have to write two values to the duty cycle register, 0 for off and whatever you want the duty cycle to be for on. Duty cycle changes won't take effect until the start of the next PWM cycle, but keeping track of whole carrier pulses is probably a good idea anyway. I would assume you describe the various on and off times in numbers of carrier pulses anyway. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads