Aug 8, 2021

Measuring Fast and Slow Pulses on the Teensyduino Microcontroller

I wanted to measure small frequency changes with the Teensy 3.x. I used the interrupt-driven code from user "tni" that reads the entire port for greater speed. 

I added conversion equations to display time directly in time units.
It operates to beyond 1MHz with about 0.1 or 0.2us resolution (depending on the microcontroller's speed). 

It is equally capable at very low frequencies (< 0.05Hz)-- signals with pulse widths of 30 seconds or more. (I didn't have the patience or the need to test lower frequencies.)

See original code and my additions on the PJRC.com forum here.

addendum T3.2, T3.6, usec conversion for fast pulse measurement



No comments: