If you buy a new EPROM do you have to erase it first? - Page 1
Forum section: electronics / beginners

author: BeBuLamar
author_rank: Super Contributor
timestamp: June 23, 2023, 08:22:06 pm
content: I need to duplicate a number of EPROM. I can read the data off it and I can buy new EPROM. I have the reader/burner but I don't have the UV eraser do I have to erase new EPROM before burning new data onto it?

author: langwadt
author_rank: Super Contributor
timestamp: June 23, 2023, 08:29:55 pm
content: I assume you read/burner will tell you if it is empty

author: MK14
author_rank: Super Contributor
timestamp: June 23, 2023, 08:32:36 pm
content: IIRC they are usually already erased for you, at the factory or that is how they are made, when genuinely brand new.

author: AndyBeez
author_rank: Frequent Contributor
timestamp: June 23, 2023, 09:33:34 pm
content: Nope, but it is good practice to 'blank' an EPROM before writing, even if it is new out the tube.You can buy a modern UV LED, or even a UV flashlight and use this to erase the chip through the window. Just read the datasheets to make sure the UV wavelengths overlap.

author: CaptDon
author_rank: Super Contributor
timestamp: June 23, 2023, 10:00:31 pm
content: I seriously doubt that any UV LED will produce enough shortwave UV to properly erase an EPROM. They require short wavelengths like from a germicidal mercury lamp, or leave them in the sun. I recall the datasheets making notes about exposure to the sun's light.

author: langwadt
author_rank: Super Contributor
timestamp: June 23, 2023, 10:24:07 pm
content: Quote from: CaptDon on June 23, 2023, 10:00:31 pmI've someone do the experiment on how long it takes to erase an eprom with sunlight by leaving different eproms outside and testing every day. afair it took anywhere from about a week to a couple of months to erase them

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 23, 2023, 10:41:15 pm
content: A genuinely new EPROM will always be blank & doesn't need erasing before use

author: Andy Watson
author_rank: Super Contributor
timestamp: June 23, 2023, 10:43:33 pm
content: Quote from: MK14 on June 23, 2023, 08:32:36 pmBack in the day you could purchase write-once Eproms that were basically the same chip but without theexpensivequartz window in the package. So the factory must have a method of ensuring that the devices are blank before packaging. But I have often wondered whether the devices are inherently made blank, or are they all washed under a UV light for the required 15W/s/cm^2 ?

author: Benta
author_rank: Super Contributor
timestamp: June 23, 2023, 10:52:20 pm
content: Quote from: langwadt on June 23, 2023, 10:24:07 pm^ThisEPROM erasing needs "hard" UV, aka UV-C, around 250...260 nm.The small erasers for a few devices normally have a 4 W fluorescent UV-C tube and need 10...15 min. for erasing.Just curious: where do you buy UV-EPROMS new today?

author: MK14
author_rank: Super Contributor
timestamp: June 23, 2023, 11:10:40 pm
content: Quote from: Andy Watson on June 23, 2023, 10:43:33 pmYes, the OTP version of many things, including some MCUs, from times gone by (mostly, but a rare modern exception being the Chinese $0.03 OTP Padauk MCUs). Almost a very early version of flash devices, but without the built in erase (and typically built in switchers, so they could be single supply rail when programming, at some point in time).Some people sometimes wondered if there was a way of erasing those OTP chips, such as by taking them to a nuclear power station ...Edit: My guess would be, they would need to program them (with suitable bit test patterns) during testing, to make sure they get rid of all faulty and below specification devices. So I suspect they would then need to erase them, before packaging.

author: Andy Watson
author_rank: Super Contributor
timestamp: June 23, 2023, 11:31:58 pm
content: Quote from: langwadt on June 23, 2023, 10:24:07 pmTo quote from Intel's 1982 Component Data Catalog, discussing erasure of their 2764 eprom (although, all devices seem to have a similar spec.):Quote2537 Angstroms is a spectral line produced by mercury."Opaque labels available from Intel..." Wait! You mean the surfeit of free, metalised sticky labels intended to cover the write-protect of floppy disks weren't good-enough ?

author: AndyBeez
author_rank: Frequent Contributor
timestamp: June 23, 2023, 11:48:47 pm
content: By blanking new chips I meant that everything is confirmed as being tied in the #FF or #00 state - It's just a quality control thing. Before flashing, read through the new memory to confirm there are no chaotic bits. And then proceed as normal.For erasing, look for UV-C LEDs as used in 'baby sterilizers'. Typical output is across the 100 to 280nm range which overlaps the magic mercury line of retro EPROMs. Might not be cheap though?>>> Avoid UV C light in direct skin contact <<<You could try a nail polish setter, but the effectiveness as an EPROM eraser might be more of an urban myth than a reality

author: MrAl
author_rank: Super Contributor
timestamp: June 24, 2023, 12:30:05 am
content: Quote from: BeBuLamar on June 23, 2023, 08:22:06 pmHello there,The ones i got years ago were blank with code 0xFF for every byte before programming. This allowed me to use a trick to allow me to use the UVEEPROM without having to erase it, even if i updated the software.The trick works with CPU's that use code 0x00 for a 'nop', or data EEPROMs.You start by placing the run code not at address 0x0000 you place it at 0x8000 and place a jump instruction at location 0x0000 which may take two or more bytes. Let's say it takes 2 bytes for a jump instruction. When the CPU starts up it goes to location 0x0000 and starts to execute the code. Because there is a jump instruction there, it jumps to 0x8000 which is here the actual needed instructions start.Now when you update the code, assuming it is not too long, you place the new code at 0x8200 for example, then change the first two bytes to code 0x00 and the third byte to the jump instruction to jump to 0x8200. When the CPU starts the next time, it jumps to 0x8200 with a slightly longer delay, but not much because nop's execute fast. You can keep doing that as you update the code.Of course that example is an exaggeration because you probably only have to update maybe 256 times. That means you reserve 512 bytes at the start from 0x0000 to 0x0100 and then you can place the first jump location to 0x0102 or something like that. That gives you 512 chances to get the code right.Of course the code can not take up a huge amount of EPROM space if you intend to update it many times, but for example a bootloader would be a good example where you want to update the bootloader code from time to time.For data EEPROMs, you place the address of the first byte of real data in location 0x0000 and 0x0001, then have the program that reads the data recognize the code sequence 0x00, 0x00 as an invalid data start address and so have it go up the list until it gets to a non zero address. This allows you to reprogram several times without erasing, as long as you can afford to oversize the EPROM being used.I don't remember the size of the UVEEPROMs were i used to use but you would have to size it to fit the application as well as the updating technique over time.These days we use EEPROMs though which are easier to deal with.If you just have to copy EPROMs though then you probably don't have to worry about making mistakes as long as the code in the template EPROM has already been tested and never needs to be updated.

author: helius
author_rank: Super Contributor
timestamp: June 24, 2023, 01:53:17 am
content: As langwadt said in Reply #1, device programmers have a "Blank Check" function and automatically invoke it when you ask them to program a device. The Blank Check will fail if the EPROM is not all 0xFF.

author: srb1954
author_rank: Super Contributor
timestamp: June 24, 2023, 02:47:17 am
content: Quote from: MK14 on June 23, 2023, 11:10:40 pmI once took some OTP chips to my dentist and asked him to put them under his X-ray machine. It didn't erase a single bit in the chip.Exposing the chips to much higher levels of radiation might work but it could also cause damage to the internal oxide insulating layers and the EPROMs would lose their data prematurely.

