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.

Regarding GPIO

Hi,

Will anybody  help me with a sample code for reading status of user switch in TM4C123GXL launch pad and to glow an led based on status of switch?

Regards,

Sarath

  • Hello Sarath,

    Please check the blinky example code to see how an LED can be switched ON and OFF. This is there in the TivaWare. Once you are able to get the basic code working you can use the same code to set another GPIO in input mode and then check if it is High or Low to switch the LED on and OFF.

    Regards
    Amit
  • Hi Amith,
    Thank you for your reply.
    I have tried tat but its not working. It will be very much helpful if you send me a sample working code.

    Regards,
    Sarath
  • I have tried tat but its not working. It will be very much helpful if you send me a sample working code.

    The examples in TivaWare ARE working. If you are not capable of getting them to run, be more specific about what your problems are.

    Show that you at least tried to understand what you are dealing with.

  • f. m. said:
    Show that you at least tried to understand what you are dealing with.

    Or (one suspects) start the HW assignment earlier and/or ask the teacher for assistance...

    "Only" sample (and working!) code will do.   (it's understood that the need is "urgent.")

  • Hello Sarath,

    If you have tried it then please share the code so that we can review the same. Also do look at the Programming Example in the TivaWare DriverLib User Guide for GPIO.

    Regards
    Amit