phil123456
Active member
Hello,
I try to generate a 20mh 50% duty cycle signal on the teensy 3.6
I can barely achieve 6Mhz, which is weird, since the teensy runs at 240Mhz
anyone sees something wrong with my code ?
thanks for your help
I try to generate a 20mh 50% duty cycle signal on the teensy 3.6
I can barely achieve 6Mhz, which is weird, since the teensy runs at 240Mhz
anyone sees something wrong with my code ?
thanks for your help
Code:
#define MCLK 9
void setup() {
pinMode(MCLK, OUTPUT);
CORE_PIN9_CONFIG = PORT_PCR_MUX(1); // no slew rate limit
noInterrupts(); // look pretty for the oscilloscope trigger
}
void loop() {
digitalWriteFast(MCLK, 0);
digitalWriteFast(MCLK, 1);
}