5V tolerence for 3V3 chip

Go To Last Post
27 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am making a custom board hopefully with an ATTiny3217 powered at 3V3 as it will be connected to a OLED display that only uses 3V3. When programming the 3217 will it program at 5V I/P levels?

Last Edited: Tue. Jun 2, 2020 - 02:56 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most likely not. You can confirm this by reading the datasheet.

What device are you using to program?

 

[edit] just read the datasheet - nope. max input voltage is vdd+0.6V

Note - at 3V3, the part is specced for 10MHz operation.

With only 2k of ram, that seems a bit tight if you want to do graphics.

Last Edited: Thu. May 28, 2020 - 11:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was planning on using a nano as a UPDI programmer. 

 

Can you set the programming output to a 3V3 level or is it stuck at 5V? Or can you set the SPI output of a 3217 (or whatever chip I end up with) to 3V3?

 

And yes, I was beginning to think 2K was a bit short.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Run the nano at 3V

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How would that be done when it is run from USB?

 

Also do you think 6K RAM would be sufficient. I am now looking at a ATMega4808.

Last Edited: Fri. May 29, 2020 - 02:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some boards have selectable voltage.

 

What the code requires will determine how much ram you need - my opinion has no effect!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The tinyAVR 0/1-series permit HV programming on the UPDI pin (to support it being reprogrammed as RESET or GPIO pin), so the UPDI pin itself is 12V tolerant... So I'm not sure why this would be an issue... IIRC the threshold for triggering the "HV" stuff was 2xVcc, so should be fine from that perspective too...

 

Beyond that, all the "modern" AVRs have rather monstrous specs for "clamping current" or "current injection" (ie, current through the protection diodes) - with absolute maximum ratings on the order of 15mA (20mA for the new DA series), such that even if that weren't the case, one could get away with it with just an appropriate current limiting resistor in series with the UPDI pin - which is generally already used...

 

Am I missing something?

Arduino Cores: megaTinyCore - github.com/SpenceKonde/megaTinyCore (all tinyAVR 0-series and 1-series, 2-series when they finally release the damned things) and ATtinyCore - github.com/SpenceKonde/ATTinyCore (all classic ATtiny with part in family with at least 4k flash), and now, DxCore, with support for the AVR DA-series and DB-series: github.com/SpenceKonde/DxCore
I sell breakout boards for tinyAVR parts, prototyping board, and MOSFET boards in my Tindie store: tindie.com/stores/drazzy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Azzy, Its nice to know that programming should be a problem but my next problem will be my ADC I/P which is 0V to 5V. I can see me using 5V on the chip and a second supply for the display which is only 3V3.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


windoze_killa wrote:
I can see me using 5V on the chip and a second supply for the display which is only 3V3.

Google "level translator" or "level shifter", etc

 

eg,

 

 

https://www.sparkfun.com/categories/361

 

 

 

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that your question is a bit ambiguous & can lead to confusion:

When programming the 3217 will it program at 5V I/P levels?

do you ask:

To program the 3217, can it be programmed using 5V I/P levels?  

or

While programming the 3217, will it be programmed using 5V I/P levels?

 

These are distinct & different questions

 

As noted, if you run the chip at 3.3 V, the programming signals must be at 3.3 V.   If your programmer provides 5V signals, you could run the board from the programmer & everything is at 5V (assuming your entire board can tolerate 5V).

Or, as mentioned, run your programmer at 3.3V

Or, use an adapter between 3.3 & 5V

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Fri. May 29, 2020 - 09:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
run your programmer at 3.3V

This is why things like the Atmel-ICE have a target voltage sense pin - so that they can adjust themselves to the voltage the Target is running at.

 

Consider this as part of the value when looking at the Price of a proper programmer/debugger ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DrAzzy wrote:
such that even if that weren't the case, one could get away with it with just an appropriate current limiting resistor in series with the UPDI

 

