PWM

can you explane me how to generate PWM in arduino mega?

http://www.arduino.cc/en/Reference/AnalogWrite

And another link to look at:- http://www.thebox.myzen.co.uk/Tutorial/PWM.html

Yes, Mike's is a very good resource also!