Electronic – arduino – How to upload code to an Arduino Nano once the custom PCB is designed and ordered

arduinopcbpcb-design

I am fairly new to electronics and have bummed into a situation.

I was working on a project recently involving an Arduino Nano. Up until now, everything was on a breadboard. I had the flexibility to upload all sorts of code to it.

Last weekend I thought it's getting a bit messy with all the wires and stuff. Let's get a custom PCB of it. I designed it and placed the order with a local vendor.

The thing that I did not consider before placing the order was how to upload the code on the Nano now.

From the Gerber file, I am confident that the PCB which is going to arrive shortly will not have the USB port.

Without the USB port, how will I transfer my code to the PCB?

Did I miss/skip a step during all this where I tell the vendor this code needs to be present on the PCB, or will I still have the option to upload my code?

Best Answer

If your code doesn't need USB to run (e.g., it doesn't read or print to serial) and only uses USB to upload code, you actually did the "right" thing by not adding a usb to the board.

You can, instead, use the native ICSP interface to upload code. You don't need a bootloader at all (the bootloader is the thing that allows you to upload code "normally" over usb). You'll still use your computer's USB port, but the atmega's ICSP.

See instructions at: https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP

Specifically the description about what is an ICSP and bootloader. The circuit diagram you need is above the text "This Arduino NANO is programmed through its ICSP connector with wires coming from D10-D13 of the programmer UNO board."

Related Topic