This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dac_DELAY 的这个样例的问题



interrupt void adca1_isr(void)
{
//DLYSTAMP will read 2 if the sample was not delayed
if(2 < AdcaRegs.ADCPPB1STAMP.bit.DLYSTAMP){
//if DLYSTAMP > 2, then the sample was delayed by (DLYSTAMP - 2) cycles (SYSCLK)
conversion[delay_index] = conversion_count;
delay[delay_index] = AdcaRegs.ADCPPB1STAMP.bit.DLYSTAMP - 2; //save sample delay
delay_index++;

//corrective action(s) for delayed sample can occur here
//...
}

为什么设定当采样没有延时,读DLYSTAMP为2,如果 DLYSTAMP > 2, 采样延时了 (DLYSTAMP - 2)个周期 ??