Well, I think am missing what you mean exactly!

 

1- If you mean using a series resistor with the UPDI, then perhaps this ia a very bad idea ?!, the UPDI pin is a signal pin, rarely you would require a small "cap" and not a resistor from UPDI to GND, a 10nF, 100nF would be evern much.

 

2- If you mean using the resistor in series to make a voltage leveling then am sorry, but what PhD you have Doc ? no offence

 

Using a series resistor as voltage shifter is wasting energy, and it will not limit your current consumption and thats another issue. thats why there is a old-new-used innovation called Low Drop Out "LDOs", this will shift your voltage level from whatever the input to the desired level, in your case its 3.3V up to 5.5 V and this what the 3217 is running on.

 

For powering the OLDE you just use directly the input voltage from the battery or whatever but this also has to be within the limitation of the normal operating voltage. apart from this dont use the series resistor on VCC line, except for "For example" using a mosfet, then you need a series resistor from the output pin to the MOSFETs, this is also applicable for other components whenever is needed. And sometimes its not needed at all, For example, an SOT-23-3 Magnetic sensor wich in these days doesnt consume more than few uAmps when awoke...then in that case no need for a pin-to-component resistor but instead "perhaps" a small cap of 100nF and this is because of EMC, Noise...etc.

 

I hope I made it clear.

 

Regards,

Moe

Last Edited: Fri. May 29, 2020 - 12:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It appears that my simple question has stirred a hornets nest. I will try and explain the situation a little better.

 

My device will be fully assembled is a sealed box. It will have a total of 4 pins, Gnd, +12V, Analog in, Digital out. The Analog in will also be the UPDI programming pin. I WAS going to only have a single power supply chip outputting 3V3 to power both the micro and the OLED display (3V3 only). It is looking more like I will need 2 power supply chips, 5V and 3V3. Just hope I can squeeze it all on the board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 It is looking more like I will need 2 power supply chips, 5V and 3V3. 

 Are you sure the oled won't work (or tolerate)  5V?  If not, why not run everything at 3.3V & just find a 3.3V programmer...there's about a million to choose from.   If you mix the voltages the 5V micro will need converted to 3.3v olded.  If it is a one way street, you might be able to use resistor dividers.

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am assuming that the device is being powered with a 3.3v supply, which is separate from the 5v supply of programmer. Vcc of programmer not connected to Vcc of target, series resistor on UPDI line as specified (between the programmer and UPDI of target). Vcc would be supplied with 3.3v or whatever the operating voltage is from it's own supply or some other supply. Grounds all connected, of course. 

 

In this case, for the 3217, it should be safe to use 5v UPDI programmer, since the UPDI pin is HV tolerant (to +12v) to support HV programming. Even if the threshold for HV programming is 2xVcc (as is rumored) instead of the 12V described in the datasheet (which would be high enough across the entire operating range if the threshold was 2xVcc), we're still well short of that. 

In fact, to humor you all, I did just check this configuration. I put 3.3v on Vcc, and UPDI line came from 5v Arduino Nano running jtag2updi (the 3.3v happened to come from it's 3.3v pin, for simplicity. Was able to upload like this without issue. (It had a 4.7k series resistor on its UPDI line - I've decided to switch to 470 in my boards going forward, as that's still enough for protection against the two fighting (my understanding is that's the original reason for that resistor) while allowing for reasonable total resistance when used in combination with a programmer that has it's own series resistor - but I didn't feel like swapping out the resistor at the moment)

 

Re: other UPDI AVR parts

I don't happen to have a megaAVR 0-series board assembled with pins on hand to verify that a small series resistor on UPDI works there as well; though I am pretty confident it should work, per table 32-1 of the datasheet, which lists "I/O pin injection current except for the RESET pin". when Vcc =<4.9V as +/- 15mA... since the protection diodes kick in at Vcc +0.6v (per footnote 1 on that table), you've got 1.1v across a series resistor, and you need to limit current to under 15mA... even a 470ohm resistor will limit it to just over 2mA: well within spec!

AVR-DA series specs the same thing (under the name "clamp current" - hurray for consistent terminology) as +/- 20mA, without the 5v exception. 

So that leads me to believe that it's fine to use a higher voltage programmer to on those as well... 

 

The issue with programming lower voltage parts comes when the high logic level of the target is too low for the programmer to detect as high...

Arduino Cores: megaTinyCore - github.com/SpenceKonde/megaTinyCore (all tinyAVR 0-series and 1-series, 2-series when they finally release the damned things) and ATtinyCore - github.com/SpenceKonde/ATTinyCore (all classic ATtiny with part in family with at least 4k flash), and now, DxCore, with support for the AVR DA-series and DB-series: github.com/SpenceKonde/DxCore
I sell breakout boards for tinyAVR parts, prototyping board, and MOSFET boards in my Tindie store: tindie.com/stores/drazzy

Last Edited: Sat. May 30, 2020 - 07:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It would be interesting to repeat your experiment with some good ammeters on the uC's Vcc & AVcc & Ground pins, to see if raising the chip's internal voltage to (5V - a diode drop) causes a conflict on the 3V power supply rail.

 

Likewise, one still has to have a good understanding of the chip's internal architecture.

Xmegas don't like overvoltage, but I don't recall the voltage at which they were damaged.

That was investigated in the past as part of two topics.

One of the few ways to "brick" an Xmega is to set the BOD to a higher voltage than the Vcc, which means that one has to apply an even higher voltage to be able to reset the BOD.

The other inquiry had to do with overclocking the Xmega as a function of Vcc.

 

In any event, I think the OP's best option is to get a 3 V programmer.

Many options exist, including Microchip's own SNAP programmer, which is occasionally on sale for 1/2 price of its already low price.

Other options were suggested above.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On the ATtiny3217, even if I connect Vcc to 3.3v, Gnd to Gnd, and UPDI to 5v (even if I do it directly, bypassing that resistor I mentioned), the 3.3v rail remains at 3.3v! *BECAUSE THE UPDI PIN ON THE 3217 IS 12V TOLERANT* - the protection diodes don't even get involved in the case of the part OP is working with.
 

The tinyAVR 0-series and 1-series parts have a fuse to control the function of the UPDI pin - it can be either UPDI, Reset, or a GPIO pin with a weak driver. In the case that the pin is configured as Reset or GPIO, if you want to reprogram it, you put a 12v pulse on it (for some parts, you need to immediately follow that with sending a KEY, on others, just a 12v pulse will do it - and if it's set as GPIO OUTPUT, you need to powercycle it and immediately do that sequence during the grace period after startup before it enables output drivers when the pin is used as GPIO, see datasheet for details; I haven't messed with this much) - in any event, once this is done, it stays as UPDI until full power cycle. 

 

On an megaAVR 0-series or AVR DA-series, yeah, it would tend to lift the Vcc rail towards 5v, depending on how much current you let flow vs how much the board itself was pulling. Just tried it on a DA-series - with the chip and an LED - programming with 5v UPDI and 3.3v power worked, and UPDI to 5v straight up (both cases through 470 ohm current limiting resistor - I wouldn't do it without that like I did on tinyAVR above), UPDI pin at this point was, well, just about 1 diode drop above Vcc as one would expect, but Vcc was still holding around 3.3.... which makes sense, as the load on the board is certainly more than the 2mA getting through the protection diode on UPDI....

 

Edit - of course, if OP has to read a 0~5v signal via the ADC, that is a little awkward - but nothing a simple resistor divider couldn't handle...

Arduino Cores: megaTinyCore - github.com/SpenceKonde/megaTinyCore (all tinyAVR 0-series and 1-series, 2-series when they finally release the damned things) and ATtinyCore - github.com/SpenceKonde/ATTinyCore (all classic ATtiny with part in family with at least 4k flash), and now, DxCore, with support for the AVR DA-series and DB-series: github.com/SpenceKonde/DxCore
I sell breakout boards for tinyAVR parts, prototyping board, and MOSFET boards in my Tindie store: tindie.com/stores/drazzy

Last Edited: Sat. May 30, 2020 - 02:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I use a lot of these.  Two channels and an on board 3.3V regulator that I use to drive 3.3V externals.  The 3.3V is reasonably clean and the regulator will put out 150 mA short circuit.  Probably cheaper than SparkFun.

 

 

https://www.ebay.com/itm/5pcs-2-channel-Bi-Directional-Logic-Level-Shifter-Converter-3-3V-5V-For/322698576638?hash=item4b225582fe:g:zHQAAOSwTDpcCedN

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks all for your comments and info.

 

I think I will be using FXMAR2104UMX for level translation to the OLED display. The one Mark Thomas has provided is way too big. The PCB will be about 40mm square. 

 

Currently I am using a monochrome OLED and it is 5V but I want to try and get this working in colour. Actually I have to get it working in monochrome first ;-)

 

 

Last Edited: Sun. May 31, 2020 - 12:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I remember some sales mgr visiting our lab about 15 years ago & checking out a new display set up by a technician..He liked the menus, except for it being monochrome.  He said he'd come back the next day and really really wanted to see colors on our screen.

Sure enough, when he came back the screen said "red", "aqua", "violet" and a bunch of other colors.  He still wasn't happy but got the point it would take some effort & a different screen. surprise

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It will teach him to word his questions correctly.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I have a 5V Nano, can I change the regulator to 3V3 and still be able to connect it to USB? I am guessing not.

 

This would mean a Pro Mini with an FTDI board, Correct?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

windoze_killa wrote:
If I have a 5V Nano, can I change the regulator to 3V3 and still be able to connect it to USB? I am guessing not.

 

There's plenty of 3V3 chips that do USB.

 

Depends on the actual board you have. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

windoze_killa wrote:
When programming the 3217 will it program at 5V I/P levels?

 

Yes, as DrAzzy said earlier.

 

I already tested this long ago for early versions of my jtag2updi programmer. Forgive me for self-quoting:

since the UPDI pin is high voltage tolerant, it's ok to have V_prog > V_target, but not the reverse. Warning: only the UPDI pins of devices that support high voltage programming should be assumed to be high voltage tolerant. This is not the case for the MegaAVR 0-series or AVR-DA series!

But for the AVR-0/1 series it's fine, including the tiny3217.

 

edit: the real problem is, if V_target is less than 3.3V, a 5V programmer might not be able to recognize logic high levels from the target.

Last Edited: Mon. Jun 1, 2020 - 12:09 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edit: the real problem is, if V_target is less than 3.3V, a 5V programmer might not be able to recognize logic high levels from the target.

Now I don't know what the min. of high is for the programmer, but often over about 3.8V is fine for high and under 1.2V is fine for low.

There is two easy hacks that can make it work, a serial resistor on 3V3 out and a small pull up resistor on the 5V side,  or

rise the GND level for the 3V3 part with a diode.

And yes it is hacks I normally use the normal FET with 2 resistors when this is needed.    

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

- Use whatever supply voltage you want.

- Use a regulator (LDO) which outputs a 3.3V to run your chip, MCP1703 from michrochip is a good idea.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DrAzzy wrote:
AVR-DA series ...
forthcoming AVR DB-series

AVR128DB28 - 8-bit Microcontrollers

...

 

The AVR128DB28 product supports 4 Multi-Voltage I/O channels capable of bi-directional communication with external devices running at a higher or lower voltage than the MCU itself. 

...

IIRC, AVR DA-series has an improved SOA (wide voltage)

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Jun 8, 2020 - 06:18 PM