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.

About single value assignment to pins of port of Tm4c1231g microcontroller

#define    cmd        GPIO_PORTN_BASE                  
#define    data       GPIO_PORTF_DATA_R
#define     rs           GPIO_PIN_0 
#define     rw          GPIO_PIN_1 


GPIOPinWrite(cmd, rs,1);
SysCtlDelay(4000000);

GPIOPinWrite(cmd, rs,0);
SysCtlDelay(4000000);

Is it valid operation for blinking of PORTF.0 and PORTF.1 LED. as Led is connected with PORTF led.

if not then any suggestion to do the same.

Thanks

  • Topic has been covered (to exhaustion) here - your use of forum "search" will provide volumes of data.

    Perhaps more read of the MCU manual is in order?   PF0 is "plagued" with the (mostly) unwanted NMI default setting - special handling is detailed w/in the manual.

    While your use of "1" to turn on bit 0 will work - it will fail for each/every "non bit 0 bit!"   The unique bit position bit (or bits) must be (instead) employed.

    Clear that you are preparing to run a text Lcd - and the initialization of such is very critical - good (similar) read of Lcd controller manual will immensely aid...

    Ending (most always) on an "up" note - you've well understood the value of parameter 2 w/in, "GPIOPinWrite()" to confine the function's impact to a single port bit!  (not a single value...that would be "bit" pointless - would it not?)

  • Hello Sefu,

    Forum serach reveals more.

    e2e.ti.com/.../448183

    Regards
    Amit