The "EPROM Emulator" [Kicad]

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

The "EPROM Emulator" [Kicad]

Post by XavSnap »

Hi,

A "new" project from "Radio-Plans" magazine #500 (fr).
Author : Patrick Gueulle.

This project turn a RAM to a battery backuped storage support...

The original project use a 6116 chip (2kx8 RAM):
RP_n500_EmulateurEPROM_1.jpg
RP500_EmulateurEPROM_1.pdf
(105.18 KiB) Downloaded 87 times


The second project can be use on the 24 or 28 pins chips:
RP_n500_EmulateurEPROM_2.jpg
RP500_EmulateurEPROM_2.pdf
(129.34 KiB) Downloaded 89 times


http://abandon.pcbs.free.fr/RadioPlans.htm

Direct link to Kicad projects:
http://abandon.pcbs.free.fr/RadioPlans/RP_n500/


Have fun.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
David G
Posts: 632
Joined: Thu Jul 17, 2014 7:58 am
Location: 48 North

Re: The "EPROM Emulator" [Kicad]

Post by David G »

Which 28-pin chips can it use? 
XavSnap wrote: Mon Jan 06, 2025 8:10 pm The second project can be use on the 24 or 28 pins chips


It is an incredible article. It explains why you'd want this and the basics of battery-backed RAM


I didn't know about the JEDEC standard for memory chips
The JEDEC standard ... imposes a broad pinout compatibility between most static RAM, ROM, or EPROM memories

Article compares specifically:
  • 6116 2Kx8 static RAM (24-pin)

Radio Plans magazine issue 500 (circa 1989) pages 47-49, 60-61
AN EPROM EMULATOR


[image: small case with 3 chips: Toshiba TC5517AP, Mostek MK48Z028 ZeroPower RAM, National Semiconductor MM27160 EPROM. All are 24-pin 2Kx8 memory chips]


EPROMs are extremely useful components because they can be customized by their user using hardware that can be very simple (see our previous articles).

Their main use is obviously the storage of programs for microprocessors, but by associating them with a simple binary counter, they can also be used to make excellent sequencers (for example for "high-end" trackers).

Their major drawback is the relative cumbersomeness of their erasure procedure, which must nevertheless be applied in its entirety as soon as one has to change even just one "O" to a "1".

Radio Plans 500
47


[small image: MK48Z02 Starter Kit by United Technologies Mostek]


AT the development stage, it is infinitely more comfortable to work on random access memory (RAM), which must however find a way to make it "non-volatile". We will therefore study here the art and the way of replacing an EPROM with a CMOS RAM supported by a battery.


COMPATIBLE PINOUTS

The JEDEC standard, renamed "BYTEWIDE" by MOSTEK, imposes a broad pinout compatibility between most static RAM, ROM, or EPROM memories: only a few very specific pins differ from one type to another depending on the capacities and technologies.

For example, it is possible to interchange, on the same support, a EPROM 2716 and a CMOS RAM 6116, both housing 2048 bytes. Obviously, one should not hope to write to the EPROM in 200 nanoseconds with a 5-volt power supply, and it would be very unhealthy to apply 25 V to the 6116, but in reading the two memories are compatible.

During the development phase, we would like the program intended for a microprocessor to be housed in RAM: in case of need for modification, minor or important, no need to erase everything, but simply to overload the incorrect bytes.

The problem then arises of preserving the data in the RAM during its transport between the microprocessor card and the development system on which the program is loaded (typically a microcomputer).

The basic idea is obviously to keep the RAM powered up during these manipulations, since it is when the power supply is interrupted that its contents disappear.

Due to their extremely low power consumption, CMOS RAM memories are well suited to long-term battery power. However, special precautions must be taken to prevent unwanted states from appearing on the control pins during transfers, modifying the stored data!


A "PERMANENT" RAM

Ready-made solutions, and of high quality, exist for this problem which arises daily in the industry; various manufacturers have succeeded in integrating in the same box a CMOS RAM, one or more lithium batteries (known for their longevity), and more or less complex circuits for data protection.

Let us mention the GR. 2716, 2732, and 2764 from GREENWICH INSTRUMENTS and especially the MK 48Z02 from MOSTEK which has the advantage of being available from the resellers supplying our readers.

Figure 1 gives a simplified view (!) of its internal diagram, in which we will notice the presence of two 3 V lithium batteries, whereas only one is theoretically sufficient since a CMOS RAM in "standby" only needs 2 V to keep its contents.

[Figure 1: 48Z02 internal diagram]

Associated with a special circuit choosing the best of the a each moment, these "redundant" batteries allow excellent reliability to be achieved.

It is important to note that the case selection and write enable signals pass through

Radio Plans 500
48


a control circuit that renders them inoperable as soon as the supply voltage is low enough to justify switching to batteries.

Figure 2 reproduces the backup cycle recommended by CATALYST RESEARCH, a well-known American manufacturer of lithium batteries: even before the 5 V has dropped perceptibly, any failure of the main (unregulated) power supply can be detected and used to run a context backup routine on the central unit (this is especially useful in the event of an unforeseen mains power failure).

[Figure 2: RAM voltage vs power events chart]

As soon as the regulated voltage drops to 4.5 V (a value that still allows perfect operation of the memories), it is necessary to block any possibility of access to the data, especially in writing: to do this, the simplest way is to force the CE bar selection pin to a high level.

Finally, when the regulated voltage reaches 2.8 V, it is time to switch the memory to the backup battery, with a nominal voltage of 3 V.

To do this, the electronic diagram of Figure 3, based on precision comparators, is suggested.

[Figure 3: switching circuit diagram]

In our application case, the backup does not need to be automatic: we can allow ourselves to trigger it manually before removing the memory from its support. Although the most comfortable and safest solution remains the MK 48Z02, we can make big savings by combining a 6116 (about four times cheaper) with a 3 V battery on our own.

