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-CC2650: How to define a PIN as an input or output?

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2640, CC2650

Hi there,

I am new to the TI dev. Can someone explain me how does one define a PIN as an input or output? I have to define some OUTPUT and INPUT pins in order to control and receive data from an analog IC, EM4095.

Is there a programming handbook/web page for TI DEV - a reference for native macros, commands, functions and variables?

Also, I want to create a new project. I have been working on the example project in SimpleLink Academy. The project uses an older version of the BLE stack as well as the ARM compiler. I want to include bluetooth functionality in my project. Which version should I use? The latest or can I use the older version (both BLE and ARM compiler versions).

What all files/folders should I be looking for in the newly created project?

Best,

Azm

  • Hello,

    You should always use our latest SDKs. Go to our website or the resource explorer (Open CCS-> open the VIEW tab-> click on resource explorer) and you can download our demo software and latest SDKs.

    We provide examples on how to do PIN interrupts and configure them as input/output with our interrupt examples. Our best documentation is our simplelink academies, they will teach you how to program and configure our devices step by step.

    For BLE I recommend going into our simplelink academy for the CC2640, this is a very similar device as the one you are using and everything you learn in those trainings will apply to the CC2650.

    Regards,
    AB
  • Hi AB,

    Thanks for the reply. I was looking at the pininterrupt example and came across this thread as well: e2e.ti.com/.../496746
    I do not want to use LED pins. Say I want to configure pin Board_DIO12 as MOD, which is an input. How would one do that?

    Is it anything like this:

    PIN_Config pinTable[]{

    Board_DIO12 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, //MOD
    Board_DIO15 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,  //SHD
    Board_DIO21 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE, //RDY_CLK

    Board_DIO22 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE, //DEMOD_OUT

    PIN_TERMINATE

    };

    My application is for RFID. I have an analog front end as mentioned above in the original post, that outputs a signal from DEMOD_OUT of the IC to the MCU. In addition to that the IC has other pins, RDY_CLK, MOD and SHD which are all crucial for clock synchronization and turning ON/OFF the antenna (which is a coil antenna). 


    Best,
    Azim

  • You can change the PIN table at the top of the source file and add the pin you want with the configuration you desire(input/output/pull up/pull down etc..).
  • AB, I just updated my reply with a code snippet. Can I also rename them in the following way?

    #define RDY_CLK BOARD_DIO21 //Input
    #define DEMOD_PIN BOARD_DIO22 //Input
    #define MOD BOARD_DIO12 //Output
    #define SHD BOARD_DIO15 //Output

  • That looks correct
  • Is there no documentation or tutorial other than the simple academy examples? I am looking for something like the avr libraries(just an example, I am aware that the platforms are different). It's a little hard to follow with the existing examples as a beginner working on a project with little to no reference on the TI_RTOS platform.
  • Hello,

    All our documentation can be found on our product page, here you will be able to find datasheets, technical reference manuals, application notes and more.

    As for tutorials, we offer simplelink academies, we have simplelink academies for TI drivers, protocol stacks, TI-RTOS, and some other ones.

    For everything else that cannot be accomplished with this documentation you use our forums to search for similar questions, and in the case you cannot find an answer to a question we are always here responding to your questions.

    I hope this helps,
    AB
  • Well, I am glad the E2E community has helped me so far. I will post any new questions if I have any. Thanks again. :)

  • Hello Azim,

    I am glad we are able to help you! thank you for thanking us :D
    If any of the previous answers I posted before answered your question please do not hesitate to press the green TI ANSWERED button.

    Thanks again!
    AB