Hi,
What is the diff btwn adc frequency(12.5MHz) and sampling frequency(which is given by the CPU timer0 )
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.
Hi,
What is the diff btwn adc frequency(12.5MHz) and sampling frequency(which is given by the CPU timer0 )
herewith am copying the text given in manual. I have run the program & got O/p but want to understand the following paragraph,
To start the ADC we will use our time-base, the CPU-Timer 0. In file “Lab17.c” this timer is still initialized to 100 microseconds from an earlier lab. For the new exercise, we would like to use a sample frequency of 50 kHz or a period of 20 microseconds. Change the line to initialize the CPU-timer 0 to:
ConfigCpuTimer(&CpuTimer0,150,20);
In the function “cpu_timer0_isr()”, which is triggered by Timer 0 once every 20 mi-croseconds, add a line to start the ADC by software:
AdcRegs.ADCTRL2.bit.SOC_SEQ1 = 1;
You are firing interrupts every 20 us and in each of those interrupts you are manually triggering the ADC by writing to the Start of Conversion (SOC) bit to enable conversions. Because of the 50 kHz frequency of Timer0, you are effectively sampling at a 50 kHz frequency. I think the ADC frequency you referred to in your first post was the frequency at which the peripheral is being clocked at.