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: TMS320F28335

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi, How can I read the value of a Gpio? What instruction should I use?

  • Hi Juan,

    Juan Verdin said:
    Hi, How can I read the value of a Gpio? What instruction should I use?

    if(GpioDataRegs.GPADAT.bit.GPIOx==0)      //Check whether button pressed

    The above structure would give you the input GPIO state.

    Regards,

    Gautam

  • Hello,

    Seconding Gautam's answer. Have you downloaded C2000Ware? It contains the header files that will allow you to write to/read from memory mapped registers the way Gautam described. It also has examples that demonstrate other peripherals on the device.

    Whitney