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

2 次查看(过去 30 天)
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.

回答(3 个)

Venkatesh Chilapur
Venkatesh Chilapur 2018-3-27
Hi,
Please send us the model.
Regards,
Venkatesh C

Venkatesh Chilapur
Venkatesh Chilapur 2018-3-27
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 2018-3-28
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.

类别

Help CenterFile Exchange 中查找有关 Measurements and Statistics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by