tx pin active while loading program

Hi,

When I load my program into the arduino by:

  1. ) pressing reset on aurdino ng
    2.) pressing "upload to i/o board" in software

the tx pin seems to echo out what is coming in over usb.

Is it possible to stop this? I have the tx pin connected to external components and they do
not like the random data sent to them.

Currently I have to unplug the tx pin while uploading a new program.

Any ideas or advice?

Thanks.

the tx pin seems to echo out what is coming in over usb.

The data sent over USB "goes into" the TX/RX pins of the device.

--Phil.

the tx pin seems to echo out what is coming in over usb.

The data sent over USB "goes into" the TX/RX pins of the device.

--Phil.

Understood - sorta :slight_smile:

I thought that the usb data would be coming in the rx.

It seems like it is getting echo'd out the tx.

Thanks for the reply, btw.

I thought that the usb data would be coming in the rx.

It seems like it is getting echo'd out the tx

The bootloader checks the data before writing it to memory. The pattern you see is a long burst from the computer, followed by a short blip back to the computer. This is a chunk of the program uploading to the arduino followed by the bootloader saying "that chunk was OK".

Sorry, but that's just the way the bootloader works. You're stuck with disconnecting your other device, unless you want to buy a programmer and download the program via ICSP, or come up with some sort of circuit that electrically disconnects or powers down your peripheral while booting.

-j

A way to solve this is to use a relay or a pin in the arduino(assuming low-ish power device) to turn on or off the serial component.

Currently I have to unplug the tx pin while uploading a new program.

It may not be clear to everyone, but you don't need the Tx pin connected in order to download a sketch. Even though it seems to ACK back to the IDE, all that is needed is Rx (+Vcc & Gnd).

It sounds like you already know this, but unfortunately the "ACK" can't be turned off. So it looks like your best bet is to somehow automate disconnecting the Tx to your device. Does your device need the Rx to send data back to the Arduino?

If not, the trick would be to know when your loading a sketch and use a relay or something as was suggested. Sounds like a lot of work. It all depends on how big a problem it is.
John

It may not be clear to everyone, but you don't need the Tx pin connected in order to download a sketch. Even though it seems to ACK back to the IDE, all that is needed is Rx (+Vcc & Gnd).

Really? I thought that avrdude used two-way communication (using something like the STK500 protocol) to upload the code.

--Phil.

It may not be clear to everyone, but you don't need the Tx pin connected in order to download a sketch. Even though it seems to ACK back to the IDE, all that is needed is Rx (+Vcc & Gnd).

Really? I thought that avrdude used two-way communication (using something like the STK500 protocol) to upload the code.

I'm sorry! I was probably wrong . And I said it with such certainty too! ::slight_smile:
(Before I posted, I even checked some projects I made and still screwed up!) My rule here was not to post unless I knew what I was talking about, but **it happens, I guess.

Follower, thanks for catching that.
John

If you're going to be reprogramming your device with any sort of regularity, I'd say throw an optoisolator, or other sort of relay, on the tx line between the arduino and your serial device, and have that controlled by some other pin.

If you're only reprogamming it until you've got it debugged (and you're not programming it while it's in some sort of enclosure) best thing to do is just disconnect the tx line before reprogramming. It's a pain, but you're stuck with it. ...unless you move from arduino to sanguino, or you want to move your device over to a software serial connection.