Sometimes, when the power is first switched on, the memory is blank
If the three bytes at 0x0082 are not equal to 0x47, 0x4D, 0x44 then the startup routine considers the SRAM to be corrupt and blanks it, a useful safety measure. Somehow, the SRAM is being corrupted at switch-on (or switch-off).
The Microlab is very sensitive to noise on it's supply rails. If the power is switched through a normal toggle switch, the contact bounce can very easily cause the memory to be corrupted. My next attempt was to supply power to the microlab through a relay that was switched on 1 second after the PSU was turned on. The relay helped quite a lot but there were still problems. Next I used a transistor to switch the power on after a 1 second delay, this way the power was switched instantly and cleanly. This helped even more but, every so often, I would switch on and find the memory was blank.
There are two possible causes for this problem. The reset circuit and the SRAM backup circuit.

A standard reset circuit, C21 charges slowly through R7 when power is applied, preventing the CPU from running until the PSU has stabilized. When the power is switched off C21 discharges through D1. Consider the switching thresholds for Schmitt triggers, they turn on at 1.8V and off at 0.8V. Reset will be applied until the voltage across C21 hits 1.8V at switch-on and again when the supply voltage drops to 0.2V (Diode drop of D1) at switch off. If the rise and fall time of the PSU is quite slow (say, from large capacitors on the output) then the CPU could be running while it's supply voltage is way out of spec, this can cause faults like random memory writes.

There is a jumper that selects whether the SRAM gets its power from the +5V rail (thus getting erased at switch-off) or from the backup battery. Changing the position of the jumper, even with the power on, may lead to loss of data. With no jumper, as soon as C28 discharges, the SRAM will lose it's contents.
With the jumper in the battery position the SRAM is supplied through D10 and R21, this causes it's supply voltage to drop to around 4V and to change whenever the SRAM is accessed. This hasn't seemed to have caused a problem yet, but it is a concern.
There are several ICs available called something like "Microprocessor Supervisory Circuits". These ICs will automatically switch the SRAM power from the main supply to the backup battery and will ensure that the CPU is reset whenever the supply voltage is below a set threshold. They will also ensure a minimum width for the reset pulse.
I used a MAX703, from MAXIM. This IC will reset the CPU whenever the supply voltage is below 4.65V and ensure a 200ms reset pulse width. The figure below shows it's pinout and a typical application. I didn't use the PFO output, this will signal the CPU when the supply voltage starts to drop but requires software support.

| Pin 1 | Connect to the center pin of the BATT/5V jumper. This goes to Vcc of the SRAM. Remove the jumper, connecting it to either BATT or 5V will defeat the purpose of the MAX703. |
| Pin 2 | Connects to 5V. Use the left pin of the jumper or the diode slightly above it. |
| Pins 3 & 4 | Connect to 0V. The Negative lead of the NiCd battery is in a perfect place for this. |
| Pin 6 | Master Reset input. Connect to the reset switch. |
| Pin 7 | Reset output. Connect to pin 5 of IC14. Pins 6 and 7 effectively bridge the track that was cut. |
| Pin 8 | Battery input. Connect to the positive side of the NiCd Battery. |
That's it! Check the soldering and switch on the power.
If you need any more information about anything on this page or have any suggestions just EMail me at dave@lassie.demon.co.uk