PWM period = [(PR) + 1] * 4 * TOSC * (TMR2 prescale value) The maximum is when PR and TMR2 prescaler are at their highest values: Longest PWM Period = [1023 + 1] * 4 * [ 1 / 4,000,000 ] * 16 Which is a period of 0.016384, and a frequency of 61.035. Should be just fine for servo use. Check those equations, though - I've never used the PWM and am just giving you a hold-over answer until someone who does use them with servos can answer. I took this from the f877 data sheet, Page 61. It may actually be easier to do this with an interrupt anyway - there are several servo routines out there, and a few multiple servo routines (need to run 8 servos from one PIC?) -Adam Andy Shaw wrote: >Hi, >What is the lowest frequency you can get using the PWM module (on say an >16F877 with 4MHz xtal)? From looking at the docs it seems to me it is >1000000/16/256 which is approx 244Hz. Is this correct I've been thinking of >using the PWM module to generate a standard R/C servo control pulse but this >has a frequency of 50Hz. I've not really used the PWM module before so just >exploring options at the moment. Failing this any other ways of using the >hardware to generate the pulse train. I've used the CCP module to do it but >that still involves code to start the process off every 20ms or so. > >Thanks > >Andy > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. > > > > > > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.