Hello everyone,
I would like to use the analog comparator of the Teensy 4.0 (page 3425 of the manual and onward) to build a frequency counter.
I would like to set it to generate an interrupt when the value of my pin of choice exceeds a certain value and another when the value falls below a certain other value. I then want to attach my own ISRs to the two individual interrupts.
How would I go about this?
Or is there another way of building a frequency counter with the Teensy 4.0 that doesn't require constantly polling the analog pin?
I would like to use the analog comparator of the Teensy 4.0 (page 3425 of the manual and onward) to build a frequency counter.
I would like to set it to generate an interrupt when the value of my pin of choice exceeds a certain value and another when the value falls below a certain other value. I then want to attach my own ISRs to the two individual interrupts.
How would I go about this?
Or is there another way of building a frequency counter with the Teensy 4.0 that doesn't require constantly polling the analog pin?