Accessing the Teensy 3.2 Compatators to create zero crossing interrupts

Status
Not open for further replies.

Martin_R

Member
I would like to detect zero crossings of the DAC output to generate an interrupt. It appears that there are three comparators on the Teensy 3.2, including one on the DAC. I assume that the "ANALOG_COMP_vect ISR is needed. How to attach an interrupt to that?

Also I realize that the DAC output signal has switching noise on it so is it even good idea?
 
I note there have been several tries to use the comparitor, no success so far though. I also wonder if zero crossing is do-able on the Teensy as voltage swings are limited to the positive domain. You may have to apply an offset to your AC signal and compare to a slightly positive reference voltage 0.0v to 3.3v (max).
 
Status
Not open for further replies.
Back
Top