How To Program The Arduino Pro Mini Using A Programmer

Table of contents:

How To Program The Arduino Pro Mini Using A Programmer
How To Program The Arduino Pro Mini Using A Programmer

Video: How To Program The Arduino Pro Mini Using A Programmer

Video: How To Program The Arduino Pro Mini Using A Programmer
Video: Arduino Tutorial: How to program the Arduino PRO mini 2024, November
Anonim

In the life of a novice arduino player, sooner or later a moment comes when you want to save on the size of your product, without sacrificing functionality. And then the Arduino Pro Mini is a great solution! This board, due to the fact that it does not have a built-in USB connector, is one and a half times smaller than the Arduini Nano. But in order to program it, you will have to purchase an additional - external - USB-programmer. How to "fill" the written program into the memory of the microcontroller and make the Arduino Pro Mini work, and will be discussed in this article.

How to program the Arduino Pro Mini using a programmer
How to program the Arduino Pro Mini using a programmer

It is necessary

  • - Arduino Pro Mini;
  • - a computer;
  • - USBASP-programmer;
  • - connecting wires.

Instructions

Step 1

First, a few words about the programmer itself. You can buy one for $ 2 in any Chinese online store.

The USB-A type connector is used, of course, to connect the programmer to a computer.

An ISP connector is needed to connect to the programmable board.

Jumper JP1 controls the voltage at the VCC pin of the ISP connector. It can be 3.3V, or 5V. If the target device has its own power supply, remove the jumper.

Jumper JP2 is used for flashing the programmer itself; not covered in this article.

Jumper JP3 is required if the target device's clock speed is below 1.5 MHz.

Two LEDs indicate: G - power is being supplied to the programmer, R - the programmer is connected to the target device.

USBASP programmer
USBASP programmer

Step 2

Let's connect the programmer to the USB port of the computer. Most likely, after a short time, the operating system will report that it could not find a driver for this device.

In this case, download the driver for the programmer from the official site https://www.fischl.de/usbasp/. Unpack the archive and install the driver in a standard way. The USBasp programmer should appear in the device manager. The programmer is now ready for use. Disconnect it from the computer.

Install the driver for the USBASP programmer
Install the driver for the USBASP programmer

Step 3

Next, you need to connect the Arduino Pro Mini board to the programmer. The diagram below shows how to do this.

Arduino Pro Mini wiring diagram to the programmer
Arduino Pro Mini wiring diagram to the programmer

Step 4

We will use a breadboard and connecting wires - it will be fast and reliable. We connect the programmer connector to the pins on the Arduino Pro Mini according to the diagram above.

Connecting the programmer to the Arduino Pro Mini
Connecting the programmer to the Arduino Pro Mini

Step 5

Open the Arduino IDE. Select the desired board through the menu: Tools -> Board -> Arduino Pro or Pro Mini (Tools -> Board -> Arduino Pro or Pro Mini).

You also need to select the type of microcontroller, which is set through the Tools -> Processor menu. I have this ATmega 168 (5V, 16 MHz). These parameters are usually written on the microcontroller case.

Selecting the type of target ATmega microcontroller
Selecting the type of target ATmega microcontroller

Step 6

Select the type of programmer: Tools -> Programmer -> USBasp (or Tools -> Programmer -> USBasp).

Specify the type of USBasp programmer
Specify the type of USBasp programmer

Step 7

Let's open the sketch that we want to load into the microcontroller's memory. For example, let it be a blinking LED: File -> Samples -> 01. Basics -> Blink.

We connect the programmer with the Arduino Pro Mini connected to it to the computer.

Now, in order to load a sketch into Arduino using the programmer, you can do it in several ways.

1) Via the File menu -> Load via the programmer;

2) using the keyboard shortcut Ctrl + Shift + U;

3) while holding down the Shift key, click on the right arrow button, which is usually used to load a sketch into Arduino memory in the standard way.

That's it, the program is "flooded" into the microcontroller's memory.

Recommended: