clock enable from system clock

d10

Member
Hello I am new to the forum and teensy. I mostly work with CMOS chips. I was just wondering if there was a way to create a pulse of one cycle derived from the system clock every n amount of cycles. It will be used as a clock enable to activate functions I create. Thank you.
 
Different Teensy's have different system clocks.
Do you really need a pulse that is derived from the system clock? Perhaps you can use a PWM signal with a very small duty-cycle?
Please see this page for more information.

Paul
 
The timers in Teensy can do this. But they run from a peripheral clock which is slower than the main CPU clock. In Teensy 4.0 when running at 600 MHz, the timers run at 150 MHz. So the smallest 1 cycle pulse you could program the timer to create would be 1 cycle of 150 MHz, approx 6.7 ns.
 
How would I do this Paul? Specifically the smallest 1 cycle pulse you could program the timer to create would be 1 cycle of 150 MHz?
 
The long answer begins with "it depends"...

But the short answer that quickly and easily creates this pulse looks like

Code:
void setup() {
  analogWriteFrequency(2, 500000);
  analogWrite(2, 1);
}

void loop() {
}

And this is a quick view of the pulse with ordinary scope probe ground clip. Sorry, don't have time to do a proper high bandwidth measurement, or write a lengthy message. But hopefully this at least gives you a place to start.

file.png
 
Back
Top