Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Accessing the Teensy 3.2 Compatators to create zero crossing interrupts

  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    4

    Accessing the Teensy 3.2 Compatators to create zero crossing interrupts

    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?

  2. #2
    Member
    Join Date
    Nov 2015
    Location
    Cold hollow VT
    Posts
    97
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •