Phase shift on two sinus waves with Aduc7129

How can I detect a phase shift between a reference sinus and a phase shift sinus with my Aduc7129 controller.

Is there a chance to detect the intern ref. sinus without measureing it with the ADC.

I would like to meausure the zero crossing of the two sinus and so get the phase shift.

Or can I start at a given phase with controlling the DDSPhs register?

Is there anybody who can help me?

Thanks Marcus

  • I would like to sample with 1 MSamples and I have written to following MMRs:

    (timer 1 as conversion input)

    Timer1:

    T1LD = 0x2A; // dez 42

    T1CON = 0x0C0; // source clock / 1

    // 4-5 > 0 Binary (default)

    // 6 > 1 periodic mode

    // vom Startwert abwärts

    // 7 > 1 timer1 enable bit

    // 8 > 0 count down (default)

    // 9 > 0 core clock

    ADC:

    ADCCON = 0x2A1; enable timer1 as conversion input 000 10 101 00 001

    // fADC, acq. time = 8 clocks

    to get the adc value:

    ADCCP = 0x01; // channel 1

    while (!ADCSTA);

    ADC_INPUT[z] = ADCDAT >> 16;

    What did I wrong? Because the sample rate is very low and definitely

    not 1 MSample.