With 28335 TI, embedded coder, for a sine signal with and without presence of ADC block frequency is changing

1 Ansicht (letzte 30 Tage)
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.

Antworten (3)

Venkatesh Chilapur
Venkatesh Chilapur am 27 Mär. 2018
Hi,
Please send us the model.
Regards,
Venkatesh C

Venkatesh Chilapur
Venkatesh Chilapur am 27 Mär. 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.

Antonin
Antonin am 28 Mär. 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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by