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.

CCS/TMS320F28335: Need help with Buck converter code development

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I am new to CCS. I downloaded CCS 8.0 and want to develop a code to run a buck converter using TMS320F28335 developers kit. Can someone provide me a sample code and header files that I need to read the data of the ADC pins, compare those and generate a PWM output on ePWM pins?

Control logic I am trying to develop:

Generate error signal from comparing the values across two ADC inputs (reference and feedback) if the error is positive (i.e. reference > feedback) increase the duty cycle of ePWM output else decrease the duty cycle of ePWM.

Also if I want to read the corresponding digital value for input voltage on the ADC pin how do I do that?

  • Ishaan Puranik said:
    I am new to CCS. I downloaded CCS 8.0 and want to develop a code to run a buck converter using TMS320F28335 developers kit. Can someone provide me a sample code and header files that I need to read the data of the ADC pins, compare those and generate a PWM output on ePWM pins?

    The official support files are distributed through C2000Ware: \C2000Ware_XXXX\device_support\f2833x

    Ishaan Puranik said:
    Also if I want to read the corresponding digital value for input voltage on the ADC pin how do I do that?

    A basic ADC example is here: \C2000Ware_XXXX\device_support\f2833x\examples\adc_soc

    There is an old F2833x Workshop that you can review for introductory information.

    There is an old Digital Power Workshop that you can reference for more targeted information.  It was created for an older (but very similar) device.  F2833x has an FPU so you can use native floating point operations instead of the IQ library if desired.