Thank you Defragster. Unfortunately my project still doesn't work and my cheap oscilloscope can't measure such high frequencies, so I can't check if the clock signal is correct or it is another issue. I think my next...
I need a 2 MHz clock pulse, which I tried to do with PWM using:
analogWriteFrequency(14, 2000000);
analogWrite(14, 128);
This doesn't work. It looks like the maximum frequency I'm able to generate this...