Electronics > Microcontrollers

UPDI power?

(1/2) > >>

blazini36:
I know there are other ways to do this but I'm trying to avoid using a lot of components. I'm curios if there's any problems I'm not noticing with powering an Attiny through a BAT54C diode. Main issues I'm trying to avoid here are the programming device trying to power everything else on the PCB's 5v line or the PCBs 5v line backpowering the programmer. There's obviously going to be a voltage drop of upto 1v but that shouldn't be a problem. R4 is a DNP, just there in case there's an issue to slap a 0r resistor in there.

T3sl4co1l:
That should be fine. Obviously all the outputs are lower by the same amount, make sure that's not eating into any logic thresholds.  Most CMOS inputs are 30/70% VDD, or "LVTTL" style (0.8/2.0V or thereabouts), so that should be fine, but beware any 20/80% ones (yuck!).

A PMOS could be used for lower voltage drop, give or take if 5V is disconnected during programming or if a wired-OR controller is needed to switch between them.

blazini36:
Thanks for the info. The only output is the MISO pin on this MCU. The "master" is an FPGA card, the manual doesn't specifically say the input threshold but it does state that "all IO is LVTTL". I actually have a 2nd Attiny on this PCB, UPDI and VCC is done the same way. It's outputs go to the same FPGA card and to a buffer and analog switch IC, a 74HCT1G125 and a 74HCT4066 which both appear to be "LVTTL" as well,

Faranight:
What UPDI programmer are you using? I know some programmers (i.e. my old AVR Dragon) use the Vcc pin on the ISP/UPDI header as Vtg to *sense* the board voltage, not to power the board.

EDIT: For AVR ISP/UPDI there are two recommended pinouts by Microchip. For example, in the AVR32DD32 datasheet a standard 6-pin (3x2) connector and a 4-pin (1x4) connector are described.
See chapter 4.4 or page 22 here: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/AVR16-32DD28-32-DataSheet-DS40002441.pdf

ajb:
You may still have some power issues with this depending on what's connected to the MCU and how.   Many ICs have protection diodes connected between their IO pins and their internal power rails.  If you've got MCU pins connected to other ICs on the board, and the MCU drives any of those lines high while powered by the programmer, current can flow from the MCU pin, through those internal protection diodes, and into the 5V rail.  What happens next depends on what's connected and how. With a light enough load, the rest of the circuit may power up and run more or less normally this way.  With a larger load, you may brownout your power supply, or the MCU may not be able to source enough current, and the circuit may not operate correctly--or worse, may go into a self destructive state, either because it's not operating at the correct voltage, or because current is flowing in ways it isn't intended to. 

You can provide protection against this in the MCU firmware, by having it check how it's being powered before configuring any IO.  You could do that by connecting a spare GPIO to the power pin on your programming connector with a pulldown and read the digital level to see if the programmer is conencted.  Or since you seem to have an external reference voltage, you could check if that's present, either by reading the digital level, or by measuring the voltage with ADC--typically you can set the ADC to use the MCU's internal voltage reference and then measure the external reference voltage against that. 

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod