Measuring audio phase shift through a circuit with a PIC


Results 1 to 40 of 50

Threaded View

  1. #19
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sinoteq View Post
    What PIC do you use and how fast do you run it?
    I use a 16f690 @20Mhz

    The 16F690's Comparator 1 receives the non lagged signal (set to internal VREF to trip at about 1/2 VCC)
    The 16F690's Comparator 2 receives the phase lagged signal (set to internal VREF to trip about 1/2 VCC too)

    Identical signals are fed into both comparators (bar the phase lag)

    DT's interrupts enabled for CMP1 & CMP2.

    On the scope the lag time measures about 20us - below which Comp2 will not decrement.

    I don't know enough about what's going on under the hood wrt interrupts (or timer1 zero-ing) to shine any more light on why the comp2 count won't go below 336...when clearly it should as the leading edge of the lagged signal gets close to zero lag. So being a bit wet nehind the ears, is there any other possible method I can use that circumvent this problem?
    Last edited by HankMcSpank; - 25th September 2010 at 15:02.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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