How to increase the dc motor's speed(andFrequency)value more than255(and64KHZ)?

Hi,
Just breifly looking at your code, I can't find any pull-up statements for the buttons, how have you got your buttons wired?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.... :slight_smile: