Fixing my old ZX Spectrum 48K issue 4A

edited July 2014 in Hardware
Hi Guys,

I trying to fix my old Spectrum 48K.
Looks like my dad used a wrong power supply as the ULA had a bit missing and so did the 7805.
So I replaced them.
As I replaced all elco's

I also replaced the TR4 and TR5 then I had a booting system but no keyboard.
Ordered a new keyboard membrane and installed it but still no reaction to pressing keys.
I just get the white Sinclair copyright screen but keys not working and no click as I push a key.

I measure 5V, -5V -12 and 12V on all lower RAM.


Any ideas ?

Brian
Post edited by Brian on
«1345

Comments

  • edited April 2014
    Do you have a joystick interface that has a Sinclair joystick port (for example a Sinclair Interface 2)? Does a joystick cause any reaction?

    Have you tried shorting between the two keyboard connectors with a piece of wire?

    The ULA is responsible for the keyboard ports, so a faulty ULA can cause this fault. However it is also possible that a RAM fault is causing the CPU to crash due to the machine stack in the top part of RAM becoming corrupted.

    Is this a 48k machine with the "upper" RAM in sockets? If yes, remove this RAM and try again. If the RAM is soldered in, shout out and I will find the link for how to disable it.

    Mark
  • edited April 2014
    1024MAK wrote: »
    Do you have a joystick interface that has a Sinclair joystick port (for example a Sinclair Interface 2)? Does a joystick cause any reaction?

    Have you tried shorting between the two keyboard connectors with a piece of wire?

    The ULA is responsible for the keyboard ports, so a faulty ULA can cause this fault. However it is also possible that a RAM fault is causing the CPU to crash due to the machine stack in the top part of RAM becoming corrupted.

    Is this a 48k machine with the "upper" RAM in sockets? If yes, remove this RAM and try again. If the RAM is soldered in, shout out and I will find the link for how to disable it.

    Mark

    Hi Mark,

    No, the RAM is soldered in.
    But if the cpu crashed would I still get the copyright screen?
  • edited April 2014
    The RAM test that the ROM program does is just to work out where physical RAM finishes. It is not a full memory test.

    Some faults allow the ROM program to decide that the machine has the full 48k of RAM even with a faulty RAM chip (or less likely a logic chip fault).

    The Z80 CPU needs an area in RAM to store return addresses and other temporary data. This area is called the machine stack or just "stack" for short. It is normally at or near the top of RAM, so in a 48k machine, it will be in the "upper" RAM (if it is a 16k machine, the stack will be in the "top" of the "lower" RAM).

    A lot of the initialization code does not need to use the "upper" RAM. So sometimes the ROM program gets as far as the copyright display before the "upper" RAM fault causes the CPU to read incorrect data, and the resulting "frozen" computer.

    If you have a logic probe or an oscilloscope, it may be possible to work out what the Z80 CPU is doing (to a limited extent).

    Mark
  • edited April 2014
    1024MAK wrote: »
    The RAM test that the ROM program does is just to work out where physical RAM finishes. It is not a full memory test.

    Some faults allow the ROM program to decide that the machine has the full 48k of RAM even with a faulty RAM chip (or less likely a logic chip fault).

    The Z80 CPU needs an area in RAM to store return addresses and other temporary data. This area is called the machine stack or just "stack" for short. It is normally at or near the top of RAM, so in a 48k machine, it will be in the "upper" RAM (if it is a 16k machine, the stack will be in the "top" of the "lower" RAM).

    A lot of the initialization code does not need to use the "upper" RAM. So sometimes the ROM program gets as far as the copyright display before the "upper" RAM fault causes the CPU to read incorrect data, and the resulting "frozen" computer.

    If you have a logic probe or an oscilloscope, it may be possible to work out what the Z80 CPU is doing (to a limited extent).

    Mark

    Well I have oscilloscope here. But what should I check ?
    Maybe easier to just disable upper RAM ?
  • edited April 2014
    To disable the "upper" 32k of RAM, take a piece of wire and connect pin 5 on IC23 to +5V. That will disable the "upper" RAM, as the CAS signal won't reach the RAM chips.

    Credit: mcleod_ideafix Link to thread

    'Scope checks
    All taken on pins of the Z80 CPU unless stated.
    13925663042_fd6d004643_o.png
    //NMI (pin 17), /HALT (pin 18 ), /RESET (pin 26), /BUSRQ (pin 25) and /BUSAK (pin 23) should all be high (3V to 5V).
    /MREQ (pin 19) and /RD (pin 21) should be pulsing low.
    If the ULA is correctly producing interrupts, /INT (pin 16) should be pulsing low. If the CPU is responding, and attempting to read the keyboard, or is trying to update the border, or produce sound, then /IORQ (pin 20) should be pulsing low.

    Z80 CPU address lines A0 to A6 (pins 30 to 36) should be changing whether or not the CPU is executing code as it always generates DRAM refresh signals.
    Z80 address lines A7 to A15 (pins 37 to 40 and 1 to 5) will change as the CPU executes code. A14 and A15 are the most interesting as then you can tell if the CPU is accessing ROM or RAM.
    The data bus D0 to D7 (pins 7 to 10 and 12 to 15) should all be changing as the CPU either reads instructions, reads data or writes data.

    Mark
  • edited April 2014
    1024MAK wrote: »
    To disable the "upper" 32k of RAM, take a piece of wire and connect pin 5 on IC23 to +5V. That will disable the "upper" RAM, as the CAS signal won't reach the RAM chips.


    Mark

    Did that.
    Now I get a screen with blinking random blocks even when I remove that wire ?

    Must have messed it up as I did it to IC 25 first (yep stupid me) but replaced that IC, and tried again with IC 23 but still not getting the white copyright screen back.
  • edited April 2014
    1024MAK wrote: »


    'Scope checks
    All taken on pins of the Z80 CPU unless stated.
    13925663042_fd6d004643_o.png
    //NMI (pin 17), /HALT (pin 18 ), /RESET (pin 26), /BUSRQ (pin 25) and /BUSAK (pin 23) should all be high (3V to 5V).
    /MREQ (pin 19) and /RD (pin 21) should be pulsing low.
    If the ULA is correctly producing interrupts, /INT (pin 16) should be pulsing low. If the CPU is responding, and attempting to read the keyboard, or is trying to update the border, or produce sound, then /IORQ (pin 20) should be pulsing low.

    Z80 CPU address lines A0 to A6 (pins 30 to 36) should be changing whether or not the CPU is executing code as it always generates DRAM refresh signals.
    Z80 address lines A7 to A15 (pins 37 to 40 and 1 to 5) will change as the CPU executes code. A14 and A15 are the most interesting as then you can tell if the CPU is accessing ROM or RAM.
    The data bus D0 to D7 (pins 7 to 10 and 12 to 15) should all be changing as the CPU either reads instructions, reads data or writes data.

    Mark[/QUOT

    5 V on Pin 17
    0 V on Pin 18
    5 V on Pin 26
    4 V on Pin 23

    19 Pulsing okay, and so are the others, guess CPU is running then :confused:
    However nothing on Pin 20
  • edited April 2014
    some will argue with me, and they would be right, there are other things you could try first.

    However, go see a forum member, Zorn - get one of his lower RAM modules and fit it. I'm 98% sure your problems will vanish.

    :)
    Oh bugger!<br>
  • edited April 2014
    Brian wrote: »
    Did that.
    Now I get a screen with blinking random blocks even when I remove that wire ?

    Must have messed it up as I did it to IC 25 first (yep stupid me) but replaced that IC, and tried again with IC 23 but still not getting the white copyright screen back.
    Err, it is unlikely that you damaged IC25 as pin 5 on this chip is an input. However, you may have killed one of the address output pins on the Z80 CPU :confused:

    Mark
  • edited April 2014
    Brian wrote: »
    1024MAK wrote: »

    'Scope checks
    All taken on pins of the Z80 CPU unless stated.
    13925663042_fd6d004643_o.png
    //NMI (pin 17), /HALT (pin 18 ), /RESET (pin 26), /BUSRQ (pin 25) and /BUSAK (pin 23) should all be high (3V to 5V).
    /MREQ (pin 19) and /RD (pin 21) should be pulsing low.
    If the ULA is correctly producing interrupts, /INT (pin 16) should be pulsing low. If the CPU is responding, and attempting to read the keyboard, or is trying to update the border, or produce sound, then /IORQ (pin 20) should be pulsing low.

    Z80 CPU address lines A0 to A6 (pins 30 to 36) should be changing whether or not the CPU is executing code as it always generates DRAM refresh signals.
    Z80 address lines A7 to A15 (pins 37 to 40 and 1 to 5) will change as the CPU executes code. A14 and A15 are the most interesting as then you can tell if the CPU is accessing ROM or RAM.
    The data bus D0 to D7 (pins 7 to 10 and 12 to 15) should all be changing as the CPU either reads instructions, reads data or writes data.

    Mark

    5 V on Pin 17
    0 V on Pin 18
    5 V on Pin 26
    4 V on Pin 23

    19 Pulsing okay, and so are the others, guess CPU is running then :confused:
    However nothing on Pin 20

    No, if pin 18 (/HALT) is low, the CPU has stopped (halted). It will still produce outputs on its address pins and will pulse pin /MREQ (pin 19). It will not execute code until it receives an interrupt (/INT on pin 16). This comes from the ULA. So what signal do you get on this pin?

    Mark
  • edited April 2014
    1024MAK wrote: »
    Err, it is unlikely that you damaged IC25 as pin 5 on this chip is an input. However, you may have killed one of the address output pins on the Z80 CPU :confused:

    Mark

    well I can check if it still works or pop in a new cpu then.
    thanks for your help :)

    but what would cause the cpu to Halt ?
  • edited April 2014
    1024MAK wrote: »
    No, if pin 18 (/HALT) is low, the CPU has stopped (halted). It will still produce outputs on its address pins and will pulse pin /MREQ (pin 19). It will not execute code until it receives an interrupt (/INT on pin 16). This comes from the ULA. So what signal do you get on this pin?

    Mark

    A slow pulse on pin 16
  • edited April 2014
    Brian wrote: »
    well I can check if it still works or pop in a new cpu then.
    thanks for your help :)

    but what would cause the cpu to Halt ?
    A HALT instruction. Now there are three HALT instructions in the ROM code, but after start-up, the CPU should not make it to any of the three HALT instructions, as the ROM program should be in a loop waiting for input from the keyboard.

    So either the CPU is reading the wrong memory location(s) due to a fault with the address bus, is getting incorrect data on the data bus, or there is a faulty RAM. Any of these will cause random code to be executed.
    1024MAK wrote: »
    No, if pin 18 (/HALT) is low, the CPU has stopped (halted). It will still produce outputs on its address pins and will pulse pin /MREQ (pin 19). It will not execute code until it receives an interrupt (/INT on pin 16). This comes from the ULA. So what signal do you get on this pin?
    Brian wrote: »
    A slow pulse on pin 16
    This pulse should occur every 50Hz. If this is what you are getting, that part of the ULA is working okay.

    So, is the Z80 socketed?
    ... If yes, have you tried replacing it?
    ... Do you now get to the copyright screen?
    ... If not, what display do you get? What colour is the border?
    ... Is the border the same colour every time you power up the Spectrum?

    If it is not socketed...
    ... What display do you get? What colour is the border?
    ... Is the border the same colour every time you power up the Spectrum?

    Mark
  • edited April 2014
    1024MAK wrote: »
    A HALT instruction. Now there are three HALT instructions in the ROM code, but after start-up, the CPU should not make it to any of the three HALT instructions, as the ROM program should be in a loop waiting for input from the keyboard.

    So either the CPU is reading the wrong memory location(s) due to a fault with the address bus, is getting incorrect data on the data bus, or there is a faulty RAM. Any of these will cause random code to be executed.




    This pulse should occur every 50Hz. If this is what you are getting, that part of the ULA is working okay.

    So, is the Z80 socketed?
    ... If yes, have you tried replacing it?
    ... Do you now get to the copyright screen?
    ... If not, what display do you get? What colour is the border?
    ... Is the border the same colour every time you power up the Spectrum?

    If it is not socketed...
    ... What display do you get? What colour is the border?
    ... Is the border the same colour every time you power up the Spectrum?

    Mark

    It's not socketed yet, need to get the parts first.

    Border is black every time I power it up.

    Thanks for your help.
  • edited April 2014
    The Z80 is not executing the correct instructions. It does look like you will need to replace it. Test the signals on the address pins, I suspect that one will have a bad signal (the one that had +5V forced into it).

    If you are not an expert in desoldering, it is better to cut the pins of the chip near the plastic case with suitable wire cutters. Then you can desolder and remove the individual pins. This reduces the risk of damage to the PCB tracks.

    Of course, fit a 40 pin DIL socket :grin:

    Mark
  • edited April 2014
    1024MAK wrote: »
    The Z80 is not executing the correct instructions. It does look like you will need to replace it. Test the signals on the address pins, I suspect that one will have a bad signal (the one that had +5V forced into it).

    If you are not an expert in desoldering, it is better to cut the pins of the chip near the plastic case with suitable wire cutters. Then you can desolder and remove the individual pins. This reduces the risk of damage to the PCB tracks.

    Of course, fit a 40 pin DIL socket :grin:

    Mark

    Yes think your right I killed the Z80A and of course I will install a socket as it will save me time when I kill the next one :)

    Will a 20 Mhz version of the Z80 work at the lower clock ? ( Z84C0020PEC )
    At 2USD each I can get a few spare then :)
  • edited April 2014
    DEATH wrote: »
    some will argue with me, and they would be right, there are other things you could try first.

    However, go see a forum member, Zorn - get one of his lower RAM modules and fit it. I'm 98% sure your problems will vanish.

    :)

    Thanks, will check that.
  • edited April 2014
    Brian wrote: »
    Yes think your right I killed the Z80A and of course I will install a socket as it will save me time when I kill the next one :)

    Will a 20 Mhz version of the Z80 work at the lower clock ? ( Z84C0020PEC )
    At 2USD each I can get a few spare then :)
    Any Z80 CPU in a DIL package rated at 4MHz or greater should work okay. I don't know however if anyone has tried a 20MHz CMOS type. Only way to know is to try it :-D

    Mark
  • edited April 2014
    1024MAK wrote: »
    Any Z80 CPU in a DIL package rated at 4MHz or greater should work okay. I don't know however if anyone has tried a 20MHz CMOS type. Only way to know is to try it :-D

    Mark

    Well waiting for the parts to arrive I can see that replacing RAM is pretty expensive....

    Other question is why are there 2 diodes and 22uF Cap added to my bord near the speaker ?

    Photo -> http://min.us/i/k41DgQ24j0eu
  • edited April 2014
    That is a modification to the on board power supply section to improve it.

    Some boards were modified in the factory, others were modified when the board was serviced (normally when the board was repaired).

    There are a couple of different ways of doing the modification, so not all pictures of modified boards look the same.

    The modified circuit became standard on later issue boards.

    Mark
  • edited May 2014
    Okay Parts arrived and installed. New CPU is a 0 to 20 Mhz but seems to work.

    Now I get a nice white screen with the Sinclair copyright text on it but still no reaction from the keyboard that has a new membrane installed.

    Also I measure 12 Volts on the collector of TR 7 but when I follow the track on the board back it goes to + side of C 50 ?
    According to drawings it should be 5 Volts.

    Thanks,

    Brian
  • edited May 2014
    Did you try to connect one pin of the left keyboard connector to one of the right keyboard connector - without any keyboard cable plugged in?
    Is there any reaction?

    Ingo.
  • edited May 2014
    ingo wrote: »
    Did you try to connect one pin of the left keyboard connector to one of the right keyboard connector - without any keyboard cable plugged in?
    Is there any reaction?

    Ingo.

    Yes tried this nothing happens.
  • edited May 2014
    At this point I'd be suspecting an upper RAM fault causing the machine to hang.

    Did you try connecting pin 5 of IC23 to +5v as Mark suggested earlier in the thread? (Doing it while the Z80 was dead doesn't count :wink:)

    Note that you only need to do this until the copyright message appears, as the memory test will have completed at that point.

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited May 2014
    balford wrote: »
    At this point I'd be suspecting an upper RAM fault causing the machine to hang.

    Did you try connecting pin 5 of IC23 to +5v as Mark suggested earlier in the thread? (Doing it while the Z80 was dead doesn't count :wink:)

    Note that you only need to do this until the copyright message appears, as the memory test will have completed at that point.

    B

    Hi,

    Yes I just did this (got the right IC this time :grin: )
    No changes still get no keyboard reaction even using a wire to bridge between the 2 connectors.

    Swapped the ULA and tried again. Same as before.

    Also in read some advise on a other thread to check the Voltage on R9 to R16 and yes I get 5V on one side of them and a range of voltages on the other side.
    CPU pin 18 now shows 5 Volts so its running I guess :confused:

    Thanks for all the help again :grin:
  • edited May 2014
    ingo wrote: »
    Did you try to connect one pin of the left keyboard connector to one of the right keyboard connector - without any keyboard cable plugged in?
    Is there any reaction?

    Ingo.

    Tried it , nothing happens.
  • edited May 2014
    Okay, some more resistance tests (all to be done with the Spectrum powered off). Where chip pins are listed, test on the pin of the chip, not the solder joint or socket.

    Test between IC1 (ULA) pin 33 and edge-connector contact 13A (underside of PCB)(/IORQGE also known as /IORQULA).

    Test between IC1 (ULA) pin 33 and IC2 (Z80 CPU) pin 20 (/IORQ).

    Test between IC1 (ULA) pin 33 and IC2 (Z80 CPU) pin 11 (+5V). Do this test twice, swapping the meter leads around after the first test.

    Test between IC1 (ULA) pin 12 and IC2 (Z80 CPU) pin 16 (/INT).

    Mark
  • edited May 2014
    Hi Mark,

    Answers:

    Test between IC1 (ULA) pin 33 and edge-connector contact 13A (underside of PCB)(/IORQGE also known as /IORQULA).
    0.9 ohm

    Test between IC1 (ULA) pin 33 and IC2 (Z80 CPU) pin 20 (/IORQ).
    464 ohm

    Test between IC1 (ULA) pin 33 and IC2 (Z80 CPU) pin 11 (+5V). Do this test twice, swapping the meter leads around after the first test.
    16k63 and 16k72

    Test between IC1 (ULA) pin 12 and IC2 (Z80 CPU) pin 16 (/INT).

    465 ohm
  • edited May 2014
    Hi Brian

    All those resistances are good :wink:

    I'll keep thinking...

    Mark
  • edited May 2014
    1024MAK wrote: »
    Hi Brian

    All those resistances are good :wink:

    I'll keep thinking...

    Mark

    Continued my search seems to me that C 73 is broken.
    If I measure C 72 that's used with X2 I can do a resistance on the capacitor and see the values on the multi meter change.
    However the C 73 is open circuit. (desoldered one side).
Sign In or Register to comment.