Changing analogWrite() function frequency

See if it helps you.