The 2024 Embedded Online Conference

Pololu AVR programmer on Arduino ATMega328P

Started by Oldroller 4 years ago5 replieslatest reply 4 years ago317 views

I have an AVR Programmer v2.1 from Pololu that I want to use on Arduino Mini USB Nano ATMega328P boards. These boards don't have the 2x3 pin ISP connector used on Pololu boards but have 6 pins in-line at the board end marked: DTR, TX, RX, Vcc, GND, RAW. The Polulu Programmer also sports a 6-pin in-line connector marked: B, RX, TX, Vcc, A, GND , in addition to the 2x3 pin ISP connector.

My question is: Will this programmer work on the Arduino board when I use Atmel Studio 7 to download?

#Arduino #AVR

[ - ]
Reply by doctekNovember 21, 2019

When I google for "Arduino Mini USB Nano", the boards shown have a usb on one end and a 6 pin programming header on the other. If that's the case, I don't understand what your are asking.

But I'm going to assume that you really have a some flavor of ProMini that has the 6 pin connector you describe on it. That connector is designed to mate to a USB to Serial adapter. With such an adapter, you can use the Arduino IDE to program your part as an Arduino. 

But it sounds like you don't care about Arduino and want to use the Atmel IDE and a standard ISP programmer (the 2x3 connector). You can do that, but you have to be a little bit clever. You must hook up the ISP pins to the correct pins on the ProMini. This is easy to do: just locate the correct pins on the ProMini (Vcc, Gnd, MOSI, MISO, Sclk, and Reset) and connect the ISP to them. You can use a breadboard or run jumper wires to do this. Simply google for the ProMini pinout, hook up the Programmer to the correct pins (MISO to MISO, and MOSI to MOSI) and Bob's your uncle!

[ - ]
Reply by mr_banditNovember 21, 2019

I assume this is what you have: https://www.pololu.com/product/1300

"The USB AVR programmer doubles as a USB-to-serial adapter. The programmer installs as two virtual COM ports: one for communicating with programming software and one for the general-purpose USB-to-serial adapter. This means that you can seamlessly switch between programming an AVR and debugging it through the TTL serial port without having to open and close your terminal program. In addition to the serial transmit (TX), and receive (RX), lines, the programmer lets you use pins A and B as serial handshaking lines. The programmer’s configuration utility allows you to select which handshaking line is assigned to which pin, and both input and output handshaking lines are supported."

You would need to set A or B to be DTR.

Also - I assume both sides are 5volts.

See https://www.pololu.com/product/1300/resources for downloading their drivers. According to https://www.pololu.com/docs/0J36 they support Atmel Studio 6, so there is a good chance 7 does as well. see https://www.pololu.com/docs/0J36/3.b

The Atmel Studio should produce a .hex file (generally Motorola S-rec format) that the pololu says it happily eats. Worth a try

I will sometimes use the Atmel Studio to compile, and use another device to load the code.  The easiest way is a USB to TTL adapter and the Arduino.cc loader. See https://www.adafruit.com/product/70

Let us know how it goes!

[ - ]
Reply by OldrollerNovember 21, 2019

Thank you all for the helpful suggestions.

I am making some progress: after looking up the pinout for the Arduino Pro Mini, I hooked up the AVR Programmer's ISP to the Pro Mini's 

MOSI, MOSO, SCK, RST, Vcc, & GND, and plugged in to the USB port. Some program is already running on the Pro Mini as the PB5 LED is blinking  and the power LED is on. My Pro Mini is marked "Deek-Robot" so is obviously a copy of the real thing. Still, the chip is clearly labelled "Mega328P" and it seems to be working.

I then tried to download a new program with Atmel Studio 7 but the programming function failed to detect the correct device ID so would not download. Device Programming function shows STK500 tool, ATmega328P Device, and Interface ISP, but this combination would not "Apply".

I'm hesitant about going the Arduino IDE route as it means buying another programmer and climbing another learning curve.

[ - ]
Reply by mr_banditNovember 21, 2019

You can run the arduino.cc tool and point it to the .hex file Studio 7 produces. There is a single button to do the download.

You need to setup the Arduino IDE to recognize the right chip && point to the .hex file, but that is fairly easy. The chip selection is critical so the tool knows howto deal with the bootloader. But all of these are pull-down menus. Since you seem to have the right cable, it should not be a big deal.

I have done this before. Not hard.

[ - ]
Reply by OldrollerNovember 21, 2019

Connecting MOSI, MOSO, SCK, RST, Vcc, & GND on an Arduino Pro Min clone was more successful with downloading a program using Studio 7 and the USB AVR programmer.

Many thanks for all the helpful suggestions.


The 2024 Embedded Online Conference