With 28335 TI, embedded coder, for a sine signal with and without presence of ADC block frequency is changing
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
The problem I am facing:
When I am taken a sine block and in that, I have selected for sample based and the number of samples is given as 1000 and sample time is 10us, the magnitude of the signal 1, I am comparing the sine signal with 0.5 and checking the pulses at one of the DSP GPIO pins. First I am using only the four blocks (sine, comparator, constant value, and GPIO digital output), I am measuring the frequency at the output pin I am getting 100 Hz. But, when adding an ADC block to the above system I am getting 50 Hz at the output.
0 Commenti
Risposte (3)
Venkatesh Chilapur
il 27 Mar 2018
The likely reason for this is overrun issue of the step function. You may consider reducing the sample time of the step function and see if it helps.
0 Commenti
Antonin
il 28 Mar 2018
I agree with Venkatesh, you are most likely overrunning the base rate. Using the ADC in software mode triggers the ADC conversion and waits for the results. This takes time and is probably the culprit for the overrun. Trigger the ADC conversion from a PWM timer, you will save the wait time for the results to come.
0 Commenti
Vedere anche
Categorie
Scopri di più su Measurements and Statistics in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!