Arduino Clock

Is there a way to generate a high frequency clock pulse through Arduino(about 30k)?
And how do I check the frequency of the generated square wave?

do a search on generating 38 KHz ( as per remote controls ) and GrumpyMike shows a way with calculations for the frequency you want .