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 way is 100 kHz on a Teensy 4.0.
So my question is: what is the best way to generate a 2 MHz clock pulse on a Teensy 4.0?
analogWriteFrequency(14, 2000000);
analogWrite(14, 128);
This doesn't work. It looks like the maximum frequency I'm able to generate this way is 100 kHz on a Teensy 4.0.
So my question is: what is the best way to generate a 2 MHz clock pulse on a Teensy 4.0?