Arduino programming port pinout ideas

Thread Starter

dpetican

Joined Jan 13, 2016
38
I want to create a programming port connected to serial0 on my Arduino. One of the reasons for this is that once the project is in the box I will not have access to the usb port. Another is a power conflict if I apply power to the USB port.

I've uploaded programs to many Arduinos and bare chips using serial before. However, I've always just tried to press the reset button at just the right moment. Is there a way to do this automatically? I have several USB-TTL converters with these pinouts:

Freetronics: GND,NC,Vout,Tx,Rx,CTS

DF Robot: GND,CTS,Vout,Rx,Tx,DTR

Which one would be better to use and what pins should connect where on the Arduino? Thanks.
 

Thread Starter

dpetican

Joined Jan 13, 2016
38
I don't understand what you want to accomplish.
I'll rephrase in more detail. I want to create a header (on a protoshield, plugged into an Arduino) that is connected to Serial0 (Tx, Rx) of the Arduino. Further, when I upload a program I want the Arduino to automatically reset INSTEAD of my having to manually push the reset button to finish the upload. That's what I meant and thought I had explained by serial programming port.

I think this can be done by connecting either CTS or DTR from the TTL-serial converter to reset on the Arduino. But I'm not sure which and do I need a pull-up on the reset if I do this?

Edit: Resetting the Arduino either manually or automatically is needed so that the bootloader can upload a program.
 
Last edited:

shteii01

Joined Feb 19, 2010
4,644
I think I am still missing something, but that is ok.

When I upload a program into my Uno, it start running as soon as upload is finished. I never touch the reset button.
 

Thread Starter

dpetican

Joined Jan 13, 2016
38
Okay I found the answer, but it took me a while to find a page with a concise and precise explanation. The answer is here, but simply its a matter of connecting a 0.1uF capacitor between the DTR pin of the Serial-TTL adapter and reset on the Arduino. This gives the serial line the same autoreset capability that the USB line has. No guess work button pressing involved when uploading over serial.

Technically speaking the DTR pin goes low and stays low when a connection is made. Reset is an active low pin. So holding it low would keep the Arduino in reset. Whats needed is a low spike. Note that the cap needs to be recharged for the next reset event. On an Arduino board there is always a 10K or so resistor between reset and Vcc that will take care of this. If you are bread-boarding just a chip then you will need to add it if you haven't already done so for a reset button. Like here. Note that pin 1, reset is at the upper left of the chip.

So my header for using the DF Robot Serial-TTL adapter should be this:

Pin1:GND==>GND
Pin2:CTS==>N/C
Pin3:Vout==>N/C (since the board will already be powered)
Pin4:Rx==>Tx
Pin5:Tx==>Rx
Pin6: DTR==>0.1uF cap==>Reset

I'll use a 6-pin male header because the DF Robot adapter has a female connector. I can just plug it in and program. I haven't actually tried this, but will tomorrow morning. Any thoughts between now and then would be greatly appreciated as I'm sure I've made some subtle mistake being tired and all. Thanks.
 
Last edited:
Top