Getting a 20Hz square wave from PWM pin 11

Grumpy_Mike:
I think you would be much better off using timer 2, that controls pin 11 in PWM mode. The problem with what you have written is that anything else that your arduino code does is going to affect the time of your pulses. Also the time will jitter a bit because of background interrupts. So how important is the accuracy and what else does your system need to do?

Yes, I'm sorry. In the final sketch I'm going to use pin 11 not pin 7. Pin 7 is used from the sketch I've found on the old forum.

What I've to do is sending a 20Hz 50 pulse train with 2.1ms T-on to an hitec digital servo to move it. Then another 20Hz 50 pulse train with 0.9ms T-on to put it to start position.

After and before that I do other operations. Could you please be more specific? I'm not an expert in pwm programming and this is my first time at it.

Regards.