ZX81 memory troubles

Discussions about Sinclair ZX80 and ZX81 Hardware
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

Okay, my fight for zeddies survival continues.

I have found one interesting thing. It appers, that that zx81 i used to test the ram packs and svideo board is a bit strange.
When i turned it on (plug the power connector) it does not always turn on fully.
I have the video board always connected because i cannot see anything w/o it, but i tries both boards and the behaviour is the same.
So, without ram pack after plugging the power (the number are rough):
- 10% of the time it is just white screen
- 5% of the time it is bright white screen then a little dimmer white screen
- 5% of the time it is black screen
- 80% i got normal working zeddy with K cursor

with RAM pack plugged:
- 20% of the time it is just white screen
- 50% of the time it is bright white screen then (after a second) a little dimmer white screen
- 5% of the time it is black screen
- 25% i got normal working zeddy with K cursor

I checked the power supply, It is okay, the caps are fine (i have a cap tester wich measured the capacitance and resistance of caps)

I have not changed the caps on zx81 pcb. Can it be the cause? Or is it back solder/connection somewhere? Tried wiggling things but it does no help at all.

By the way, it appears that one ram is perfectly alive and print peek shown that i have over 15K available. That is when it turns on properly.

So, now i need to solve this startup problem. Any ideas anyone?
Artem
User avatar
1024MAK
Posts: 5119
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX81 memory troubles

Post by 1024MAK »

Maybe the reset circuit...

Check / replace C5 (1uF) and R15 (220k) which form the /RESET circuit to pin 26 of the Z80 MPU.

You can also connect a push to make switch between the junction of C5 / R15 / pin 26 and 0V / ground. Then you can reset your Zeddy without messing with the power plug.

Or maybe a clock circuit fault...

Check good square wave at Z80 pin 6. If not, check ULA clock out put at pin 14.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: ZX81 memory troubles

Post by RetroTechie »

ArtemKuchin wrote:I got it , i got it. Repairing the ram pack is not worth it.
That's not what I said (I think ;) ). Just not using 4116 chips to replace broken 4116's. Or that ZX Spectrum lower RAM circuit from my site. Other DRAMs might work - in that case I'd try a pair of 64K*4 DRAMs, after checking they have a 128-cycle refresh (which is the case for almost all 4464's I ever came across. But make sure). And since you'd probably want to support true Hi-Res capability, you'd need to make sure the DRAMs do the right thing @ refresh time (and also stay refreshed during all software situations!). An SRAM is a much easier starting point, and all signals needed to make it work, can be found inside the RAM pack.
But the thing is one of the zeddies i have is a complete boxed set, even the ramp pack is in an original box. So, this is not the functional repair, it is basically restoration to the original state. So, this zx81 (and only this one) needs an original ram pack any way. SO, i guess i have to repair OR at least simulate ram pack in the original case.
I can dig that... keep that ZX81 itself in as much original state as possible. And tack onto it a RAM pack (16K or ...?) that looks like it's the original thing. Correct? Replacing 4116 chips with the same is not a long-term fix, since even working 4116 chips are all antique now, and likely dead in a few years anyway. As soon as you bring in other type memory chip to repair a RAM pack, that RAM pack is modded anyway. Who cares as long as it does the same thing, and looks original from the outside?

Which brings us back to suggested solution: rip IC's + other circuitry out of a RAM pack (but keep the empty board + connector & housing). Then wire onto it a 32K (or 128K) SRAM + any supporting circuitry as needed / desired. The link you started this thread with, is a good starting point. Would probably become a wire mess of sorts, depending on how smart you place that SRAM, where you pick up signals, and how much logic / other circuitry you add. But in the end: put back in RAM pack casing, and from the outside it would look like any other 16K RAM pack. And one that doesn't make a ZX81's internal power supply sweat or go haywire when you plug it in. :D

In any case, take care that for a RAM pack the /RAMCS signal on ZX81 edge connector should be pulled inactive (+5V, see RAM pack schematic). Otherwise internal and external RAM might be activated at the same time, and possibly conflict with each other. And rip out voltage conversion circuitry - it might cause trouble even if the generated voltages aren't used anymore.
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

I have desoldered C5 and measured it. C=1uF, ESR=11.
Anyway, i replaced.
R15 is 327 Ohm, so, it is fine.
Then i decided to plug the pack again and check the voltages and signals.
I got white screen. I unplugged the packs and when i turned on i saw the noise like this:
http://youtu.be/6cjrjXWOsRI

I turn off and on many many times and all i saw was either the noise (many different kinds of noise with the same short lines and dots)
or white screen. Then after about 5 or 10 minutes when i plugged the power supply IT WORKED, I tried to play with it for about 10 minutes, doing things and turning on and off. Everything works.
Then i decided to replug the ram pack again to make sure it is the cause. Again white screen with the pack. Again noise after the pack was removed. I tried turned the computer off and on like 30 times but still only noise. I guess it is not about turning it on and off and it is about time. I had to go to sleep.
I tried to turn it on in the morning and it is still just noise and noise.

i have no idea what's going on.
Artem
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: ZX81 memory troubles

Post by RetroTechie »

I'd try swapping parts (ULA / Z80 / ROM / RAM) with your other ZX81's to determine which IC's are OK and which are not. What IC's are socketed in this machine?

And forget the RAM pack(s) for now - they don't seem to be helping... :|
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

Okay. The weirdness continues.

So, here is the noise picture (the forum is over quota on attachment btw) and the picture of the clock on CPU.

NOISE
Image

CLOCK
Image

So, by modern standard the clock is bad, but by standards of 80s for home computers it is fine.

So, i tried to turn it on again - the same noise on the screen.
With an o-scope the noise is seen coming from pin 16 of ULA. I see it there, the black dot after the sync peak.
I cannot understand why the picture is rolling. Is it bad sync time from ULA or memory content is rolling. I was stupid enough to NOT measure
the time between syncs when i had a chance (read on).
I switched to switching power supply - all the same.
I looked at the power with my o-scope, the power is fine, 40mV peak to peak, 4.85V average. It is very good.
Then i took ULA from another zx81 and switch it here - NO CHANGE, all the same.
Then i decided the look at all the signals everywhere and measure them. I connected the scope (only the ground connector to the heat sink, not the tip, so i could not affect any capacities), repluged the power supply and all i saw is white screen. No noise. Repeated replugging several time to get the noise and voila, i see the K cursor!
I tried plugging and unplugging power about 10 times - i see a K cursor and everything works perfectly. I tried slightly bending the pcb, moving
components, touching different connections, pulling wires i soldered for svideo board. Only once (after 2 or 3rd replug) it went black by itself (not when i was doing anything) but after replugging the power i again see K cursor and everything works.

I will not plug RAM pack again, because it is the cause of this.

But WTF is this? This is the weirdest electronics glitch i ever saw in my life!

As i see it by now, in general the behaviour pattern is like this (it was repeated every time i plugged a ram pack):
1) I plug ram pack, zx81 does not start (white screen or noise)
2) I unplug the ram pack
3) ZX81 does not work, i see only noise
4) After a while (several minutes to a day) noise stops and i see only white screen
5) then it works again
ZX81 is healing itself from some damage? :shock:
Artem
User avatar
1024MAK
Posts: 5119
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX81 memory troubles

Post by 1024MAK »

It does seem weird :!: :roll:

Given that plugging / unplugging a RAM pack appears to be the cause, but once disconnected, the RAM pack cannot cause any purely electrical effect, I would guess that there is either a poor physical electrical connection somewhere on the board (dry solder joint or poor IC pin to socket connection). Or one of the chips has an internal fault that is somehow disturbed by the act of plugging / unplugging a RAM pack. Or a passive component has a fault (hairline crack maybe).

This problem could be a nightmare to find :evil:

If/when you next get the "noise" on the picture, use your 'scope to check the address and data lines to see if the Z80 is active. Don't forget the Z80 generates refresh addresses on the A0 to A6 address lines.

Also, try the following (if you have not already done so):-
On the RAM pack, measure the resistance of each address, data and control line to 0V / ground.
On the ZX81:-
Carefully inspect the board for poor and / or dry solder joints.
Without removing any chips, confirm the continuity between the relevant chip pin and the destination of each PCB trace (track).
Again,without removing any chips, measure the resistance of each address, data and control line to 0V / ground. Investigate any strange or low values.
Remove and replace each socketed chip.
Replace each socketed chip by swapping with a known working chip. Put the suspect chip in another known working Zeddy, try to recreate the fault on both machines.

Good luck (I think you will need it :mrgreen: )

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
ArtemKuchin
Posts: 41
Joined: Sun Jul 08, 2012 11:53 pm
Location: Moscow, Russia

Re: ZX81 memory troubles

Post by ArtemKuchin »

I tested the rampack for short cicuits - no, all R are very high on all connections. The lowest i saw was about 1.5K between +9 and GND.
I don't know about an IC fault. Well, for example a fault inside an IC is triggered. Then why it does not go away after i turn everything off and wait for a night but then suddenly foes away after some more time?
It seems like i need to plug the pack again to get the noise so i can retest everything again. Poor, poor zeddy.
I have an idea - maybe i should manually discharge all caps. All this seems to me capacitance related. maybe some cap is charged the wrong way and cannot be discharged. That's just "maybe"

But before i'll continue to torture the unlucky machine i want to discuss the noise.

So, as far as i know, SYNC is generated by ULA. I will measure the sync timing, so, i will see two options:
1) Sync are on time

Then it is problem with ULA. As i see the SYNC is internally generated by ULA and the timing depends on the external ceraminc resonator which should be
6.5Mhz. So, i should check it first (F and Vpp). If it is okay, the what else can i check?


2) Sync are out of time, but the screen is rolling

The ULA is generating video fine and it just shows what it gets from the memory. And memory is rotating it contents. Rotation can come from CPU refreshing memory in circles. So, the issue can be related to the on board RAM or CPU or BIOS

CPU can be checked by checking the M1 line (RESET is already checked and it is okay), if it goes up and does then CPU is executing something. HALT can be checked too. Then i can check the address lines one by one but that will not give me much, because i don't know who put the address on the bus and i don't have logic analyzer.

No idea how to check ram.

BIOS also can be a cause. If it somehow cannot be read then CPU will either execute some garbage (that would probably look less regular) or CPU will be stalled and will be waiting for bios to be read.

I think the noise can tell the cause of the problem, we just need to understand it.
Artem
gozzo
Posts: 452
Joined: Fri Jul 08, 2011 8:52 pm

Re: ZX81 memory troubles

Post by gozzo »

Change ALL the chips in one go for known good ones - even if they are soldered directly - you will have to fit sockets! That way you'll know whether its a chip problem or something else on the board itself(unlikely, I would have thought?)!! I've had to do it ,and think I'm going to have to do it again very soon!.. and yes, it's a pain in the derrierre to do, but there's no alternative ! If a new set of chips works OK, then try 'twisting' the board gently just to make sure there are no cracked tracks, and then if still OK, replace the chips with the original 'suspect' ones one at time until the fault pops up, then you'll know which one is the problem! As for the RAMPACK, forget about it until the ZX is fully working on its own. (I have a few duff rampacks myself) :-(
gozzo
Posts: 452
Joined: Fri Jul 08, 2011 8:52 pm

Re: ZX81 memory troubles

Post by gozzo »

As for the 'noise', scope the 5v line, AC coupled, to see if there's any HF ripple - I've had a zener diodes self oscillating and generating RF noise on more than one occasion, and maybe the 7805 could be doing the same...???? And check the clock inverter/buffer transistor that's between the ULA and CPU !
Post Reply