Sine wave generation from TMSF28335 using simulink
3 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I am trying to produce a Sine wave from TMSF28335 uC using Simulink. I was sucessfully able to produce pulses but I am not able to produce sine wave. I have tried the following ways to produce the sine wave:- a) use a user defined function and give it to GPIO pins of C28x3xx block b) directy give sine wave block Output is not coming. Pls tell me how to produce the sine wave(if possible different blocks to use). Very imp. Regards, Vishnu
1 个评论
Anusha B
2015-3-30
Hi Vishnu,
What is the sampling time that you have specified for the sine wave? Are you checking the output through oscilloscope?
回答(1 个)
Antonin
2015-4-13
Hi Vishnu,
There is no DAC on the F28335. Outputting to a GPIO can only give you binary signals. The best way to get an analog signal out of the F28335 chip is to use PWM and filter the output with a simple RC filter. The RC value should dictate the PWM frequency and how fast you can refresh the duty cycle to get a clean waveform. The PWM duty cycle will control the amplitude of the signal. You should be able to output a sine wave using this technique. On the Simulink side, you should feed the ePWM block with your sine wave value, making sure that you scale the amplitude and the sample time of the signal correctly.
I hope it helps,
Cheers,
Antonin.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!