setup PWM for output ultrasound wave

can you also help me to modify your code for change frequency in "any" in the range specified ?

Look at the code:-

OCR2A = 51; // defines the frequency 51 = 38.4 KHz, 54 = 36.2 KHz, 58 = 34 KHz, 62 = 32 KHz
  OCR2B = 26;  // defines the duty cycle - Half the OCR2A value for 50%

Just poke different numbers into OCR2A and OCR2B to change the frequency.