Darrel

I am effectivly trying to produce a PWM signal to control a servo, I know there is lots of examples out there already, but I want to use the timers to control the time the pulse is high using tmr1 and tmr2 tells the PIC when to restart the high pulse, allows me to learn how the timers work and how to accurately control timer lengths.

As this is a PWM signal for a servo, TMR1 produces a high pulse between 1 and 2ms and tmr2 restarts tmr1 every 20ms.

I am still new to the whole world of programming and PIC Basic, but what variables are PBP system variables?

Thank you for the interrupt code, it really has made setting up interrupts without using oninterrupt a dream.

What I am interested in how many cycles it takes to set up the timer registers and also how long it takes for an interrupt to trigger? or alternatively a method to find out how long it takes to run the various bits of code?

Many thanks for your help.