Arduino function generator?  how fast can it puls?

Looking to use an Arduino as a function generator. Lets start simple: a square wave. 1hz is easy. How fast can I get the Arduino to puls? I am using the 16MHz chip.

Right from the example code.

int ledPin = 13;  

void setup()
{
  pinMode(ledPin, OUTPUT);
}

void loop()
{
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin, LOW);;
}

How fast is pin 13 pulsing? 16MHz?

Not much faster than 200khz.

See this thread for info on how to speed things up: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1226290298

Good to know.
Any way to get up to the 16~20MHz range? perhaps an external device controlled by the Arduino.

isn't there a function generator shield around for the arduino? google it

dont see it in my googlings.... Any one have a link?

my memory failed me again... here's a link:

its not a shield, just a kit

Why not use a dedicated DDS chip, e.g. AD9833:
http://www.datasheetcatalog.org/datasheet/analogdevices/129232781AD9833_prh.pdf

"Can be modified to 0.01Hz to 1MHz."

"Any way to get up to the 16~20MHz range?"

The AD9833 looks like a great option

This should do.

"Any way to get up to the 16~20MHz range?"

So with a system with a 16MHz clock you want an output going at 20MHz. As my son would say "have a word with yourself".

The best you can hope to do is to programme one of the timers to toggle an output line, you might get 2MHz like that.

Other than that you need something external with a faster clock. It all depends what you want to do with the signal once you have it.

There was some extensive discussion here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230286016
You can get a nice 2MHz square wave, and 4MHz if you're willing to give up "square."

See also http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1244864818/ which is more about removing other overhead from timed loops.