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.
0 个评论
回答(3 个)
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.
0 个评论
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!