MATLAB Answers

How can I create sinus wave by using TI C2000 launchpad and simulink?

28 ビュー (過去 30 日間)
batuhan bescan
batuhan bescan 2018 年 10 月 30 日
Commented: Venkatesh Chilapur 2020 年 1 月 7 日 2:18
I am new to microcontrollers. I want to create sinus wave and read it with oscilloscope by using F28379D but I couldn't manage to do that. Which blocks should I use to do that?
Thanks.

  0 件のコメント

サインイン to comment.

採用された回答

Antonin
Antonin 2018 年 10 月 31 日
Hello Batuhan,
  1. Open a blank Simulink model, go the configuration parameters (Ctrl+E) > Hardware Implementation > Select the board you are using (i.e. F28379D LaunchPad)
  2. Drag a DAC block in your model from the Simulink library browser, under Embedded Coder Support Package for TI C2000 > F2837xD
  3. Drag a sine wave source block from Simulink source blocks, double-click on the sine wave and select "Sample based" for the sine type, set the Amplitude to 2047.5, Bias 2047.5, Samples per period: 100, Sample time: .01 --> this will generate a 1Hz sine wave with 100 points oscillating from 0 to 4095, which is the range that the DAC wants.
  4. Connect the Sine wave to the DAC
  5. Make sure your board is connected to your computer and generate code for the model (Ctrl+B)
  6. Put a scope on the DAC pin (Pin 30 on connector J3 is using the Launchpad) and enjoy watching the sine wave oscillate
  7. Accept this answer and post your model so others can benefit from it :-), go to this page and rate the package 5 stars, feel free to share with the rest of the world how easy it was to run your first model with our TI C2000 support package.

  2 件のコメント

Ashirwad Gad
Ashirwad Gad 2020 年 1 月 3 日 13:29
Hi,
I came across this while googling something similar. If I want to generate a constant voltage on the DAC of the F28379D Launchpad, will it work if I set-up my simulink model as shown in the attached image?
Thanks in advance!
Venkatesh Chilapur
Venkatesh Chilapur 2020 年 1 月 7 日 2:18
Yes, That should work fine.

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

タグ

製品


Translated by