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.

EK-TM4C123GXL: Serial UART Tx Pin Selection for EK-TM4C123GXL

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: ENERGIA,

Hello,

Learning UART on the launchpad, I have created a simple Energia program to send out letters serially that can be displayed on a serial monitor such as Putty. In its current configuration, the launchpad is transmitting data out of the debugger's virtual serial port via the USB cable to my PC.

I would now like to do this using one of the available serial UART Tx pins of the EK-TM4C123GXL to send the data to a different device on a breadboard. I would like, for, instance to have data transmitted out of the TxD pin (circled in the image below) OR any other serial UART Tx pin on the board (orange labels).

Is there a way to simply specify a certain Tx pin in the code below? Documentation lists Serial1, Serial2, Serial3,....etc, however, no specific pins are mentioned. "Serial" appears to be linked to pins PA0 & PA1 from the schematics, however, they don't appear to be broken out (unless TXD circled below is A0?).

I also realize that if I wanted to monitor a Tx pin on the PC, I would first need to connect that Tx pin to a 3.3V TTL to USB converter prior to connecting it to my PC, or so I think?

Any insight on this would be highly appreciated!

Code:

void setup() {


Serial.begin(9600);  //Baud Rate

}

void loop() {

Serial.write(0x41);   //Sends A to the Serial Monitor
Serial.write(0x42);   //Sends B to the Serial Monitor
Serial.write(0x43);   //Sends C to the Serial Monitor
delay(1000);            //Repeat every 1 Sec

}

Output:

  • Hi Rob,

    Unfortunately we don't provide Energia support for TM4C on E2E. We have no experience with Energia and I know no better than you do about how the Serial1/2/3 etc. correspond to UART.

    My guess is that Serial1 --> UART0, Serial2 --> UART1 etc. - See if the behavior tracks that way.

    You could try and ask for Energia help here: https://forum.43oh.com/forum/119-energia/

    I also realize that if I wanted to monitor a Tx pin on the PC, I would first need to connect that Tx pin to a 3.3V TTL to USB converter prior to connecting it to my PC, or so I think?

    Yes, you would need a converter to handle that. For UART0, the ICDI interface will do this for you, but for any other UART, then you need such a converter. They are pretty simple to use though, I've done it and it's really as simple as connecting the pins, plugging it in, and installing a driver.

  • Hello Rob,

    I think you meant to share the following as a post here.

    In regards to the UART Tx Pin selection question I posted for the EK-TM4C123, I believe "Serial.write()" as written in the code, refers to UART0, while "Serial1.write()" would refer to UART1, "serial2.write()" would refer to UART2, and so forth. If this is the case, are you suggesting that the TXD pin (Circled in my post) is in fact UART0, which has already been converted to RS-232 by the ICDI? If so, I could simply connect this to a PC without needed any level shifting? Would it be best to scope that TXD pin to verify voltage levels?

    The circled pin is the TXD associated with UART0, but it is not converted yet. The conversion occurs inside of the TM4C123G device that is the ICDI and it happens in software and the result is output over USB. So you have to plug the USB port into your computer to get the converted UART0 data.

    Hopefully that helps explain things clearly. The ICDI UART->USB piece can be a bit confusing. Slight smile

    And yes you can scope the TXD pin to see if that the Energia code is outputting over those pins, that would be a good way to debug that the right APIs are being used.