This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28377S: ADC TO PWM

Part Number: LAUNCHXL-F28377S

Hello Everyone;

I work on some project about c2000 controller , I watch real time ADC and everthing is works for ADC. But I want to sent to data for PWM block which recevied to ADC block, I see some signal in scope2 like 7 to 14 and ıts Okey for me .

I configure all things for pww but I dont see anything. Where is the problem I cannot see it . Thank you for answering

  • Halit,

    Thank you for your post. Please submit additional information and be specific as possible.

    - Ken
  • Sure .

    I read ADC from Sensor and I wanna Drive DC motor with ADC Data. How? For example I wanna turn right If ADC value<0.5 and turn left If value>0.5 . I sent some details my project , I changed smt . By the way I have L298N DC Driver and all connection is correct.

    I use ePWM1 and ıts mean PWM data GPIO0 and GPIO1 ?

    Where is my fault . Thank you for aswer.

  • Halit,

    I am forwarding your post to The Mathworks for further support. However, our engineering contact will not be back in the office until January 22, so please expect a slight delay.

    - Ken
  • Hi Halit,

    From your first post you mention the scope2 value to be in the range of 7 to 14.

    This would mean the CMPA count value is too less and based on CAU and CAD settings under ePWM1A pane, the ON time of the signal may be too less to observe. Consider this: When counter = ZERO you set the output, and while counting UP, when we reach CAU which is very low count and we would reach real fast, we set the output to low. Hence this behavior may seem to make the signal appear as low for most part.

    To debug this, could you just try using the PWM block alone and try to generate output with some good numbers for the counter compare such that ON and OFF time can be easily figured out. That would be a good starting point to isolate any settings error from ePWM block. Instead of ADC block you can also try using constant block and validate the PWM output.

  • Halit,

    We haven’t heard from you for a week, so we are assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution or reply to this thread. If this thread locks, please make a new thread describing the current status of your issue.

    - Ken