VOGONS


First post, by Calibus

User metadata
Rank Newbie
Rank
Newbie

Hi,
I replaced an ancient Dallas RTC in an old 486 motherboard with a new Dallas RTC from ebay.
The motherboard is still complaining about the CMOS being reset on bootup - but I have since read about the chips having a "shelf" or "storage" mode where they draw very little current to save the battery.

This post explains how to put it into "storage" or "low power" mode:

Conserving Dallas RTC chips

Can someone tell me how to wake them back up?

The above topic is from 2019, so I figured I should start a new one.

thanks

Jim

Reply 1 of 15, by Horun

User metadata
Rank l33t++
Rank
l33t++

Good question ? mkarcher could probably write a debug to turn it back on or explain it better but he does say you must "kill" the power, not shut down or do a reset because the bios or OS will re-start it (am paraphrasing)
AFAIK Most BIOS check the RTC and probably turn on the clock if off (on boards that have them with bios designed for them)
As examples in post codes: AMI Color/EZ-Fles bios checks at post code 10. Award from 3.3 up at 1D and Award Pnp and up at OB if I read Bigelows PC book accurately. Also could be one of the "chipsets" initialize codes....
Not all older bios may "initialize" a "clock off" RTC as there would not have been a need to have the RTC battery sleep back then given a 10+ year lifespan (and OEM's would not be sitting on old stock to put in a new board) so no need to "start" one.
Thinking of the 90's and would they be worried about a turning off a RTC clock to save battery they bought this year to install on a board same year ? I think not.
Hopefully mkarcher can shed some light on what BIOS code does awaken a sleeping RTC...ok rambled enough 😀

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 2 of 15, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

yeah your "new" dallas from ebay is not new

only buy these things from digikey or mouser, the ebay ones are a scam

Reply 3 of 15, by mkarcher

User metadata
Rank l33t
Rank
l33t
Calibus wrote on 2024-05-21, 00:26:

This post explains how to put it into "storage" or "low power" mode:

Conserving Dallas RTC chips

Can someone tell me how to wake them back up?

The only thing that is turned off in "storage" / "low power" mode is the clock. The data storage will work perfectly even with the oscillator stopped. As far as I know, all typical BIOSes will initialize the "clock control register A" to the default value 026h. I just checked a random BIOS, in this case my Biostar MB8433UUD BIOS (Award), and it does exactly that at POST code 53h, in which the system clock is set from the RTC. I also checked an old 286 AMI BIOS, and that one only sets the byte if the clock is "not working".

Anyhow, I guess your chips from ebay are pulled from a machine and have not been in low power mode. In case you want to try anyway, replace 06 by 26 in line 4 of the debug script in the thread you linked.

Reply 4 of 15, by Matchstick

User metadata
Rank Newbie
Rank
Newbie
Calibus wrote on 2024-05-21, 00:26:
Hi, I replaced an ancient Dallas RTC in an old 486 motherboard with a new Dallas RTC from ebay. The motherboard is still complai […]
Show full quote

Hi,
I replaced an ancient Dallas RTC in an old 486 motherboard with a new Dallas RTC from ebay.
The motherboard is still complaining about the CMOS being reset on bootup - but I have since read about the chips having a "shelf" or "storage" mode where they draw very little current to save the battery

Jim

This is what you should be replacing the RTC with...

https://github.com/necroware/nwX287

https://www.pcbway.com/project/shareproject/N … e_91a9afb4.html

Reply 5 of 15, by Matchstick

User metadata
Rank Newbie
Rank
Newbie

Ironically Necroware posted a new video on the RTC today

https://www.youtube.com/watch?v=ecTZtZhE9bI

The embedded coin batteries in these are only rated for 10 years, so doing some hack to change the "storage" or "low power" mode (honestly looking at the chip data sheet and what is actually inside a Dallas RTC, I think this is not really a thing. Only that the chip power draw is really low to begin with, as this is mentioned in the video), is not going to help at all. 30+ year old coin batteries are going to be as dead as a Monty Python Parrot.

He even provides a guide on how to resurrect a dead RTC, by removing the casing and adding a new battery to it. As the RTC chip itself and the crystal are still perfectly good.

Reply 6 of 15, by mkarcher

User metadata
Rank l33t
Rank
l33t
Matchstick wrote on 2024-05-24, 16:27:

so doing some hack to change the "storage" or "low power" mode (honestly looking at the chip data sheet and what is actually inside a Dallas RTC, I think this is not really a thing

Would you please reconsider the claim that there is no "low power" mode after looking at the datasheet at https://pdfserv.maximintegrated.com/en/ds/DS1 … 5-DS12C887A.pdf ?

DS12C887A datasheet, page 18: Oscillator Control Bits wrote:

When the DS12887, DS12887A, DS12C887, and DS12C887A are shipped from the factory, the internal oscillator is turned off. This prevents the lithium energy cell from being used until the device is installed in a system.

This very much confirms that there is a low-power mode which is intended increase battery life while the chip is in storage.

The datasheet also has some indication about what "low power" means:

DS12C887A datasheet, page 3: DC electrical characteristics wrote:

V_BAT current (OSC on), T_A = +25°C): I_BAT (max) = 500nA

V_BAT current (Oscillator off): I_BATDR (max) = 100nA

Note how the "OSC on" specification is for 25°C only, so it might be considerably higher at the maximum permitted temperature, whereas the "Oscillator off" specification does not specify a temperature, so "T_A over the operating range, unless otherwise noted" applies, so even at +85°C, battery current is 100nA max. As leakage tends to increase with temperature, at +25°C, I expect the battery current to be below 70nA, likely even below 50nA.

This is a very precise description on how to enter/leave "low power" mode under software control:

DS12C887A datasheet, page 18: Oscillator Control Bits wrote:

A pattern of 010 in bits 4 to 6 of Register A turns the oscillator on and enables the countdown chain. A pattern of 11x (DV2 = 1, DV1 = 1, DV0 = X) turns the oscillator on, but holds the countdown chain of the oscillator in reset. All other combinations of bits 4 to 6 keep the oscillator off.

And finally, about starting up: It is never required:

DS12C887A datasheet, page 12: Power-Down/Power-Up Considerations wrote:

If the oscillator is not enabled, the oscillator-enable bit is enabled on power-up, and the device becomes immediately accessible.

The datasheet refers to applying the +5V from the PC power supply as "power up". This by itself is enough for the oscillator to turn on and the chip leave "low power" mode.

Reply 7 of 15, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
mkarcher wrote on 2024-05-24, 19:53:

And finally, about starting up: It is never required:

DS12C887A datasheet, page 12: Power-Down/Power-Up Considerations wrote:

If the oscillator is not enabled, the oscillator-enable bit is enabled on power-up, and the device becomes immediately accessible.

The datasheet refers to applying the +5V from the PC power supply as "power up". This by itself is enough for the oscillator to turn on and the chip leave "low power" mode.

I didn't realize these took +5V, but in the datasheet they do. I believe we have all noticed the following behavior: on a barrel battery board, the board will hold the settings across reboots (because of the charging circuit) and even after the board is powered off for an hour or so (because of capacitance?).

In contrast, on a Dallas board, once the Dallas battery is totally dead, as soon as you save and exit BIOS setup, everything is gone.

Is that because the +5V doesn't power the NVRAM? Or because the BIOS looks at the dead battery bits in one of the RTC registers and wipes the settings during POST?

Reply 8 of 15, by mkarcher

User metadata
Rank l33t
Rank
l33t
jakethompson1 wrote on 2024-05-24, 20:18:

I didn't realize these took +5V, but in the datasheet they do. I believe we have all noticed the following behavior: on a barrel battery board, the board will hold the settings across reboots (because of the charging circuit) and even after the board is powered off for an hour or so (because of capacitance?).

In contrast, on a Dallas board, once the Dallas battery is totally dead, as soon as you save and exit BIOS setup, everything is gone.

The power structure is different between the chip types. The Dallas chips have a dedicated battery power input pin, and switch over to pull power from that pin for memory conservation and the clock oscillator when the main supply voltage fails. On the other hand, the "old RTCs" have just one power supply pin, and the chips switch between "fully operational mode" and "battery backup mode" depending on the voltage on that pin. A typical construction is to feed this combined power pin via diodes from both the battery and the +5V supply. It makes a lot of sense to place a 100nF decoupling capacitor on the supply pin of the "old RTC" after the diodes, which will be charged by the operation voltage and can be used as "backup voltage". Assuming the 5oonA maximum current in the Dallas sheet is in the ballpark of the actual current used by older RTCs, this current consumption a 100nF cap should be discharged by 1V (with ticking clock) within a fifth of a second, so it would take less than a second to completely discharge that cap - unless the clock stops ticking at ~2.5V, and the chip stops using any significant amount of power and yet keeps the memory charged until ~1.7V.

On the Dallas chip, there is no current path from +5V to charge anything that lies in the backup power supply path.

jakethompson1 wrote on 2024-05-24, 20:18:

Is that because the +5V doesn't power the NVRAM? Or because the BIOS looks at the dead battery bits in one of the RTC registers and wipes the settings during POST?

Even Dallas chips keep the memory contents and run the clock while discharged. So the oscillator and the memory is obviously also powered by +5V. If you get a deleted CMOS with the message "CMOS checksum bad", it's not because the "dead battery bit" is detected, but because the memory physically lost its contents. Only if you see "CMOS battery low" without "CMOS checksum error", the BIOS might have cleared the CMOS due to "low battery".

The Dallas chips keep reporting "low battery" even when the RAM and clock is powered using +5V system operation voltage. So if a BIOS really would clear the CMOS based on the "low battery" bit, it would clear the CMOS on every reset, even with uninterrupted mainboard power. This does not match my experience with 486/Pentium boards. On the other hand, some BIOSes have some code in it that checks the "low battery" bit and causes spurious behaviour. One curious case is strange floppy issues, because on some BIOSes, the "get drive type" BIOS function fails on purpose if the "low battery" bit is set. On the other hand, those BIOSes also intentionally do not halt the POST on the low battery issue, so you don't even see any warning unless the POST is also halted for a different reason (e.g. keyboard missing, IDE drive not connected).

See Re: Strange Floppy Disk behaviour 486 for my initial report of that story.

Reply 9 of 15, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
mkarcher wrote on 2024-05-24, 20:57:

So if a BIOS really would clear the CMOS based on the "low battery" bit, it would clear the CMOS on every reset, even with uninterrupted mainboard power. This does not match my experience with 486/Pentium boards.

Thanks for the explanation. There are definitely some boards that work this way, where a completely dead Dallas battery means you can't even boot into an OS and access the HDD if that OS relies on correct CMOS HDD settings being correct (e.g. DOS or Win9x) but you can boot into Linux from a floppy and have it probe for IDE disks. I experienced it on the MB-8500TUR which uses AMIBIOS. I believe the venerable MB-8443UUD (Award) is known for this as well. I always figured it was because those DS12887A+ family chips are missing several pins, and that one was +5V and it relied on the battery no matter what, but the datasheet/explanation above makes it more complicated.

I believe this issue is why feipoa has those modded MB-8433UUD BIOSes with different default settings in them, so that you can boot with a completely dead Dallas battery. But I guess that points to the BIOS reinitializing it on every boot if it thinks something is wrong with the battery.

Reply 10 of 15, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Just to add a bit more confusion: the Dallas chips with "A" on the end of their name have the RCLR pin connected, while the ones without it have that pin NC. I've come across more than one motherboard designed for the "non-A" model that has that pin grounded in the socket, so if you plug in a DS12887A it will forget settings every time you power the system off, with the added bonus of running the battery flat since that pin is connected to the battery via a pull-up.
(This is also why you should never buy a DS12887A from a seller that posts pictures of them stored in foil...)
For extra confusion: some of the Dallas knock-offs (e.g. ODIN or STMicro) use a 12885 and claim to be fully compatible with 12887. 12885 has RCLR, 12887 does not...

The easy way to check for this: if the motherboard as a "CMOS reset" jumper, it likely wants a DS12887A. If it has no jumper, either use a regular DS12887 or bend/cut pin 21 so it doesn't make contact.

Reply 11 of 15, by Horun

User metadata
Rank l33t++
Rank
l33t++

Thanks mkarcher ! explains very well. I have some datasheets but never dug down that deep. Also you might like to know (as per a diff topic here about buying Dallas RTC) those 3 "Dallas" labeled I bought in 2020 from Quest with man date 1999 (9920A2) tested at 3.3v in 2020 and today in 2024 still test at 3.3v (actual = 3.32 +/- .01) on my DVM. So they are definately in low power or "off mode" and shows how long they can last if are NOS and not some used one from a board pull.
Though is possible once these are turned on their life span will be much shorter than the "10 year" expected lifetime. I put one in a Biostar 1433/40 AEA-V v5 in 2020 and it still holds time and cmos near 4 years later but did not just re-test it V today (added just tested the spares)
Anyway just a comment on how well that low power mode works 😀
Good point jakethompson1 !
As for Necroware I am one of those that prefer the actual original part if at all possible, same with using a real IDE HD versus CF card and adapter.....just an anal thing with me ;p

Hate posting a reply and then have to edit it because it made no sense 😁 First computer was an IBM 3270 workstation with CGA monitor. Stuff: https://archive.org/details/@horun

Reply 12 of 15, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
mkarcher wrote on 2024-05-24, 20:57:

So if a BIOS really would clear the CMOS based on the "low battery" bit, it would clear the CMOS on every reset, even with uninterrupted mainboard power.

I've encountered several boards which do exactly this

Reply 13 of 15, by mkarcher

User metadata
Rank l33t
Rank
l33t
maxtherabbit wrote on 2024-05-25, 12:59:
mkarcher wrote on 2024-05-24, 20:57:

So if a BIOS really would clear the CMOS based on the "low battery" bit, it would clear the CMOS on every reset, even with uninterrupted mainboard power.

I've encountered several boards which do exactly this

I wonder whether clear-on-low-battery is more common on boards with old-style RTCs. As old-style RTCs have no dedicated battery input, the "battery low" bit will never get set while the computer is turned on, and might even not be set after a brief (<5s) power interruption even if no battery is installed. On the other hand, the Dallas chips keep the "battery low" bit set on low battery even if the system is powered. That means that the clear-on-battery-low approach did not clear the CMOS on warm starts with classic RTCs, but it does so on Dallas chips. I suspect that "CMOS clear on every reset" is mostly observed on early systems with Dallas chips that still have the algorithm that fits the classic RTC better.

Reply 14 of 15, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
mkarcher wrote on 2024-05-25, 19:39:
maxtherabbit wrote on 2024-05-25, 12:59:
mkarcher wrote on 2024-05-24, 20:57:

So if a BIOS really would clear the CMOS based on the "low battery" bit, it would clear the CMOS on every reset, even with uninterrupted mainboard power.

I've encountered several boards which do exactly this

I wonder whether clear-on-low-battery is more common on boards with old-style RTCs. As old-style RTCs have no dedicated battery input, the "battery low" bit will never get set while the computer is turned on, and might even not be set after a brief (<5s) power interruption even if no battery is installed. On the other hand, the Dallas chips keep the "battery low" bit set on low battery even if the system is powered. That means that the clear-on-battery-low approach did not clear the CMOS on warm starts with classic RTCs, but it does so on Dallas chips. I suspect that "CMOS clear on every reset" is mostly observed on early systems with Dallas chips that still have the algorithm that fits the classic RTC better.

I would have thought the same, but I've seen it more on pentium and pentium pro era stuff than on 2-486 boards

Reply 15 of 15, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie
Matchstick wrote on 2024-05-21, 18:07:
This is what you should be replacing the RTC with... […]
Show full quote
Calibus wrote on 2024-05-21, 00:26:
Hi, I replaced an ancient Dallas RTC in an old 486 motherboard with a new Dallas RTC from ebay. The motherboard is still complai […]
Show full quote

Hi,
I replaced an ancient Dallas RTC in an old 486 motherboard with a new Dallas RTC from ebay.
The motherboard is still complaining about the CMOS being reset on bootup - but I have since read about the chips having a "shelf" or "storage" mode where they draw very little current to save the battery

Jim

This is what you should be replacing the RTC with...

https://github.com/necroware/nwX287

https://www.pcbway.com/project/shareproject/N … e_91a9afb4.html

Some motherboards are very picky and refuse to work with those. (although it probably has to do with not cutting certain pins/setting motorola/intel mode wrong) He just posted a new video because he gets complaints all the time from people who buy them from ebay sellers 🤣