EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

State of I/O pins during brownout on Atmega128

Started by Unknown May 24, 2006
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

thecynic@gmail.com wrote:
> 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 >
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 http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
thecynic@gmail.com wrote:

> 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
Do you have BOD enabled? If BOD pushes the device into reset, it should float all GPIOs.
"larwe" <zwsdotcom@gmail.com> wrote in message 
news:1148510655.678440.294870@38g2000cwa.googlegroups.com...
> > thecynic@gmail.com wrote: > >> 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 > > Do you have BOD enabled? If BOD pushes the device into reset, it should > float all GPIOs.
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 http://www.fivetrees.com
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

<thecynic@gmail.com> wrote in message 
news:1148517365.068361.298460@y43g2000cwc.googlegroups.com...
> 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.
[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 http://www.fivetrees.com

The 2024 Embedded Online Conference