So I was playing around with a barebone arduino programming it as described in this tutorial.
Then I decided to disconnect the rx line from the atmega328 and connect it to a led's anode (cathode to gnd) and try uploading a sketch. The led doesn't blink at all but instead is steadily dimmed.
I then connected the rx line back to the atmega328, connected the led in parallel to rx and it blinked normally, visibly transferring data.
Why did the led not blink when i disconnected rx from the atmega? Can I output the rx data to the led without the line being connected to an atmega?
NOTE: There is no end-goal here, neither a practical use. I'm just curious and want to understand what is going on...
Possible explanations (can't say which one, since you haven't provided unambiguous descriptions of what you've done)
You disconnected the common ground as well, or don't have common ground
You are looking at the wrong line - are you looking at the Arduino's RX line or the serial adapter's RX line? The adapter's RX line, if disconnected from the Arduino, would just be pulled up towards Vcc by the adapter (probably weakly - hence the dimmed LED you're seeing), but would not see any data - all the action is on the Adapter's TX line which is connected to the Arduino's RX.
You realize the process of uploading a sketch is a two-way protocol - it sends only a couple of characters and then waits for a response, if you disconnect one of the wires, there will be only a very small amount of activity before it realizes there's a problem and stops sending
You realize that serial is active LOW - so your LED will turn off when data is sent, not the other way around.
Also, background: Each UART/Serial device has a TX and an RX - transmit and receive. Device1's TX is connected to Device2's RX and vice versa. Idle state of a serial line is HIGH.
Also, you must use a resistor in series with the LED (otherwise you can damage it or the thing driving it with excessive current); if I am using it for serial, I would use at least a 1k resistor, preferably higher, to make sure I wasn't interfering with the signal being transmitted.