Skip to main content
Arduino

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Using TX as gpio, while using RX as serial pin to read data from other uC - Arduino atmega8

I am having a circuit that I am using the RX pin to receive data (int) from other uC (ESP12E) as one way communication, and for the lack of pins I had to use the TX pin as GPIO for a digit of a seven segment display.

The circuit and display works fine before I use the Serial.begin(9600) in the setup function.

After I init my serial connection the program stop working.

I'm am using atmega8 with Arduino framework, and wondering if the issue I am facing is caused because of this usage of TX as GPIO and RX as serial communication pin. If yes, how can I solve this issue by identifying only the RX as serial pin and be able to use the TX as GPIO.

For some reason software Serial library doesn't work fine with atmega8.

Answer*

Draft saved
Draft discarded
Cancel
2
  • 1
    That won't help. According to the datasheet, "When the Transmitter is enabled, the normal port operation of the TxD pin is overridden by the USART and given the function as the Transmitter’s serial output." Commented Feb 2 at 19:08
  • Ahh, you're correct, as usual, @EdgarBonet! The correct setup for the Tx pin, in this case, would have to include dis-associating the pin from the UART. Commented Feb 2 at 19:14

AltStyle によって変換されたページ (->オリジナル) /