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.

TMDSCNCD28335: assigning external control for PWM duty cycle

Part Number: TMDSCNCD28335
Other Parts Discussed in Thread: C2000WARE

Hi,

I have a quick question for the eCAP APWM Example which generates PWM with a 50% duty cycle ratio. I want to change this duty cycle from an external signal rather than using a fixed duty cycle ratio.

Thanks in advance

  • I assume you will be controlling the duty based on the voltage applied to a device pin, for that look at the ADC examples.

    Combine that code with the APWM example. Scale the ADC value into the ACMP register(which is one of the CAPx registers)

    Examples are in C2000ware found here: C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2833x\examples

    Regards,
    Cody