Getting waveform by using UART on Raspberry Pi and ADC on Ti F28335
3 次查看(过去 30 天)
显示 更早的评论
I am using Serial communication UART on Raspberry Pi to get waveform from ADC of Ti F28335 bacause there is no ADC on Raspberry Pi.
The results is shown below, in which, the middle one is correct waveform but the other two with spikes are wrong (they are supposed to be similar).
The ADC sampling frequency is from 1KHz-10KHz and UART is a bit larger than that.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/278283/image.png)
0 个评论
回答(1 个)
Pranav Murali
2020-3-27
编辑:Pranav Murali
2020-3-27
I see that your waveforms from the ADC aren’t similar as they are supposed to. Since they sampling frequencies are different, If you are using Simulink, you will be needing a Rate Transition block which will ensure there is no loss or corruption of data. In MATLAB, make sure your sampling frequency is higher than the UART frequency.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!