Sine wave generation from TMSF28335 using simulink

7 visualizzazioni (ultimi 30 giorni)
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 Commento
Anusha B
Anusha B il 30 Mar 2015
Hi Vishnu,
What is the sampling time that you have specified for the sine wave? Are you checking the output through oscilloscope?

Accedi per commentare.

Risposte (1)

Antonin
Antonin il 13 Apr 2015
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.

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by