[time-nuts] teensy as time capture device

Jim Lux jimlux at earthlink.net
Thu Sep 24 12:30:35 UTC 2015


On 9/23/15 10:08 PM, Poul-Henning Kamp wrote:
> --------
> In message <5602F65B.6050600 at earthlink.net>, Jim Lux writes:
>
>> I've got a teensy3.1 hooked up to a 33120 function generator (not
>> exactly a super stable device) and generating period data for a 1 Hz
>> square wave.
>
> That is actually a particularly bad way of doing it, because the
> 33120 will generate a sine and run it through a zero-detector.
>
> You get much better performance by defining a ARB function which is
> a square.
>
>

Interesting.. in any case, it was more about seeing if it worked, and 
the 33120 was handy.

Now I've got the Rb hooked up, and it's a 10 microsecond long pulse.


I'm not sure how useful, overall, this is.   The crystal on the Teensy 
is probably nothing special.

I did do a quick run with the Teensy in 2x overclock mode (96 MHz CPU 
instead of 48MHz): the code returns counts that are close to 48,000,000, 
so either the counter runs off the crystal, or the code is scaling it 
internally.

What would be interesting is if there's a pin on the Arduino/Teensy that 
you could feed a high quality oscillator to, and then do counting with 
that.  The K20 microcontroller has a mindbendingly large number of 
features and alternate pin functions.




More information about the Time-nuts_lists.febo.com mailing list