General > General Technical Chat
Question about how EPROMs work
(1/2) > >>
MaximRecoil:
Quick summary version:

I replaced the original ST brand 27C512 BIOS EPROM in my 486 PC with a new one and now instead of losing the BIOS settings immediately when it doesn't have any power, it can retain them for at least 2 hours. How is it doing that?

Longer version:

I have an old 486 PC and the motherboard originally had a barrel-type battery soldered to it which was long since dead and starting to leak. It has the option for an external battery, so I removed the original battery and connected a 4 AA battery holder to the external battery pins, which works fine.

The BIOS has always lost its settings immediately if you disconnected the battery and turned the computer off. Even if it was only off for 1 second, it would give a "low CMOS battery" warning when you booted and you'd have to press F1 to continue, which would take you into the BIOS settings where you'd have to configure the BIOS again (set the date and time, tell it what floppy drives you have, set the boot order, and tell it to autodetect the hard drive's CHS values; everything else I left default). There were no exceptions ever. If you deprived it of power for any amount of time at all then you had to reconfigure the BIOS; it was as predictable as the next sunrise.

The other day I figured it would be a good idea to get a copy of the BIOS since there doesn't seem to be one available anywhere online for this particular motherboard (PX486 P3 with OPTi 495SLC chipset). After I dumped the original EPROM (UV-erasable 27C512, ST brand) I decided to burn the BIOS to a new EPROM (which was also a UV-erasable 27C512, ST brand, but it was a new/unused one) to make sure it worked in my motherboard.

It worked fine, and then later I disconnected the external battery because I wanted to move some of the cards to a different slot, and the motherboard sometimes refuses to boot if you make any changes without resetting the BIOS, so whenever I make any hardware changes I preemptively disconnect the battery which immediately rests the BIOS. It took me about 10 minutes and then I turned the computer back on (batteries still disconnected), fully expecting the loud double-beep and the "F1 to continue to enter setup" message. But instead it just booted into Windows as if nothing had happened. The time was 10 minutes behind (which is better than its usual reversion to 1/1/1980) but the BIOS hadn't lost any of its settings.

Then I wanted to see if it could go even longer without losing its BIOS settings so I turned the PC off and disconnected the batteries for 2 hours, and it still didn't lose its settings (the time was 2 hours behind this time when I turned it back on).

So what is this new ST 27C512 EPROM doing that the original ST 27C512 wasn't doing? I can't imagine that the motherboard is able to write anything to the EPROM because it's already full (64 KB EPROM programmed with a 64 KB .BIN file), and since it's not an EEPROM, it can't erase anything to make room for new data. Also, the motherboard has no electrolytic capacitors whatsoever. The only capacitors it has are tiny film capacitors, which have next to no capacity, so I don't see how they could be storing anything for very long. And even if they could, why weren't they doing it before with the original EPROM?
madires:
The BIOS settings are stored in a CMOS RAM (SRAM) which is part of the clock chip (in the old days). As long as there is sufficient charge, possibly in some caps, the CMOS will retain the data. When you remove the battery and short the battery pins on the mainboard the settings should be gone immediately.
pqass:
The 27C512 EPROM stores only the boot code.  There's no configuration info stored there except defaults.  Only an EPROM programmer that applies a 12V Vpp can change it or UV light to erase it.  I'm not aware of any motherboard that has done this.

The battery is keeping some bit of static RAM alive; not the EPROM.  Usually, the battery is a 3V coin cell, 3-stacked NiCd cells, or 3.6V lithium cell.  What do you mean by "external battery pins?"    What's the make and model # of the motherboard?   If it's this MB, JP1 needs to be open.


MaximRecoil:

--- Quote from: madires on July 23, 2023, 02:40:58 pm ---The BIOS settings are stored in a CMOS RAM (SRAM) which is part of the clock chip (in the old days). As long as there is sufficient charge, possibly in some caps, the CMOS will retain the data. When you remove the battery and short the battery pins on the mainboard the settings should be gone immediately.

--- End quote ---

That sounds like it has nothing to do with the EPROM that stores the fundamental BIOS firmware, and it's how I have always assumed it worked. So why weren't the settings ever saved when there was no power when the original BIOS EPROM was in there, but when I put the new BIOS EPROM in there the settings are saved for at least 2 hours without any power (maybe longer, but 2 hours without power is the longest I've tested it for so far).

Like I mentioned before, the motherboard has no electrolytic capacitors at all, only tiny film and ceramic capacitors. It's very similar to this motherboard, except mine has 3 VLB slots:

https://theretroweb.com/motherboard/image/604024a-61bc67ec1ca7f999003268.png


--- Quote from: pqass on July 23, 2023, 02:50:27 pm ---The 27C512 EPROM stores only the boot code.  There's no configuration info stored there except defaults.  Only an EPROM programmer that applies a 12V Vpp can change it or UV light to erase it.  I'm not aware of any motherboard that has done this.
--- End quote ---

Yeah, that's what I was thinking, which is why I don't understand how doing nothing other than replacing the EPROM made it suddenly able to save my configuration for at least two hours without any power.


--- Quote ---The battery is keeping some bit of static RAM alive; not the EPROM.
--- End quote ---

That's also what I thought, which is why this makes no sense.


--- Quote ---Usually, the battery is a 3V coin cell, 3-stacked NiCd cells, or 3.6V lithium cell.  What do you mean by "external battery pins?"    What's the make and model # of the motherboard?
--- End quote ---

The motherboard has header pins for connecting an external battery, which is what I did a couple years ago when I removed the original soldered-in barrel-type battery (there's a thread about those old barrel-type rechargeable batteries they used to put in most 486 and older motherboards here - https://www.vogons.org/viewtopic.php?t=26539 ). Like I mentioned in my original post, the motherboard is a PX486 P3 with OPTi 495SLC chipset (there is no make printed on it anywhere that I can find). The manual for it is here:

https://theretroweb.com/motherboard/manual/v4p495l-px486p3-5fb823bb69abe519618422.pdf

Sections 2.1 and 2.8 mention the external battery connector pins.

The external batteries have always worked fine; as long as they're connected and the batteries are good, the BIOS retains its settings and it keeps good time. But with the original BIOS EPROM, the BIOS settings were instantly gone when it had no power (PC turned off, batteries disconnected), and the time reverted to 1/1/1980). With the new BIOS EPROM (which shouldn't have made any difference), the BIOS settings are retained for at least 2 hours without power and the only time lost is the amount of time that it didn't have power (i.e., no power for 2 hours = time is 2 hours behind when you turn it back on).


--- Quote from: edavid on July 23, 2023, 02:59:15 pm ---Perhaps the original EPROM was partially defective and was causing a checksum error when reading the CMOS RAM, leading the BIOS to think the CMOS battery was dead when it was not.

--- End quote ---

But it only happened during a cold boot when the batteries really were "dead" (i.e., either dead or disconnected by me). As long as the batteries were connected and had a sufficient charge, all the BIOS settings were retained and it kept good time when it was turned off.
Veteran68:

--- Quote from: pqass on July 23, 2023, 02:50:27 pm ---Usually, the battery is a 3V coin cell, 3-stacked NiCd cells, or 3.6V lithium cell.  What do you mean by "external battery pins?"    What's the make and model # of the motherboard?

--- End quote ---

Many old PC's used an external battery pack attached by a JST or Dupont header on the motherboard. I've seen some that simply used AA battery holders taped/velcroed inside the case. As I recall some came with both an onboard battery and external battery pins, as seems to be the case here.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod