Harry Mueller mts.net> writes: > I'm got functions for the following: > > 1. A gyro input. I use timer_o to create a 1500 uS pulse. > 2. A gyro output. I use CCP_2 to get the duty cycle. > 3. Accelerometer output. I use CCP_1 to get the duty cycle. > 4. PWM for 2 motors. I previously used CCP_1 and CCP_2 for these. > 5. I have a future need for a timing cycle for 2 wheel encoders. > > I think I can use timer_2 for function 5. but obviously I can't do 4. with > 2. & 3. > > Any suggestions? Try PIC18F2431 - it has more timers and designed for motor control. I believe it has up to 4 PWM. If you have to stick with F877: 1. leave it on TMR0 2, 3, 5: if ~ 10us resolution is OK you can set up timing loop. Alternatively use PORTB interrupt on change to capture timing 4. Use hardware PWM. Sergey -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist