SET FREQUENCY ARDUINO MEGA

Take a look here;