Is Pololu USB AVR Programmer v2 compatible with the Arduino IDE?

I need to speed up the startup of my Pro Trinket project, and eliminating the bootloader seems like the way to go. If I do this, I’ll need to use a programmer to download my program (I don’t know if my FTDI cable will still work). I’m sure the Pololu programmer can do the job electrically, but will it be recognized by the IDE? Also, will it provide enough power to my Tinket for it to be programmed, or does the Trinket’s external power need to be provided? Thanks.

Yes, our USB AVR Programmer v2 is compatible with the Arduino IDE; you can find instructions for this in the “AVR programming use the Arduino IDE” section of the USB AVR Programmer v2 User’s Guide.

By default, the programmer does not supply any power in its VCC pins. However, you can configure VCC to be an output using the configuration software. More details about this can be found in the “Using VCC or VBUS to supply power” section of the same user’s guide.

Brandon

Thanks, Brandon. I bought the programmer and installed and configured it according to sections 8.0 and 5.4 of the User’s Guide (configuration here). All the LEDs on the programmer blink appropriately, and the Pro Trinket powers up and runs the previously loaded Blink sketch. My problem is uploading a sketch via the new programmer. My only Pro Trinket choices from the Boards menu are USB and FTDI, but uploading fails with both, as well as with Arduino/Genuino Uno. I’m connecting via the serial header on the end of the board. The upload output is below (sorry about the weird formatting; your editor is a little quirky):

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Karl\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel STK500
         Programmer Model: STK500
         Hardware Version: 15
         Firmware Version Master : 2.10
         Topcard         : Unknown
         Vtarget         : 4.8 V
         SCK period      : 8.7 us
         Varef           : 0.0 V
         Oscillator      : Off

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

An error occurred while uploading the sketch

Despite the error message, the Programmer is set to Atmel STK500 development board. I should say I get this message when using the COM port set to Programming port. When I set it to TTL port, I get repeated “avrdude: stk500v2_ReceiveMessage(): timeout” messages. I’ve also tried changing the programmer’s line B to DTR reset with no effect.

Any suggestions?

If you are trying to program your Pro Trinket directly without using the bootloader, you will need to use ISP. You can find details about making the required connections in the “Connecting an AVR for programming” section of the USB AVR Programmer v2 User’s Guide.

Brandon

Thanks, Brandon. I tried the ISP connection, but the configuration utility wouldn’t see the target (everything was grayed out), and no power was getting through to it, though it had no problem seeing it in TTL mode (or whatever the other mode is called). I’m out of town until Wednesday, but I’ll try again when I return.

If you cannot get ISP to work the next time you try it, please post pictures showing how everything is wired up.

Brandon

Hi, Brandon. I double-checked my wiring and still no dice. Here are a couple of pix: ISP wiring. Sorry for all the yellow wires; I wasn’t thinking I was going to be sharing my header wiring when I made it up. Hopefully, between the overhead and oblique views, you can tell what’s going where. I’ve labelled the Vcc wire to help orientation. Here’s a pinout for the Pro Trinket and one for the programmer.

Thank you for the pictures. I did not notice anything obviously wrong with your connections. What happens when you try to program the board? Can you post the full verbose output from the Arduino IDE, including the AVRDUDE command? Also, could you post a screenshot from the programmer’s configuration utility software after your failed attempt to program?

Brandon

Naturally, now it works. :wink: Must be a breadboard connection issue. Thanks for your help anyway.

2 Likes

I am glad you were able to get it working! Thank you for letting us know.

Brandon

I think I spoke too soon. I thought the flakiness of the connection was due to the breadboard, but when I tried to implement it with soldered wires in my application, I couldn’t get it to work at all. So, I created a dedicated board with just the Pro Trinket and connector for the ISP (pix here) and it doesn’t work either. I think you’ll find the wiring a little clearer.

When I connect the ISP to a USB port (but not the board), the green LED is on solid and the two yellow LEDs flash quickly. When I then connect the ribbon cable to the test board, the green LED goes out, the red LED flashes, and only one of the yellow LEDs flashes occasionally.

The Pro Trinket lights up and works fine in this configuration when connected to either a USB or FTDI cable.

Any suggestions?

It sounds like you are running into the situation described in the “Using VCC or VBUS to supply power” section of the USB AVR Programmer v2 User’s Guide. As noted, the load on VCC should not have more than a few microfarads of capacitance; putting too much capacitance on VCC can cause the programmer to brown-out or cause disruptions in the USB connection. Can you try disabling the programmer’s VCC output and powering your Pro Trinket from its own USB port?

Brandon

Aah, yes. That seems to have been the problem. Thanks again.