SpasticHatchet
New member
I used the following code to get 20 MHz, but when I checked with an oscilloscope, I was down around 18.9 MHz. I'm really not needing anything fancy. I used the same method to get to 10 MHz and that was right on. I've been browsing the forum trying to understand what people are doing to get faster speeds but it alludes me thus far.
C++:
#define CLK 5
void setup() {
analogWrite(CLK, 0);
pinMode(CLK, OUTPUT);
unsigned long freq = 20000000;
analogWriteFrequency(CLK, freq);
analogWrite(CLK, 128);
}