ATmega163L RTC and battery backup

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

I like the idea of a micro with sram and eeprom inside and no external memory access for security.

I am designing a 5v system and wish to use the internal RTC and battery backup the rtc and sram, the battery is not a problem the swithc over circuit;

Does anyone know a more elegant circuit than 2 diodes ?

Also the voltage drop particularly to the cpu when running on 5v.

Does the AVCC have to be supplied during battery backup?

Exactly what needs to be disabled/switched off for minimum power consumption on battery power.

What are the traps, hints for lowest possible battery consumption.

The circuit will use the internal 8 ch A/D and I2c bit banged to one device and rs232.

Do the peripherals have to be isolated during power down? or is it just simply write a 0 to the port while running on battery? on the assumption that the rest of the circuitry is then at 0 volts.

Any help appreciated
Joseph Abram

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

Hi Joseph,

The lowest possible consumption is using the power-down mode, but since you want an RTC, you want to use the power save mode.

Now to the tweaks;

By switching off the Analog Comparator (switched on as default) and NOT enabling the Brown-Out Detection (off as default), you can get as far down as 4uA, but note that the BOD is recommended in a battery-powered application. Too low voltage can make the AVR's behaviour erratic and corrupt the EEPROM.

- All your pins should be set to input
- Disable pull-up

Hope this helps. Anyone got any good designs for him?

Morten, Atmel FAE

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

...sorry, forgot the most important thing! :)

No, you don't need the AVcc supplied during battery backup. Please note that in the ATmega163, the AVcc supplies PORTA. Thus, it must always be connected when this port is needed.

Morten

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

Hi!

Regarding the pull-ups: Please disregard what I just wrote! The pull-ups should be there to make sure the input buffer doesn't draw current. This will happen whenever the input is floating around Vcc/2.

So: Enable (not disable) pull-ups!

:)Morten

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

Thanks Morten, tried all that and more, the best result is still the first result 6ma at 3v, I am using a 2,400mah battery but i dont have it on for long for fear of it going flat.

Is there anyone out there who ACTUALLY HAS wired up and succesfully got an ATmega163L to run at 10ua using the RTC in A REAL APPLICATION with some real code and schematic?

The problem is all the stuff that needs to be disabled and then re-enabled (I don't want to turn it off and reset unless the battery goes flat) I now find that TXD is high sourcing current, and even though I disable the uart, and make the pins input, it's still high, even after I disconnect everything from it and I am telling it to go low. perhaps it's tired like I am of all this.

AVR134 reminds me of the solar torch (the model without batteries).

This chip is starting to remind me of the spruce goose (howard hughes) that was big MEGA too.

JA

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

Well I've had enough of this AVR mega stuff.
ja

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

I finally got it to work, should also apply to 8535

schematics, code etc posted at

http://www.ja.olm.net/rtc

Joseph Abram