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. I'm using the CCS compiler, and not using any other timers. I'm supposed to show this to a customer tomorrow. I suppose I could go back to the bit banging (which worked sort of OK), but it seems like a terrible waste not to use the PWM module. Any help gladly accepted. :-) Phillip -- Phillip M. Vogel, President | "It's not what you've been taught, Bartal Design Group, Inc. | it's what you've learned." (me) 318 Marlboro Road | +1-201-567-1343 FAX:+1-201-568-2891 Englewood, NJ 07631 USA | phillip@bartal.com