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: What is the command for reading the ADC and writing on GPIO?

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE, LAUNCHXL-F28027F, ENERGIA, LAUNCHXL-F28379D, TMDSDOCK28379D

Tool/software: Code Composer Studio

Hello

I am trying to do a project using CCS v7 and TMS320F28335 experimenter's kit.

Before this I used Arduino and it was very easy to read analog input and write on digital output but in CCS I can't understand how to do it. I studied examples of controlsuite but I can't get it.

Should I only use the main.c of a template and write my program there? or do I need to change other files in a project also?

how can I determine a GPIO to be an output and what is the command to write "high" or "low" on GPIO?

How can I read the signal given to ADC?

Thank you for the help.

Ata

  • Hi,

    You can download C2000ware for example codes and navigate to :
    ADC Example: C:\ti\c2000\C2000Ware_1_00_01_00\device_support\f2833x\examples\adc_soc
    GPIO Example: C:\ti\c2000\C2000Ware_1_00_01_00\device_support\f2833x\examples\gpio_toggle

    Regards,
    Gautam
  • Ata,

    The examples for F28335 use C to program hardware registers directly.  You will need to consult the various reference manuals to understand the architecture and register definitions.  There are some good workshops that cover the basics: processors.wiki.ti.com/.../C2000_Archived_Workshops

    Starting from an existing example and only modifying the top-level file with main() would be recommended.

    A development environment closer to Arduino would be Energia using LAUNCHXL-F28027F: energia.nu/.../

    Something in-between would be LAUNCHXL-F28379D or TMDSDOCK28379D with the driverlib APIs in C2000Ware.  Functions are included for common tasks, but architecture knowledge is still required.

    -Tommy