cancel
Showing results for 
Search instead for 
Did you mean: 

adc

madhu13
Associate III
Posted on March 17, 2011 at 13:13

adc

3 REPLIES 3
raptorhal2
Lead
Posted on May 17, 2011 at 14:28

You will first have to determine your criteria for ''rising edge of the input''. Is this any positive change, or is it when the input exceeds a threshold, is the threshold variable, and what is the tolerance for noise?

The ADC includes a capability to convert one or two injected set of channels triggered by external interrupts (see the all densities reference manual). One solution is to use a comparator on your PCB as the interrupt source. The comparator inputs would be the signal and a threshold reference. The threshold reference could be fixed, or be a programmable DAC channel output value.

If you truly mean any rising edge, then you will have to pass the signal through a differentiator before inputting it to the comparator.

If you can sample much faster than the signal frequencies of interest, a hardware simple but software complex solution is to sample frequently and discard any samples that don't meet the criteria.

Cheers, Hal

raptorhal2
Lead
Posted on May 17, 2011 at 14:28

How are you ''capturing the frequency''?

Assuming you have done that somehow, just turn on the ADC for at least 3 cycles and throw away the beginning samples until you get a transition from decreasing to increasing values. You will have to allow for signal noise in your transition criteria.

Cheers, Hal

madhu13
Associate III
Posted on May 17, 2011 at 14:28

hi thank you for the response, my application is fist i am capturing the frequency, and then using this captured frequency i calculate the sampling time such that i should sample only 2 cycle of signal, capture interrupt is on rising edge...and i want to to start the sampling on rising edge....after sampling i need to pass the samples to DFT function.

Madhuri.......