Pololu AVR PROGRAMMER V.2.1 Powers off after enabling VCC OUTPUT

Hey guys I enabled VCC output while trying to burn my first bootloader to an Atmega328P I bought off of Digikey. Here is what it looks like.

And here is what the settings for the Pololu look like, as I said, I enabled VCC output and set it to BOTH voltages and neither worked. I assumed I needed to enabled the vcc because otherwise it wouldnt run... right? or should I get an external power source for burning it?

My testing showed an external power source is needed. I didn't try running a wire from the VBUS hole to the VCC pin of the chip being programmed.

I am not sure initial programming in 3.3V mode works. I think I tried that once on a board years ago, found out it didn't work and that 5V was needed.

Thanks man, I turned it into this:

And these are the pins:

But I still get the same error code that I keep on getting!

It's really frustrating because this is the second time that nothing has worked and I still cant even burn the bootloader to the microchip :frowning:

I’d be extremely greatful is someone could respond by tmr

The Pololu programmer looks really interesting. It's got some nice features.

But I suspect that most of the people here who use a device programmer have something else.
(I've got a PICKit4, an Atmel ICE, a JTAG-ICE3, several Microchip SNAPs, a (genuine!) STK-500, several Xplained, Xplained-mini, and Xplanined-nano boards, and probably a couple of others, but I still use an Arduino Derivative running "Arduino as ISP" for most of the actual Ardunio board burning...

Two things.
Sorry, I see you already had that selected.
Select 114 KHz for the ISP Frequency if you are using a factory Chip set at 1 MHz.
Also the diagrams showing the cable hookup look backward to me which would give you a wiring error.

kprims:
Two things.
Sorry, I see you already had that selected.
Select 114 KHz for the ISP Frequency if you are using a factory Chip set at 1 MHz.
Also the diagrams showing the cable hookup look backward to me which would give you a wiring error.

Ok that was selected and I rewired the wires and completely redid them but it still gives me the SAME DARN ERROR! I have no idea what to do now.. Iv'e tried my own board soldering and now I went to a breadboard and now the breadboard won't even work. Is there a pdf I could read or something? Theres like no youtube tutorials for this.

kprims:
Two things.
Sorry, I see you already had that selected.
Select 114 KHz for the ISP Frequency if you are using a factory Chip set at 1 MHz.
Also the diagrams showing the cable hookup look backward to me which would give you a wiring error.

wait... you mean the cable diagrams from the schematic look backwards? Like the chip needs to be flipped?

Wire it from this page and you should be good.

I think the pin numbers for the cables on your example are backwards .

kprims:
Wire it from this page and you should be good.

Pololu - 3. Pinout and components

I think the pin numbers for the cables on your example are backwards .

Ok I followed that, but why does the MISO say "Pin 1" because Pin 1 is RST.

And even if that Miso is supposed to go on pin 18, it still gives me the same error.

Im using this picture just to see where Miso,Mosi, and the pins are on the chip.

Ok I followed that, but why does the MISO say "Pin 1" because Pin 1 is RST

RST is Pin 5. That's why I am trying to get you to change your wiring.

kprims:
RST is Pin 5. That's why I am trying to get you to change your wiring.

I'm sorry if im asking the same thing... but like. heres what I have.

since im doing this on a breadboard:

  • is ground
  • is power

10k resistor on pin 1 going to -
0.1UF cap going from pin 1 to pin 7
pin 7 to +
pin 8 to -
pin 9 and 10 to 16 MHz crystal
both sides of the crystal going to 22pf cap's EACH - these caps go to -

Literally just like this but without the arduino connecting to it.

I have a 9V battery connected to the breadboards - and +

when I connect the wires to the programmer it goes like this:

RST to pin 5
SCK to pin 19
MISO to either pin 1 or pin 18? WHICH ONE?
GND to pin 8
MOSI to pin 17
VCC to pin 7

Is that wrong? Also im confused on where MISO goes because on the ISP connector image above, it says "MISO(pin 1)" :confused: I have no idea why.

When I said Pin 5 is RST I meant pin 5 on the ISP header of the Pololu programmer.
You are correct in saying pin 1 on the 328 chip goes to pin 5 on the ISP header.
MISO to pin 18 on the 328 chip.

"Also im confused on where MISO goes because on the ISP connector image above, it says "MISO(pin 1)"
MISO(pin1) is the starting pin on the ISP 6 pin connector.

I thought you were using the Pololu to provide BAT + and GND - to your chip?
Do not use 9V! You need to feed 5V or 3.3V to the chip.
10k resistor on pin 1 going to + not -. That would keep the chip permanently reset

!!!! You have the + and - of the breadboard connected straight to Vcc and Ground? You're saying you have a 9v battery connected to that? With no regulator to get the 5v?!

Assume the chip is dead if you have applied 9v across power and ground pins of the chip.

The picture you posted, and the description of your connections are inconsistent (which is why we don't like when people post pictures saying "this is how it's wired" when that's not how it is wired. A hand drawn diagram photographed with your phone is more useful than any fritzing diagram)

Both of them are incorrect, though the wiring you describe is far wronger!

The problem with the picture is simple:
The picture is missing 2 0.1uF decoupling caps (this omission is widely repeated, because sometimes it works - but the behavior is not consistent, and the chip can reset or hand unpredictably without them) - they should go between the power and ground pins on each side of the chip, right next to the chip. Yes, I know the official arduino to breadboard diagram doesn't show them, yes people have complained (for YEARS) and they have chosen not to correct it. (You know, it's almost as if they have a vested interest in people not being successful making arduino circuits on breadboard, like they manufactured and sold commercial versions of that or something).

Second, it depicts pulling the chip out of an Arduino to use as a serial adapter, which is dumb (every time you insert and remove the chip, you run the risk of breaking one of the pins.... and the Uno is a very bulky and expensive serial adapter (and if it's genuine, it's also very easy to break). Search ebay for CH340G 6pin, buy one of the ones with the little switch for voltage (either the black ones that plug straight into USB port, or the green ones that have the micro USB port; the latter are less abundant, and I would opine that the designer is a novice to PCB layout, but both the micro USB port and the design of the voltage switch are superior to the black ones). All the other serial adapters I've seen on ebay are strictly worse than those two. (though the Ultimate Serial Adapter I'm working on will bury both of them, twelve feet deep!*)

Now, on to your description. Where did you get those ideas about what should be connected where?! I don't know which set of pin numbers you are using, but none of them are right with any pin numbering scheme.

Put the chip in breadboard, rotate breadboard so that the indentation is facing away from you, physical pin numbers start on the far end of the left side with 1 (not 0) and proceed counterclockwise.

Make the following connections:

  • and - of breadboard to + and - on the other side.
  • of breadboard to physical pins 7 and 20 (Vcc and AVcc respectively) of the 328p,
  • of breadboard to physical pins 8 and 22 (Gnd) of the 328p
    One 0.1uF ceramic capacitor between pins 7 and 8 (in hole closest the 328p for good measure), and another between pins 20 and 22.
    16MHz crystal between physical pins 9 and 10. (XTAL1, XTAL2)
    ~18pF ceramic cap between physical pin 9 and ground and physical pin 10 and ground (use the pin 8 right next to those for ground).
    10k resistor between physical pin 1 and Vcc/+ side of breadboard.

This is a minimal setup for a 16MHz system running on breadboard.

Assuming you are using something like that Pololu programmer, or a USBAsp, or USBTinyISP (ie, a dedicated programmer device), make these connections (pin names refer to the markings on the programmer or their pinout diagram:
RESET to physical pin 1 of target.
MISO to physical pin 18 of target (which is Arduino pin 12)
SCK to physical pin 19 of target (arduino pin 13)
MOSI to physical pin 17 of target (arduuino pin 11)
Gnd to - of breadboard
Vcc to + of breadboard.

For a device like the pololu board it may be possible to make it supply power (but it sounds like it cannot supply very much - it seems that that board is not designed for applications where you are not providing external power. So you must supply regulated 5v power - you can either use an external 5v power supply they make things that you can put on the end of a USB cable to get 5v and ground pins) generate this with a 5v linear regulator (out to + of breadboard, ground to - of breadboard, in to positive side of a 7~9v power source, negative side of that power source to - of breadboard, with a capacitor between in and ground and out and ground on regulator. Refer to the datasheet for the regulator for guidance on what kind of capacitors. Regulators are picky about that.

For a device like a USBAsp or USBTinyISP (readily available on ebay for cheap), you can freely power the board from the Vcc line of the programmer (unless your design draws an excessive amount of current, like, over 500mA) - most of these have a jumper to select between 5v and 3.3v operation. When doing this, you must disconnect any external power supply from it (if both supplies are set to the same voltage, you can do it with external power connected, but Vcc must not be connected.

For an Arduino running Arduino as ISP, the connections are
Arduino pin 10 of programmer to physical pin 1 of target.
Arduino pin 12 of programmer (MISO) to physical pin 18 of target (which is Arduino pin 12)
Arduino pin 13 of programmer (SCK) to physical pin 19 of target (arduino pin 13)
Arduino pin 11 of programmer (MOSI) to physical pin 17 of target (arduuino pin 11)
Gnd of programmer to - of breadboard
5V of programmer to + of breadboard.

Treat Vcc like you would with USBAsp/TinyISP. A 5v board cannot program a board running at 3.3v (if you don't have anything not 5v-tolerant connected to it yet, it's fine to program at 5v a chip you will run at 5 - this is what I usually do). Attempting to do so may damage the target. I would also be extremely uncomfortable with using a genuine uno to program something that was externally powered, even at the same 5v and with the Vcc pins not connected - the genuine uno (and mega) use a 16u2 as serial adapter, and it is vulnerable to failure if you abuse the power rails even a little.

Having read your threads, I've come to the conclusion that the Pololu programmer is an advanced device that is more appropriate for experienced Arduino users - not for beginners who are unsure of how to correctly power a design on a breadboard.

New users are better off with a USBAsp or USBTinyISP, or just a plain old Arduino as ISP (I have several of both dedicated programmers - I prefer the USBAsp, though I also have a nano with wires soldered in place and covered in glue going to a 2x3 connector in the standard pinout (a while ago I was having issues with a few certain chips being sensitive to some odd behavior with certain programmers involving the reset line; Arduino as ISP, for all it's problems, was able to sort it out.

Christ I wrote a lot.... But I needed that after a frustrating argument. Makes me feel calmer and more competent.

  • As in, it'll put them "six feet under", then put their graves six feet under too! Coincidentally, twelve is also about the number of those serial adapters you'd get for what I'm going to charge for it :stuck_out_tongue:

DrAzzy:
!!!! You have the + and - of the breadboard connected straight to Vcc and Ground? You're saying you have a 9v battery connected to that? With no regulator to get the 5v?!

Assume the chip is dead if you have applied 9v across power and ground pins of the chip.

The picture you posted, and the description of your connections are inconsistent (which is why we don't like when people post pictures saying "this is how it's wired" when that's not how it is wired. A hand drawn diagram photographed with your phone is more useful than any fritzing diagram)

Both of them are incorrect, though the wiring you describe is far wronger!

The problem with the picture is simple:
The picture is missing 2 0.1uF decoupling caps (this omission is widely repeated, because sometimes it works - but the behavior is not consistent, and the chip can reset or hand unpredictably without them) - they should go between the power and ground pins on each side of the chip, right next to the chip. Yes, I know the official arduino to breadboard diagram doesn't show them, yes people have complained (for YEARS) and they have chosen not to correct it. (You know, it's almost as if they have a vested interest in people not being successful making arduino circuits on breadboard, like they manufactured and sold commercial versions of that or something).

Second, it depicts pulling the chip out of an Arduino to use as a serial adapter, which is dumb (every time you insert and remove the chip, you run the risk of breaking one of the pins.... and the Uno is a very bulky and expensive serial adapter (and if it's genuine, it's also very easy to break). Search ebay for CH340G 6pin, buy one of the ones with the little switch for voltage (either the black ones that plug straight into USB port, or the green ones that have the micro USB port; the latter are less abundant, and I would opine that the designer is a novice to PCB layout, but both the micro USB port and the design of the voltage switch are superior to the black ones). All the other serial adapters I've seen on ebay are strictly worse than those two. (though the Ultimate Serial Adapter I'm working on will bury both of them, twelve feet deep!*)

Now, on to your description. Where did you get those ideas about what should be connected where?! I don't know which set of pin numbers you are using, but none of them are right with any pin numbering scheme.

Put the chip in breadboard, rotate breadboard so that the indentation is facing away from you, physical pin numbers start on the far end of the left side with 1 (not 0) and proceed counterclockwise.

Make the following connections:

  • and - of breadboard to + and - on the other side.
  • of breadboard to physical pins 7 and 20 (Vcc and AVcc respectively) of the 328p,
  • of breadboard to physical pins 8 and 22 (Gnd) of the 328p
    One 0.1uF ceramic capacitor between pins 7 and 8 (in hole closest the 328p for good measure), and another between pins 20 and 22.
    16MHz crystal between physical pins 9 and 10. (XTAL1, XTAL2)
    ~18pF ceramic cap between physical pin 9 and ground and physical pin 10 and ground (use the pin 8 right next to those for ground).
    10k resistor between physical pin 1 and Vcc/+ side of breadboard.

This is a minimal setup for a 16MHz system running on breadboard.

Assuming you are using something like that Pololu programmer, or a USBAsp, or USBTinyISP (ie, a dedicated programmer device), make these connections (pin names refer to the markings on the programmer or their pinout diagram:
RESET to physical pin 1 of target.
MISO to physical pin 18 of target (which is Arduino pin 12)
SCK to physical pin 19 of target (arduino pin 13)
MOSI to physical pin 17 of target (arduuino pin 11)
Gnd to - of breadboard
Vcc to + of breadboard.

For a device like the pololu board it may be possible to make it supply power (but it sounds like it cannot supply very much - it seems that that board is not designed for applications where you are not providing external power. So you must supply regulated 5v power - you can either use an external 5v power supply they make things that you can put on the end of a USB cable to get 5v and ground pins) generate this with a 5v linear regulator (out to + of breadboard, ground to - of breadboard, in to positive side of a 7~9v power source, negative side of that power source to - of breadboard, with a capacitor between in and ground and out and ground on regulator. Refer to the datasheet for the regulator for guidance on what kind of capacitors. Regulators are picky about that.

For a device like a USBAsp or USBTinyISP (readily available on ebay for cheap), you can freely power the board from the Vcc line of the programmer (unless your design draws an excessive amount of current, like, over 500mA) - most of these have a jumper to select between 5v and 3.3v operation. When doing this, you must disconnect any external power supply from it (if both supplies are set to the same voltage, you can do it with external power connected, but Vcc must not be connected.

For an Arduino running Arduino as ISP, the connections are
Arduino pin 10 of programmer to physical pin 1 of target.
Arduino pin 12 of programmer (MISO) to physical pin 18 of target (which is Arduino pin 12)
Arduino pin 13 of programmer (SCK) to physical pin 19 of target (arduino pin 13)
Arduino pin 11 of programmer (MOSI) to physical pin 17 of target (arduuino pin 11)
Gnd of programmer to - of breadboard
5V of programmer to + of breadboard.

Treat Vcc like you would with USBAsp/TinyISP. A 5v board cannot program a board running at 3.3v (if you don't have anything not 5v-tolerant connected to it yet, it's fine to program at 5v a chip you will run at 5 - this is what I usually do). Attempting to do so may damage the target. I would also be extremely uncomfortable with using a genuine uno to program something that was externally powered, even at the same 5v and with the Vcc pins not connected - the genuine uno (and mega) use a 16u2 as serial adapter, and it is vulnerable to failure if you abuse the power rails even a little.

Having read your threads, I've come to the conclusion that the Pololu programmer is an advanced device that is more appropriate for experienced Arduino users - not for beginners who are unsure of how to correctly power a design on a breadboard.

New users are better off with a USBAsp or USBTinyISP, or just a plain old Arduino as ISP (I have several of both dedicated programmers - I prefer the USBAsp, though I also have a nano with wires soldered in place and covered in glue going to a 2x3 connector in the standard pinout (a while ago I was having issues with a few certain chips being sensitive to some odd behavior with certain programmers involving the reset line; Arduino as ISP, for all it's problems, was able to sort it out.

Christ I wrote a lot.... But I needed that after a frustrating argument. Makes me feel calmer and more competent.

  • As in, it'll put them "six feet under", then put their graves six feet under too! Coincidentally, twelve is also about the number of those serial adapters you'd get for what I'm going to charge for it :stuck_out_tongue:

Holy crap you did write a lot! I really do appreciate the help man! :slight_smile:

Sooo. I did the wires as you said and then connected the ISP as you said. I also got a voltage regulator and set it to 5v. The chip isnt dead as all the light indecators are lighting up and the program for the Pololu is working as well. The only problem is the same as before though? It still says


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

Error while burning bootloader.

Actually right as I get to this part of the post I see this in my device manager.

Which one should I be using? the COM 4 is the one iv'e been trying this whole time, is that the correct port? Also I have no idea why the heck there is two?! Its plugged into one port and they both remove and come back when I plug it out and back in.

Edit: When I use the COM 4 it says that error. When I use COM 5 it just sits there saying it'll take a minute to burn the bootloader... While I wait for you to respond I'll just let it sit there. But I thought burning bootloaders only took like 20 seconds?

Edit 2: Actually when I do it on COM 5 it says the following:

avrdude: ser_open(): can't open device "\.\COM5": Access is denied.

HEy Man I just touched my battery after powering it off and its hot as hell! Why would the battery get hot? I would assume the regulator would get hot? Not the Battery!

A battery will get hot if it's shorted.
I actually did the "9V battery and coins in the same pocket get unexpectedly warm" thing recently.

"Which one should I be using? the COM 4 is the one iv'e been trying this whole time, is that the correct port? Also I have no idea why the heck there is two?! Its plugged into one port and they both remove and come back when I plug it out and back in."\

Read the manual, it explains why there are two.

Programmer port is selected for installing a bootloader.
Serial is selected when downloading code via Rx/Tx lines.

You must select the correct port for the function you are using.

If the battery is hot, something is causing it to supply a lot of current.
If the 328P is getting hot, it's dead. Usually the clamp diodes get blown, and they short VCC to Gnd internally.