PWM Motor question

Hi: Im controlling two motors using the timer 2 on arduino uno (pin11). In order to avoid humming , Im using the following commands (one for each motor):

TCCR2B = TCCR2B & B11111000 | B00000001; // set timer 2 divisor to 1 for PWM frequency of 31372.55 Hz TCCR2B = TCCR2B & B11111000 | B00000111; // set timer 2 divisor to 1024 for PWM frequency of 30.517 Hz

my question is how is possible that for one motor the minimum frequency has to be set and the minimum for the other one?

Sorry, I don't understand the question. Try rephrasing it.

Well, you are the only one with problems with grammar, in fact, I've seen other posts of yours and you are like a grammar nazzi and never provide any good advice. I've never had any problem communicating in this forum.

In the future, please dont comment any of my posts!

Thank you in advance.

Edit: by the way, don't correct people about their posts, if you see a lack of information just dont answer. I suggest you to check all of your posts, always correcting and asking for extra information. For god's sake, are you the arduino forum police or what!?

So you are saying this
& B11111000
is not clearing bits 2 & 1 prior to the ORing of bit 0 only?
If not, I don’t understand the question either.

CrossRoads:
So you are saying this
& B11111000
is not clearing bits 2 & 1 prior to the ORing of bit 0 only?
If not, I don’t understand the question either.

Thank you! To resume my question: I’m controlling two DC motors, in order to avoid humming, I’m manipulating the timer frequency (timer 2). For one motor it has to be set to 31372.55 Hz and 30.517 Hz for the other motor. If both are DC motors, aren’t they supposed to stop humming using the same PWM frequency ?

don't correct people about their posts, if you see a lack of information just dont answer.

Oh, that's helpful: "If the post is lacking information, ignore it. (it's better to not solve the problem than to hurt their feelings...)

What are you, the forum police ?

Who are you to judge me Mr. karma 0 ? When you can match my karma , you can offer constructive criticism. Many people don't mind being corrected because they are not insecure an don't get offended because they actually believe that one must have their priorities straight and that one should put their ego second to learning. And since you have no karma, please don't tell me what information is necessary , since you clearly don't have a clue. I take constructive criticism from people who obviously have more knowledge and wisdom than I do. I could name many of them but Crossroads would be at the top of that list. I will take whatever advise he cares to offer without question or argument, including negative criticism, because I think that the priority here on the forum is solving the issue, not petting your ego. If I think the question is not clear, (and apparently it wasn't) I will ask for a redo , because most people here are mature enough to not throw a sissy fit when they are corrected. Have a nice day.. `