6
\$\begingroup\$

I'm trying to program an ATmega328 with an AVR-ISP-MK2 from Olimex. The programmer has a setting for whether to supply power to the target board or not. The connector has +5V and GND pins. I wanted to make sure that I've understood this correctly before breaking anything:

  • If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source?

  • If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? If so, the programmer would be the only power supply.

That is: in both cases, +5V and VCC would be connected, and programmer-pin-GND and target-board-GND would be connected. The only difference would be whether an external power supply is connected.

TARGET jumper controls the powering of the target board. If it is in position ON (check the diagram on the back of the plastic cover) it will provide either 3.3V or 5V to the target board (depending on the position of the POWER jumper) The default position is OFF.

\$\endgroup\$
2
  • \$\begingroup\$ Are you sure you are using the AVR-ISP-MKII? I am not aware of this option. From what i know, it expects the target circuit to supply its own voltage, and refuses to work without seeing it (red status led). \$\endgroup\$
    – Rev
    Commented Jun 27, 2013 at 13:50
  • \$\begingroup\$ @Rev1.0 You're right. Apparently I'm using AVR-ISP-MK2, which is a programmer from Olimex, which has that option. Its red LED means that the USB connection has been initialized. \$\endgroup\$
    – Andreas
    Commented Jun 27, 2013 at 14:15

3 Answers 3

3
\$\begingroup\$

If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source?

The jumper most likely physically disconnects the +5V pin, so it doesn't matter. Keep GND connected in any case, because the devices require a common reference level to guarantee a reliable communication.

If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? If so, the programmer would be the only power supply.

Yes, its probably best to completely disconnect the external power supply in that case. Connecting two different DC voltage sources in parallel is almost always a bad idea. Keep in mind, that USB (2.0) can only supply 500mA@5V max, while the programmer will also consume a few mA itself.

\$\endgroup\$
3
  • \$\begingroup\$ If the VCC pin were disconnected, how would the MCU be powered? \$\endgroup\$
    – Andreas
    Commented Jun 27, 2013 at 20:00
  • \$\begingroup\$ @Andreas: Well, I wasn't so picky about the naming. I changed it from Vcc to +5V (if thats what we call the supply pin coming from the programmer). \$\endgroup\$
    – Rev
    Commented Jun 27, 2013 at 20:05
  • \$\begingroup\$ I'd expect the drivers for the debug interface pins to be powered from the power pins on the connector if the jumper is in the "OFF" position -- that way, it will work with both 3.3V and 5V without requiring any further configuration. \$\endgroup\$ Commented Sep 26, 2016 at 7:10
1
\$\begingroup\$

As shipped, the AVR ISP Mk2 DOES NOT supply target power, it only senses it. It must see voltage on both the Vcc Pin as well as the Reset pin supplied by an external source. Additionally, it must be able to pull down the reset pin to ground. Normally this is accomplished by tying the Vcc pin to supply voltage through a 10K resistor and also a 0.1uF cap to ground. See http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=81120&start=0

\$\endgroup\$
2
  • \$\begingroup\$ That kind of contradicts with the answer by @Rev1.0. Would ISP not work, if I disconnect Vcc(ISP) for safety reasons (some of the circuitry needs higher voltages)? Clearly, your answer is device specific. But what do the "standards" say? \$\endgroup\$ Commented Oct 21, 2016 at 4:09
  • \$\begingroup\$ Ok, electronics.stackexchange.com/a/95739/32616 did answer my question. I would rather go for a not working programmer (which might be configurable) than for burning circuitry ;-) \$\endgroup\$ Commented Oct 21, 2016 at 4:14
0
\$\begingroup\$

If TARGET is set to ON, you should not supply power to your circuit in some other way. That is to say, don't connect your programmer with TARGET = ON if the board is otherwise powered. You should in general set POWER to the appropriate setting for your circuit to be on the safe side, though it may not matter if TARGET is set to OFF. If TARGET is set to OFF, you must supply power to your circuit in some other way in order for your target device to be programmed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.