Fastest Square wave freq

I bought an arduino, just for its LED blink lol.

But i realised that it can only clock a maximium of 500hz, Ton = 1ms, Toff = 1ms.

This is really strange as the on board oscillator is 16MHz, magnitudes higher than the 500Hz.

Having delay <1ms comes out with nonsense. I plugged out output from the arduino to a transistor to drive a speaker, and having <1ms doesn't come out with the correct frequency. eg delay Ton = .5ms, Toff .5ms, Freq = 10KHz, but my speaker isn't doing 10KHz.

My transistor is rated for over 300MHz bandwidth, its not with my power supply either.

Anyone knows if i can get maybe >100k square waves out of an arduino?

Your understanding of the overhead associated with the Arduino environment is faulty. delay() is simply not an acceptable way to cycle anything other than a blinky LED.

Start reading here:
http://forum.arduino.cc/index.php?topic=109589.0
or
http://forum.arduino.cc/index.php?topic=166571.0
or
Google your own...

Ray

But i realised that it can only clock a maximium of 500hz, Ton = 1ms, Toff = 1ms

But using delayMicroseconds, you can get shorter delays.

But mrburnette covered most of the rest of it.