The proposed solution is detailed in Figure 4: two germanium diodes (with a much lower voltage drop than 1N 4148, for example), provide switching between the +5 V arriving via the support, and a 3 V to 4.5 V battery that will be placed near the memory, or possibly at the end of a small flexible cable.

[Figure 4: simple circuit]

Three resistors ensure that the control inputs are maintained at a high level when the memory is disconnected, but cannot prevent the application of undefined states when unplugging or plugging in, or even in the event of an untimely power cut off of the central unit.

We therefore added a manually controlled "RAM-ROM" inverter: as long as this switch is closed, the write enable line is accessible and it is possible to read or write freely in memory, as in any RAM.

Open the switch, and the memory's write pin is permanently set high: no matter what happens, writing is impossible. Our permanent memory has become a ROM, capable of "emulating" a 2716 in any user assembly!

Continued on page 60.

Radio Plans 500
49


Continued from page 49.

PRACTICAL IMPLEMENTATION

The printed circuit in Figure 5 has been designed with a view to limiting as much as possible the increase in the dimensions of the motherboard by adding the backup circuit; the wiring according to Figure 6 will therefore require care and patience, as well as a very fine soldering iron and 6/10 tin.

[Figure 5: PCB board back]

[Figure 6: PCB board front (component layout)]

All components will be wired on the copper side, with the exception of the two 12-pin breakable strips and the battery. For our model, we
disassembled an RPX 27 mercury battery (for a camera, RAYOVAC brand), and removed two of the interconnected elements it contained: they fit just between the two pin strips, provided that insulating shims are placed to avoid any short-circuits. The contact tabs integral with the elements make their soldering easy.

The two diodes and the three resistors, plus the two wires of the switch, will be soldered in place, then "capped" with the 6116.

A possible improvement consists in mounting it on two other breakable strips, with "tulip" contacts this time: the soldering operations will be easier and we will thus obtain a real "adapter" to place between the 6116 and its support, without soldering.

Another variation consists in wiring all this on a small piece of VEROBOARD board, which lends itself very well to this use.

[image: Veroboard prototypes with slide switches]


IMPLEMENTATION

The 6116 thus equipped (or the commercially available MK 48Z02) can take the place of a 2 Kbyte static RAM in any assembly capable of writing to it, than that of a 2716 in any application.

In particular our "mini-programmer of EPROMS" and the reader which completes it can be used for the debugging of the content: figure 7 shows how to configure the cables of the programmer as well as the reader, while figure 8 provides a programming software "PROGRAM.BAS" for PC compatible, intended to replace "PROGROM.BAS" which, intended for EPROMS, manages the Vpp voltage and the 50 ms timeout which is useless here.

[Figure 7: Cable pinouts and 48Z02 pinouts]

For our part, we used this memory to transfer data from our old ZX 81 to our brand new PC. The 6116 with battery installed in the "memory plane" of the ZX can be written and read at will, then after setting its switch to "ROM", transported to the EPROM reader connected to the PC, to

Radio Plans 500
60


transfer of its contents to a floppy disk ...

Let's finish with Figure 9, which shows the differences between the 6116 and the MK 48Z02: as long as the supply voltage is higher than 4.5 V there are none. On the other hand, the 48Z02 automatically puts itself into backup mode below 4.5 V while the 6116 normally loses its data. Our assembly is fortunately there to remedy this: all you have to do is switch the switch to "ROM" and then cut off the main power supply without a second thought. In the "rest" state, the 6116 consumes extremely little current (we couldn't even measure its value!) and can therefore "live" on its two small batteries for months if necessary. For the MK 48Z02, we are even talking about ten years thanks to its double lithium battery ... In both cases, it is quite sufficient for countless uses!

[Figure 9: diagram of Voltage vs Allowed States (read/write/rest)]


Patrick GUEULLE


[Nomenclature: parts list]

Figure 8

Code: Select all

10 REM ---- PROGRAM ----
20 CLS:OUT 888,0
30 PRINT"CUT POWER SUPPLIES'
40 PRINT"file name & write to RAM on battery ?"
50 INPUT F$:FS=F$+".ROM"
60 OPEN"i",#1,F$
70 DIM M(4096)
80 PRINT: PRINT" ---- READING FILE IN PROGRESS ----"
90 F=0
100 IF EOF(1) THEN 140
110 INPUT#1,M(F)
120 F-F+1
130 GOTO 100
140 CLOSE#1:CLS
150 PRINT"connect a battery-powered RAM"
160 PRINT"at least ";F;" bytes"
170 PRINT"then press ENTER"
180 INPUT Z$
190 PRINT"apply the +5V, then press ENTER"
200 INPUT Z$
210 FOR G=0 TO F-1
220 PRINT G,:D=M(G):PRINT D
230 OUT 888, D
240 OUT 890,1
250 OUT 890,0
260 NEXT G
270 PRINT:PRINT:PRINT:BEEP
280 PRINT"CUT THE +5V then press ENTER"
290 INPUT Z$
300 CLS: PRINT"REMOVE THE BATTERY on RAM":END
310 REM (c) 1989 Patrick GUEULLE
[image: Soldered board with component and batteries installed]

Radio Plans 500
61
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: The "EPROM Emulator" [Kicad]

Post by XavSnap »

Hi David,
More infos on ROM, EPROM and RAM compatibility in "Le Haut Parleur" Numéro 1681 - Juin 1982"

https://www.abandonware-magazines.org/a ... 57&page=13

or

This short PDF:
http://zx81.ordi5.free.fr/brico/LeHautP ... Eproms.pdf

Le Haut Parleur 1681_LesEproms.jpg
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply