Author Topic: Question about how EPROMs work  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

Offline MaximRecoilTopic starter

  • Regular Contributor
  • *
  • Posts: 236
  • Country: us
Question about how EPROMs work
« on: July 23, 2023, 02:00:28 pm »
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?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: Question about how EPROMs work
« Reply #1 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.
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 945
  • Country: ca
Re: Question about how EPROMs work
« Reply #2 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.

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.


« Last Edit: July 23, 2023, 03:20:37 pm by pqass »
 

Offline MaximRecoilTopic starter

  • Regular Contributor
  • *
  • Posts: 236
  • Country: us
Re: Question about how EPROMs work
« Reply #3 on: July 23, 2023, 03:16:31 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.

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

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.

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.

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?

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).

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.

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.
 

Offline Veteran68

  • Frequent Contributor
  • **
  • Posts: 727
  • Country: us
Re: Question about how EPROMs work
« Reply #4 on: July 23, 2023, 03:18:05 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?

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.
« Last Edit: July 23, 2023, 03:20:16 pm by Veteran68 »
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 945
  • Country: ca
Re: Question about how EPROMs work
« Reply #5 on: July 23, 2023, 03:43:44 pm »
Maybe the external battery connector wasn't making good contact.  And the activity of replacing the EPROM may have wiggled it a bit. Then you attributed the EPROM change as the solution.

If you apply, say, 10 cycles of remove/re-connect the external battery, then put back the old EPROM and update the configuration settings and time, you may find that it will retain the configuration settings.

 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Question about how EPROMs work
« Reply #6 on: July 23, 2023, 04:31:52 pm »
Quote
The battery is keeping some bit of static RAM alive; not the EPROM.

That's also what I thought, which is why this makes no sense.
But did you try returning an original EPROM? Maybe it's not the EPROM at all that made an improvement but you cleaning the board for example. It could be a current leakage from a backup circuit into the rest of the circuit, and you replacing M27C512 with a different one somehow reduced that leakage. Also more than a single die version of this IC was produced, so not all of them are exactly the same. Not to say if you bought the replacement from China, they very often relabel EPROMs into another similar part.
« Last Edit: July 23, 2023, 04:35:50 pm by wraper »
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Question about how EPROMs work
« Reply #7 on: July 23, 2023, 04:40:13 pm »
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
That board has tantalum capacitors though.
 

Offline MaximRecoilTopic starter

  • Regular Contributor
  • *
  • Posts: 236
  • Country: us
Re: Question about how EPROMs work
« Reply #8 on: July 23, 2023, 05:31:28 pm »
Maybe the external battery connector wasn't making good contact.  And the activity of replacing the EPROM may have wiggled it a bit. Then you attributed the EPROM change as the solution.

If you apply, say, 10 cycles of remove/re-connect the external battery, then put back the old EPROM and update the configuration settings and time, you may find that it will retain the configuration settings.

The external batteries have always worked perfectly. This is about what happens when you disconnect the external batteries with the PC turned off.

- With the original factory-installed EPROM, BIOS settings and date/time instantly reverted to defaults (nothing configured and 12 AM, 1/1/1980 for the time and date) and it wouldn't boot again until I configured the BIOS. For example, if you disconnected the batteries and pressed the power button on the PC to turn it completely off, then waited exactly 1 second, and pressed the power button again to turn it back on, all the BIOS settings were completely and utterly gone, every single time, no exceptions whatsoever.

- With the new EPROM that I programmed using a copy from the original EPROM, BIOS settings are retained for at least 2 hours while the PC is turned off and the batteries are disconnected, and the time of day is only off by the same amount of time that the PC had no power available to it.

But did you try returning an original EPROM? Maybe it's not the EPROM at all that made an improvement but you cleaning the board for example. It could be a current leakage from a backup circuit into the rest of the circuit, and you replacing M27C512 with a different one somehow reduced that leakage. Also more than a single die version of this IC was produced, so not all of them are exactly the same. Not to say if you bought the replacement from China, they very often relabel EPROMs into another similar part.

No, I hadn't tried putting the original EPROM back in there. It's kind of a pain to get to and I had figured it would just go back to the way it was before, but I just tried it and it didn't go back to the way it was before. Now it's retaining the BIOS settings even when turned off and the batteries disconnected, with the original EPROM in there, just like it first started doing when I put the new EPROM in there the other day.

I don't know what to make of that. I'd already had that original EPROM in and out of its socket several times about two weeks ago when I was trying to figure out why the PC was always freezing after being on for about 10 minutes or less. It turned out to be a heat issue. I put a heatsink + fan on the CPU and it's been 100% stable ever since, even when running nonstop all day. I didn't have a heat sink or fan for the CPU before because most people don't put one on an AMD Am486DX2-66, and it's not printed on the CPU itself that it needs it (back then, the ones that needed a heat sink / fan had it written on them; like on this AMD Am486DX4-100 for example). But it was during a heat wave here and I guess the 95-degree F ambient temperatures were more than it could handle without any cooling.

That board has tantalum capacitors though.

Yes, it does. I was thinking that tantalum capacitors were a type of film capacitor, but Google says they're a type of electrolytic capacitor.

I still have no idea why it can suddenly retain BIOS settings for at least 2 hours with no active power source. I've had it since 2002 and it has never been able to retain BIOS settings for even 1 second without an active power source.
« Last Edit: July 23, 2023, 05:33:49 pm by MaximRecoil »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf