Phillip; Indeed, you must bit bang it. But if you are running timer0 at a fairly brisk pace already, then you are not wasting that much time. I did it your way, and yes, you realy must read it just before firing the FET. If wasting too much time is a concern, remember that DC motors work at relatively low PWM rates. As a matter of fact, I resigned trying to use the PWM because it did not go SLOW enough for the job. Anything over 30-60 Hz is actually somewhat of a waste for simple motors. By the way, the 8 bit word that I used for the bit banged PWM created a 1/256 error, and the customer measured it on their meter. They promptly turned their nose up, handed me an old analog only motor controller (SCR style) and told me to do it over. The new one works like a charm. BOL Chris Eddy Pioneer Microsystems, Inc. Phillip Vogel wrote: > Hi- > > There's got to be a way... I'm controlling a DC motor with PWM on a 16F877. I > need to take an analog reading just before the PWM output goes high. The > results of this analog reading are used to adjust the PWM duty cycle. >