PDA

View Full Version : FreqCount on Teensy 3.0



peja
01-25-2013, 09:44 PM
Hi Paul,

I like to use the teensy 3.0 for frequency measurements with FreqCount.
FreqCount/util/timer.h does not contain a definition for teensy 3.0 yet.

Is it complicated to add it?
Will the maximal frequency be higher as on teensy 2.0 if I use 96 MHz?

By the way, many thanks for the great board and the perfect support!

Kindest regards,
Peter

PaulStoffregen
01-27-2013, 06:13 PM
Hi Paul,

I like to use the teensy 3.0 for frequency measurements with FreqCount.
FreqCount/util/timer.h does not contain a definition for teensy 3.0 yet.

Is it complicated to add it?


Yes, it's complicated.

I will do it, but this isn't easy, so it's not something I can do very quickly.




Will the maximal frequency be higher as on teensy 2.0 if I use 96 MHz?


I believe the timers can be externally clocked up to 1/4 of the clock. However, the timers run from the bus clock (as almost all the peripherals do), not the cpu clock. The bus clock is 48 MHz when the CPU is either 48 or 96 MHz. So 12 MHz will probably be the maximum.

mxxx
09-30-2013, 10:59 PM
Yes, it's complicated.

I will do it, but this isn't easy, so it's not something I can do very quickly.




I believe the timers can be externally clocked up to 1/4 of the clock. However, the timers run from the bus clock (as almost all the peripherals do), not the cpu clock. The bus clock is 48 MHz when the CPU is either 48 or 96 MHz. So 12 MHz will probably be the maximum.

did anyone make any progress on this one? or any clues as to where the complications reside? (sorry if that sounds lazy... i just found out this hasn't been ported yet, and after finding this, i feel slightly intimidated)

edit. just found this - http://www.digitalmisery.com/2013/06/timer-input-capture-on-teensy-3-0/
looks like more worthwhile than trying to fiddle with that library

Nantonos
11-16-2014, 12:28 AM
Just for followup for anyone tracking this thread, Paul reported porting FreqCount (http://forum.pjrc.com/threads/25924-FreqMeasure-h-not-working?p=49012&viewfull=1#post49012) and FreqMeasure (http://forum.pjrc.com/threads/25924-FreqMeasure-h-not-working?p=49048&viewfull=1#post49048) to Teensy 3.x back in June 2014.

Paul, what input circuit did you use with Teensy 3.x here? The ones for Teensy 2 looks as if the transistor would be into saturation on a 3V3 rail.

PaulStoffregen
11-18-2014, 03:46 PM
Paul, what input circuit did you use with Teensy 3.x here?

I cheated. I just drove the Teensy pin directly with a waveform from a function generator. It was a Siglent SDG5082, to be specific, with the min & max voltage set to 0 and 3.3V.