author: MK14
author_rank: Super Contributor
timestamp: June 24, 2023, 10:01:01 am
content: Quote from: srb1954 on June 24, 2023, 02:47:17 amI searched around the internet, and it seems that in some rare circumstances, people havesuccessfullyerased them with x-rays (but it DOESN'T really work!), it needs a fairly long duration (as with UV erase), of perhaps around 30 minutes, and maybe certain wavelengths of x-ray as well.BUT, the 'erased' chips (OTP), lose their new programming patterns, after a minute or two. Which implies that perhaps the insulating properties of the memory cells has perhaps been degraded/damaged/destroyed by the x-ray exposure. Or for some other reason(s).So as other(s) have said in this thread, it is perhaps too damaging to the chip, for x-rays to be used.

author: wraper
author_rank: Unknown
timestamp: June 24, 2023, 10:16:44 am
content: Quote from: AndyBeez on June 23, 2023, 09:33:34 pmMaybe with 365 nm LEDs you'll have some luck of erasing them if left for a very long time, but not usual 395 nm as wavelength is way too long. You need UV-C to erase EPROM. UV LEDs are UV-A

author: RoGeorge
author_rank: Super Contributor
timestamp: June 24, 2023, 10:17:14 am
content: Quote from: BeBuLamar on June 23, 2023, 08:22:06 pmIf it's NOS (never used) then it can be written directly. That's how I remember them from the 90's. Back then I was using a 150W street lamp after braking the external glass (the ones that used to have a big coil as ballast in series with the bulb, and were slowly starting). Inside it's a UV lamp, the external bulb glass is covered in a luminofor that turns UV into visible light. Beware that the UV is VERY harsh to the eye, never look into it, and never power the UV without a metallic enclosure. Gets quite hot as well, so beware to not start a fire. Also, always power it in series with the ballast coil (or with an electronic starter). The lamp was looking like this, and if you break the white glass, inside is another glass enclosure that will emit very harsh UV:https://www.lighting.philips.com/main/prof/conventional-lamps-and-tubes/high-intensity-discharge-lamps/hpl-high-pressure-mercury/mercury-vapor-standard/LP_CF_D_MVSTD_EU/family

author: MrAl
author_rank: Super Contributor
timestamp: June 24, 2023, 11:56:59 am
content: Quote from: helius on June 24, 2023, 01:53:17 amHi,Mine did not have that. You could program and reprogram as many times as you like. The only thing that does not work is you cannot change a byte that is for example 0x00 to 0xFF, and in general you can't change a byte from one non-0xFF code to another code because to do that you would have to be able to program a zero bit to a one bit in the general case, and you cannot do that, you can only program a 1 bit to a 0 bit. The only way to get the 0 bit to go back to 1 is with an erase operation which requires the special wavelength light.If you had bits as: 00000000 you could not program that byte to 00000001 for example, but if the byte was already 00000011 then you could change that to 00000001 because that would only involve changing that one bit that is a '1' to a '0', thus leaving the code 00000001 in that byte location.If you have a programmer that won't allow this, then get another programmer or build your own.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 24, 2023, 01:44:35 pm
content: UV eproms used to come set to all 1s I seem to recall. You never know so erase it anyway- it costs nothing....

author: helius
author_rank: Super Contributor
timestamp: June 26, 2023, 12:34:20 am
content: Quote from: MrAl on June 24, 2023, 11:56:59 amThe programmers I have experience with (Data I/O, BP, Advin, B&C, Galep) have an option to disable the blank check. It is normally enabled to prevent user errors.

author: BeBuLamar
author_rank: Super Contributor
timestamp: June 26, 2023, 05:54:05 pm
content: Quote from: Terry Bites on June 24, 2023, 01:44:35 pmYeah it costs nothing but I will have to buy a uv eraser. If I have one I would definitely erase the EPROM before writing new data but I don't have one.I have a number of devices that their functionality can be changed to what I need by replacing the EPROM chips. I could buy the EPROM chips already burned from the manufacturer for $200 each. Or I can buy the blank EPROM and burn them. I have a number of devices that already have the correct chips in so I can copy them.If I have to buy the eraser then although it's more expensive I think I would pay $2000 to convert the 10 devices I have by buying the chips from the manufacturer.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 26, 2023, 06:22:07 pm
content: Only program the EPROM, then verify the written binary. If the read back verification match, it's OK. We also used to cover the quartz window with a sticker that will stop light, but can stay just fine for many years without any cover (after writing), unless you keep it in open sunlight or so. In practice the EPROM is usually inside an enclosure where is always dark and no UV.In fact, shelf waiting time works in your favor, because when an EPROM bit "wears with time", it lose the accumulated charge, which means it goes from 0 back to 1. So unless some extremely energetic particle hit the EPROM and made some bits charged so they go to zero, then the longer an EPROM rests, the more "erased" it becomes.