Tuesday, February 24, 2015

Programming an Arduino Mini with an Arduino Uno

The Arduino Pro Mini is a fantastic bit of kit - but it lacks an on-board USB driver which means programming it has to be done through a serial interface.

Most guides use an FTDI cable/board.
Which is probably the easiest way to do it - however if you don't have one handy you can also use another Arduino you might have laying around. In my case, I had an Arduino Uno.

Wiring

Wiring the Mini to the Uno


Uno Pro Mini
RX RX1
TX TX0
GND GND
5v Vcc

This tripped me up a bit originally - the Uno RX goes to the Mini RX1 pin, and the Uno TX goes to the Mini TX0 pin. It's opposite what you might expect - except that when using the Uno as a programming interface you are bypassing the ATMega328 on the Uno and essentially the Mini becomes the ATMega that the USB interface uses. Which means you want the RX/TX pins to line up the same.

From here - you have two options for programming the Mini. In both cases - I had to manually press the reset button on the Mini as soon as the upload started so the bootloader was in the proper state to accept new programming. You can wire the Uno RESET to the Mini's BLK pin and the IDE is supposed to be able to reset the Mini on demand - but I wasn't able to get it working.

Option 1

Remove the ATMega328 chip from the Uno board. When you upload the sketch, it will go directly to the Mini with no problems.

Option 2

If you don't want to remove the ATMega chip from your board, or you have an SMD Arduino Uno where you can't remove the chip, you can bypass it. To do so:
1. Unplug the Uno from USB
2. Hold the reset button down on the Uno
3. Plug in the USB cable to the Uno, keeping the reset button down
4. Press upload in the Arduino IDE
5. Once upload is complete, release the reset switch.

I like option 2 because there is less risk of damaging the Uno's ATMega328 pins when removing and reinstalling the chip.

No comments :

Search.

Google