1

The product in question - https://www.sparkfun.com/products/9825 - operating at 5 V (and can also supply it to the device being programmed).

I need to program the bootloader onto a 3.3 V ATmega328p and don't have any level shifters immediately available. Thus the question. The "Hookup Guide" for the product (https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide) seems to suggest that it will work fine as long as the 3.3 V device being programmed isn't powered by the programmer. I wouldn't have thought it's the best idea in the world, but maybe I'm wrong.

So any practical experience?

Are the over voltage tolerances for input lines on Atmel devices good enough to handle the extra voltage?

I guess the output level from the device being programmed would be high enough to be buffered up to 5.0 V?

4
  • What is a "3.3V Mega328p"? Do you have a link to a product page? Commented Dec 30, 2014 at 10:48
  • "Mega328p" - can you please specify the exact kind of Arduino/break-out board you are working with? The ATmega328p max operating voltage is 5.5V Commented Dec 30, 2014 at 10:50
  • As a test run I would like to boot load an Arduino Pro Mini 328 - 3.3 V / 8 MHz - sparkfun.com/products/11114. (My actual intent is to bootload a custom board I've designed which also uses the same Atmel Mega 328p.) Commented Dec 30, 2014 at 11:03
  • Unless you copy the design of the board, the two experiences aren't directly comparable. Commented Dec 30, 2014 at 11:30

3 Answers 3

1

With that combination of programmer and Arduino you have two possible options:

  • Cut JP1 on the programmer and power the programmer from the Arduino. With this you will have to make sure that the Arduino is connected and powered up before you connect the programmer to USB.

  • Cut SJ1 on the Arduino and allow it to be powered by the programmer at 5V. The Arduino itself isn't required to be powered at 3.3V, that's simply what the on-board regulator provides, so we cut SJ1 in order to isolate the regulator from the MCU. Note that any devices connected to the Arduino will need to support 5V operation in order to this to be safe.

It is not safe to put 5V at the output of the regulator, so you must make sure that does not happen.

4
  • The SJ1 jumper controls the output of the MIC5205 regulator, no reason to remove it in order to feed the regulator with 5v Commented Dec 30, 2014 at 11:51
  • @Omer: You're feeding 5V to the output of the regulator. There is a parasitic diode in LDO regulators that can cause latchup if the output is allowed to go higher than the input, as may be the case if the Arduino is powered by a LiPo battery. Commented Dec 30, 2014 at 11:54
  • Not sure why you would want to feed the output and not the input (raw) side of the regulator? perhaps I'm missing something, but isn't the regulator "sits" between the breakboard's VCC and the ATmega328p's VCC? Commented Dec 30, 2014 at 11:57
  • 1
    @Omer: You feed the output because trying to use 5V programming signals on the MCU while supplying it 3.3V will fry it. Commented Dec 30, 2014 at 12:01
1

The Pocket AVR Programmer has a logic level shifting (74ACT125) on board, specifically for this situation. There is nothing wrong with powering the target with a separate power supply that the programmer. Why else would there be a "power target"/"No power" switch?

I don't see why other people would suggest cutting traces, when all you need to do is toggle a switch.

6
  • Although the schematic reads "ACT" directly at the device, the note just below it says "AC", as do the actual product shots. I agree that if it actually used an ACT/HCT device then it could be fine, but as it is the '125 may not be able to reliably detect the 3.3V signals coming back from the device. Commented Dec 30, 2014 at 16:50
  • Are you referring the the ACT version having a required supply voltage of 4.5v to 5.5v? I think all the IO voltages are well within the Minimum HIGH Level of both the buffer and the attiny? If all this doesn't work, why would they bother putting in a buffer at all? I'd love to hear your thought, as I'm planning on building my own buffered programmer based on the usbASP. The 3.3v ones I have from ebay aren't really 3.3v while programming, I found out. Commented Dec 30, 2014 at 21:17
  • I'm talking about the high input levels. ACT/HCT has a high input voltage of 2.4V, which is within the high output voltage of 3.3V CMOS, but AC/HC has a high input voltage of 0.7Vcc, which with a 5V supply means 3.5V. If you're going to build your own then I recommend using a MAX3392E so that the target voltage is properly handled. Commented Dec 30, 2014 at 21:21
  • But the buffer is powered by the target's voltage. So if the target is 3.3v the minimal input HIGH would be 0.7*3.3 = 2.31V, right? By the way, I can't find the 0.7Vcc anywhere in the datasheet, or is that the wrong datasheet? Commented Dec 30, 2014 at 22:09
  • 1
    Okay, I've unpuzzled it. The '125 will be powered by the device if the jumper you mention is left disconnected. The AC has enough drive to push its output voltage high enough to reach the 0.6Vcc needed by the 5V '2313 when supplied with 3.3V. The datasheet gives explicit output voltages at various arbitrary values of Vcc instead of an equation, but if you do the math then you'll find that it's 0.7Vcc. Therefore your answer is correct, but I'd still prefer to err on the side of caution. Commented Dec 30, 2014 at 22:27
0

ATmega328p Operating Voltage is 1.8v-5.5v, as stated in the second page of the datasheet (PDF):

enter image description here

So there should be no problem feeding it with a regulated 5v VCC while programming it, and then supplying it with 3.3v on normal use. Just make sure you do not leave any 3.3v devices (which are not 5v tolerant) connected to the ATmega328p during the programming of the chip.

Regarding the Sparkfun's Pro Mini 328 3.3v/8Mhz, you can read in the comments section of the Pro Mini page that customers successfully managed to power it with 5v without any issue. You can see from the schematics that the voltage regulator in use (MIC5205) has a max input voltage of 20v, so 5v should not pose a problem to power it up.

EDIT: See Ignacio's answer. My answer apply for powering up the Pro Mini not for programming it with 5v signals and 3.3v VCC. The SJ1 jumper will need to be removed in order for the MIC5205 regulator to supply 5v instead of 3.3v.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.