Use a Nano board to upload a sketch to UNO or DUE

Members

I would like to know if its possible to use a Nano dev board (ATMega chip removed) to upload sketches to a DIY board?
The pin layout is:

Nano UNO/Due

GND GND
5V ------------------------------------------ 5V/3.3V
Rx Tx
Tx ---------------------------------------------- Rx
10 RESET

Thanks for the advice

There are on line tutorials for this worth a google rather than repeat here

  • your processor needs to have a boot loader installed.

I tend to use a programmer off eBay - very cheap. You could also put your new processor in an Arduino board and program it there directly

Ive got the bootloader covered through the ISP port.

Is it possible to use an NANO to upload a sketch?

So you're just trying to use the Nano (without an ATMega) for the USB-Serial? You can do that, although you wouldn't use pin 10 of the Nano for Reset. You'd use the Reset pin.
You also can't hook it straight to a 3.3V board like the Due, obviously.

Thanks BJHenry.
Is this the acceptable pin connections?

Nano UNO /Due

GND GND
5V -------------------------------- 5V /3.3V
Rx Tx
Tx -------------------------------- Rx
RESET RESET

If you connect 5V on the Nano to 3.3V on the Due then you'll destroy your Due.

If you connect the TX pin on the Nano directly to the RX pin on the Due without using a level shifter, you'll damage or destroy the Due. You need to understand that the Due is a 3.3 V device, while the Nano is a 5 V device.

It might seem wrong, but you actually need to make the connections between the Nano and the target board RX-RX, TX-TX. The reason is because what you're actually trying to do is communicate between the USB to TTL serial chip on the Nano and the target microcontroller. The USB to TTL serial adapter chip is connected in a RX-TX, TX-RX configuration with the ATmega328P microcontroller and the pins on the Nano are labeled according to their function on the ATmega328P. So a RX-RX, TX-TX according to the labels on the board is actually an RX-TX, TX-RX connection between the USB to TTL serial adapter on the Nano and the microcontroller on the target board.

I don't think the reset-reset connection is going to work. You need to connect the reset on the Nano to the ground pin on the nano to hold the ATmega328P on the Nano in reset, otherwise the ATmega328P is going to think you're uploading to it and it will interfere with the upload to the target board. That reset-ground connection on the Nano is going to kill any hope you might have had of the reset-reset connection working as an auto-reset circuit. You could maybe accomplish this with a DIP Uno instead of the Nano, where you can pull the ATmega328P from the socket, but you can't do that on the Nano.

Why do you want to do this?

Pert

This is one of the most informative pieces I have read on this subject. Thanks a lot. I understand it so much better.

If the ATMEGA is removed on the NANO will the RESET -- RESET work?

fnb111:
This is one of the most informative pieces I have read on this subject. Thanks a lot. I understand it so much better.

You're welcome. I'm glad if I'm able to be of assistance.

fnb111:
If the ATMEGA is removed on the NANO will the RESET -- RESET work?

I'm not sure. I recently tried to use an FTDI FT232 module (which is the equivalent of a Nano with the ATmega328P removed) to upload to an Uno board and I couldn't make the auto-reset circuit work. I think the reason was that the existing auto-reset circuit on the Uno was interfering with the auto-reset circuit I had wired from the FTDI module. However the person on the forum I was trying to help tried the same thing and it worked for them. So I think it's kind of hit and miss whether it works.

In order to upload, the bootloader needs to be activated. This is done by resetting the microcontroller. However, the bootloader only runs for a short time before timing out and switching to running your sketch so the reset has to be timed just right during the upload. Normally, we have an auto-reset circuit set up that resets the microcontroller at just the right time during the upload. The auto reset circuit consists of the DTR or RTS on the USB to TTL serial adapter chip connected to the reset pin via a 0.1 uF capacitor. You can use either DTR or RTS, it doesn't matter which. This converts the signal on the DTR or RTS pin into a reset pulse at the right moment of the upload.

If you don't have an auto-reset circuit, you'll need to manually reset your Arduino during the upload. When you don't have that auto-reset, and are resetting manually, you need to get the timing right. If you press the reset button too early, the bootloader will have already timed out by the time the upload starts. The tricky thing is that when you press the "Upload" button in the Arduino IDE, it first compiles your sketch before starting the actual upload. So you need to wait until after the compilation finishes before pressing the reset button. The way to get the timing right is to watch the black console window at the bottom of the Arduino IDE window. As soon as you see something like this:

Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

press and release the reset button.

So it's not the end of the world if you don't have auto-reset, but it is kind of inconvenient to have to do the manual reset every time you upload.

pert:
I don't think the reset-reset connection is going to work. You need to connect the reset on the Nano to the ground pin on the nano to hold the ATmega328P on the Nano in reset, otherwise the ATmega328P is going to think you're uploading to it and it will interfere with the upload to the target board.

That OP's Nana has had the ATMega removed, so it won't interfere with the Serial side of things.

Ah, I missed that. Thanks for clarifying!

Thanks to everyone for the informative update. I appreciate all the help.