State of I/O pins during brownout on Atmega128

Hi,

I am working with an AVR Atmega128. Is it possible that during a brownout, I/O pins designated as Output could potentially float? Or if they are inputs with pullups?

Basically I am wondering if the chip enters an undefined state at any point during a brownout.

Any help would be greatly appreciated.

Thanks in advance.

--Dima

Reply to
thecynic
Loading thread data ...

I believe that the whole definition of 'brownout' is that the chip can go into just about any possible state, and a few impossible ones. _I_ wouldn't trust it _not_ to do anything, or to _do_ anything, either.

Unless the data sheet says otherwise, expect it to do the unexpected -- and double check what the data sheet says.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

Do you have BOD enabled? If BOD pushes the device into reset, it should float all GPIOs.

Reply to
larwe

To echo Tim Wescott's post, floating (i.e. hands-off) is pretty much the best you can hope for. If that's not what you want, you have a problem.

IME, brownout detection and survival is one of the often-overlooked areas of embedded design. There are 2 principal methods of attack:

- Ensuring that the reset controller is active. Ye olde RC network, even with a D backwards across the R, is inadequate. Hold the reset line active as soon as VCC is out of spec, and hold it there until it's been back in spec for as long as needed (typ. 200ms for many CPUs). (I like the MAX1232 device [which includes a hardware watchdog] - there are many others.) Also, ensure that all other areas of circuitry can survive the rail being out of spec. As you've seen, this can be fun. If pins float, you can often ensure safety with pull-ups or -downs where it matters.

- Ensuring that the PSU itself is active - i.e. it shuts down VCC sharply when out of spec, and again holds it down until it can release it back into a stable within-spec state. This is sometimes needed when brownout survival cannot be guaranteed. (Further, if the minimum off time of the PSU can be guaranteed, then an R||DC reset system is often actually ok - so long as all reset inputs can be driven linearly, and devices coming out of reset at different times are not an issue.)

And, to be complete, in dual- or multi-rail systems, one has to be watch out for the old current-path-from-rail-to-rail (not including 0V) syndrome, where one rail can wake up way before the other, and pull it all the way across 0V - and leave it there....). But I digest.

Steve

formatting link

Reply to
Steve at fivetrees

Thanks for the in depth replies guys. This sheds some light on my potential problem. Floating signal will be bad since one of them is connected to a relay, and could inadvertantly flip it.

Thanks.

--Dima

Reply to
thecynic

[You might like to include a bit of context so that the threadless readers know what you're on about.]

Re floating: a relay needs big current, and the typical transistor driver needs appreciable base current. Arrange for this current to be lacking at brownout, and all will be well. (It helps to think in terms of current paths, rather than simply voltage levels.)

Steve

formatting link

Reply to
Steve at fivetrees

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.