DAC with F28335

This topic contains 3 replies, has 2 voices, and was last updated by  Augusto Alonso 1 year, 10 months ago.

  • Author
    Posts
  • #18788

    Augusto Alonso
    Participant

    Hi folks,

    I’m a newbie with Code Generation for the DSP F28335 from PSIM, and I’m facing some difficulties…

    I’m working on a project in which I have a PWM following a reference for a single phase inverter. I’ve accomplished that so far, and it works just fine.
    Now, I’ve just acquired a MCP4922 DAC because I need to see/confirm if my PWM’s output is accordingly following the reference it was supposed to. I’ve already tested the PSIM Example “DAC with SPI (MCP4922)” and it works fine for me. However, bringing the same set up for the my PWM simulation, I cannot use de output of the PWM block into the input of the SPI_out block (see attached pic).

    Any ideias about how I could do that?
    Thanks a lot!

    Attachments:
    You must be logged in to view attached files.
  • #18795

    Albert Dunford
    Participant

    Hi Augusto,

    The PWM blocks should only be used to drive switches (mosfet, IGBT) on or off. The SCI and SPI blocks should not be used this way. In the attached screenshot you will see that the PWM element is being used to drive the MOSFETs of the inverter and the SCI elements are being used to monitor internal DSP variables.

    The SCI elements are designed to communicate with PSIM’s DSP oscilloscope tool found in the utilities menu. Have a look at thie video.

    The SCI and SPI elements are “internal” elements that should be connected to DSP variables. The output from the PWM is an external signal as it needs to interact with the switches.

    https://youtu.be/UUogvZ0BLJA

    Attachments:
    You must be logged in to view attached files.
  • #18817

    Augusto Alonso
    Participant

    Hi Albert,

    Thanks a lot for clarifying that to me. I got the idea behind the SCI blocks and so on.

    However, I still wonder if there’s any possible way to use my PWM’s output signal as an input for the MCP4922 using PSIM. I need to use this DAC to check my PWM signal (as an RC filter for example).

    Do you any possible way to do that?

    I was thinking of physically connecting the PWM pin (the output) into a digital input, an then try to use this signal for the SPI_out block (as in the example). So far, I haven’t been successful with that though.

    Thanks

  • #18821

    Augusto Alonso
    Participant

    Please, never mind what I’ve just said….I think this post finishes here.

    I found out that I’m looking to the wrong variables…I have to look the reference before my PWM block…not its output.

    Thanks anyway.

You must be logged in to reply to this topic.