Author Topic: Replacing Z80  (Read 6876 times)

0 Members and 1 Guest are viewing this topic.

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #25 on: January 18, 2019, 02:23:01 pm »
Ok so same result with removed bonus CPU. Dart has been ordered !
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #26 on: January 19, 2019, 06:11:43 am »
Make a free run harness.  Take a 40 pin socket and bend the data lines at 90 degrees outward.  Hardwire a NOP instruction (00h) on the data lines.

Then insert the free run harness into the socket and the CPU into the free run harness.

When powered up the CPU will sit and cycle through all the addresses.  You can then check for address line faults with a dual trace scope Start with A15 and A14.  A14 should be twice the speed of A15, then proceed to A14 & A13

A 16 bit logic analyzer would be easier.  If you have one verify that all addresses between 0 and 65365 appear once and once only.

Also look for solder flux residue anywhere on the board.  If you see any clean it off with isopropyl alcohol and a soft brush.  I've now made 7-8 repairs just by cleaning off flux residue.  At one end of the spectrum an HP34401A DMM and at the other a motion activated LED night light and a TV remote.

The 34401A arrived from eBay completely wonky.  Just random digits on all settings.  I opened it up and found a 1 cm brown spot of flux residue around an LF357 that had been replaced.  I cleaned it off and it has worked flawlessly ever since.  It reads within a few ppm of my other 34401A.


Hey RHB,

Ok so I tried this and this is the result I got. Bent all the Data and address outwards and tied all the Data lines to ground using 1k Resistors.

Data Bus A15 to 11 All had 1 Mhz
Data Bus A10 to A 6 had 1 Mhz
A7 switching between 520 and 1Mhz
A6 = 7.18
A7 = 15.62
Then doubling from then on to A0 @ 500khz

Thanks JBliss
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: Replacing Z80
« Reply #27 on: January 19, 2019, 12:54:06 pm »
Make a free run harness.  Take a 40 pin socket and bend the data lines at 90 degrees outward.  Hardwire a NOP instruction (00h) on the data lines.

Then insert the free run harness into the socket and the CPU into the free run harness.

When powered up the CPU will sit and cycle through all the addresses.  You can then check for address line faults with a dual trace scope Start with A15 and A14.  A14 should be twice the speed of A15, then proceed to A14 & A13

A 16 bit logic analyzer would be easier.  If you have one verify that all addresses between 0 and 65365 appear once and once only.

Also look for solder flux residue anywhere on the board.  If you see any clean it off with isopropyl alcohol and a soft brush.  I've now made 7-8 repairs just by cleaning off flux residue.  At one end of the spectrum an HP34401A DMM and at the other a motion activated LED night light and a TV remote.

The 34401A arrived from eBay completely wonky.  Just random digits on all settings.  I opened it up and found a 1 cm brown spot of flux residue around an LF357 that had been replaced.  I cleaned it off and it has worked flawlessly ever since.  It reads within a few ppm of my other 34401A.


Hey RHB,

Ok so I tried this and this is the result I got. Bent all the Data and address outwards and tied all the Data lines to ground using 1k Resistors.

Data Bus A15 to 11 All had 1 Mhz
Data Bus A10 to A 6 had 1 Mhz
A7 switching between 520 and 1Mhz
A6 = 7.18
A7 = 15.62
Then doubling from then on to A0 @ 500khz

Thanks JBliss

I said to divert D0-D7 only.

With a NOP on the data bus and the address bus disconnected from the board A0 should be the fastest and A15 the slowest.  So it looks to me as if your Z80 is blown.  However, with the address lines disconnected from the board also,  the board may be sending signals to the CPU which alter the behavior.  It might even put the Z80 into an undefined state.

A0-A7 are used to select I/O devices, so something on the board may be asserting  IOREQ.

I've never played at HW level with a Z80 and I made a free run harness for a Vic20 (6502) one time 35 years ago. Strangely in the same week I find myself in 3 conversations about free running a 6800, 6502 and Z80. 

I've attached a few pages from "The Z80 User's Manual"  by Joe Carr most of which is straight from the data sheet.

*Only* the data lines should be disconnected from the CPU.  All the address lines should remain connected to the board.  So only D0-D7 should be bent and grounded.

When the Z80 is reset, it jumps to 0000h and does an instruction fetch.  So with a NOP on the CPU data bus it should then increment the PC to 0001h, 0002h etc until the PC rolls over.  I suggest straightening A0-A15 and testing in the configuration I suggested.  If you still see 1 MHz on the high order bits and the other control pins are set for an instruction fetch the CPU is definitely bad.
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #28 on: January 19, 2019, 01:09:31 pm »
Make a free run harness.  Take a 40 pin socket and bend the data lines at 90 degrees outward.  Hardwire a NOP instruction (00h) on the data lines.

Then insert the free run harness into the socket and the CPU into the free run harness.

When powered up the CPU will sit and cycle through all the addresses.  You can then check for address line faults with a dual trace scope Start with A15 and A14.  A14 should be twice the speed of A15, then proceed to A14 & A13

A 16 bit logic analyzer would be easier.  If you have one verify that all addresses between 0 and 65365 appear once and once only.

Also look for solder flux residue anywhere on the board.  If you see any clean it off with isopropyl alcohol and a soft brush.  I've now made 7-8 repairs just by cleaning off flux residue.  At one end of the spectrum an HP34401A DMM and at the other a motion activated LED night light and a TV remote.

The 34401A arrived from eBay completely wonky.  Just random digits on all settings.  I opened it up and found a 1 cm brown spot of flux residue around an LF357 that had been replaced.  I cleaned it off and it has worked flawlessly ever since.  It reads within a few ppm of my other 34401A.


Hey RHB,

Ok so I tried this and this is the result I got. Bent all the Data and address outwards and tied all the Data lines to ground using 1k Resistors.

Data Bus A15 to 11 All had 1 Mhz
Data Bus A10 to A 6 had 1 Mhz
A7 switching between 520 and 1Mhz
A6 = 7.18
A7 = 15.62
Then doubling from then on to A0 @ 500khz

Thanks JBliss

I said to divert D0-D7 only.

With a NOP on the data bus and the address bus disconnected from the board A0 should be the fastest and A15 the slowest.  So it looks to me as if your Z80 is blown.  However, with the address lines disconnected from the board also,  the board may be sending signals to the CPU which alter the behavior.  It might even put the Z80 into an undefined state.

A0-A7 are used to select I/O devices, so something on the board may be asserting  IOREQ.

I've never played at HW level with a Z80 and I made a free run harness for a Vic20 (6502) one time 35 years ago. Strangely in the same week I find myself in 3 conversations about free running a 6800, 6502 and Z80. 

I've attached a few pages from "The Z80 User's Manual"  by Joe Carr most of which is straight from the data sheet.

*Only* the data lines should be disconnected from the CPU.  All the address lines should remain connected to the board.  So only D0-D7 should be bent and grounded.

When the Z80 is reset, it jumps to 0000h and does an instruction fetch.  So with a NOP on the CPU data bus it should then increment the PC to 0001h, 0002h etc until the PC rolls over.  I suggest straightening A0-A15 and testing in the configuration I suggested.  If you still see 1 MHz on the high order bits and the other control pins are set for an instruction fetch the CPU is definitely bad.



Ahh Ok sorry misunderstood, all good, I shall redo the test with the address lines reconnected
Thanks
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Replacing Z80
« Reply #29 on: January 19, 2019, 01:51:46 pm »
Build a reusable Z80 free run harness that wont damage the CPU or socket, based on a 40 pin turned pin socket.  Crop and file smooth all the data bus pins.  Take a 9 pin 8x 10K SIL resistor array and bend the pins enough to accommodate the remaining +5V pin (11) in the middle of the data pin stubs, bend its common pin up (away from the socket pins) and solder it to the sides of the stubs of the data pins with its body inside the socket footprint and not protruding below the plane of the pin bases, (some surgery to the plastic of the socket may be required).  Jumper the common to the GND pin (29) on the opposite side of the socket using magnet or wirewrap wire.  If necessary, protect the data pin stubs from shorting to the sides of a tall leaf spring socket by filing their outer corners for clearance and applying a strip of Kapton tape, notched to fit round pin 11.

It can also be worth building an adapter that breaks out the Z80 /WAIT signal with enough control lines to let you attach a single step / slow run circuit.   (hint: if you even suspect the original circuit uses /WAIT, stack two turned pin sockets so you can intercept it from the main board and AND it with the /WAIT from your single step/ free run circuit.   The basic single step/ slow run circuit is fairly simple: a 74xx74, a CMOS 555, two switches, a pot with a switch and a few passives.  You can trigger it off a variety of Z80 control signals including /RD, /WR, /M1,  /MREQ and /IORQ depending on the bus cycle you want to debug.  I presented a similar circuit for the NSC800 CPU here: Help! how to make a nsc800 computer? reply #263
To make it Z80 compatible, delete the  '138 decoder, taking /M1 direct from the Z80, and connect  the circuit's /PS output to Z80 /WAIT.

N.B. some multi-byte Z80 instructions have more than one M1 cycle, so stepping may need multiple button pushes, however the address will increment on every push.


Its less useful on Z80 systems that use DRAM as holding the Z80 in a wait state disables DRAM refresh, but it can still be useful to check its actually executing from ROM, or if you trigger it off decoded /CS of particular memory or I/O chips, and add a status LED driven by U2B /Q, its useful to check the memory or I/O device is actually being accessed.
« Last Edit: January 19, 2019, 02:59:32 pm by Ian.M »
 
The following users thanked this post: rhb

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: Replacing Z80
« Reply #30 on: January 19, 2019, 02:46:44 pm »
That's a *much* fancier build than I did.  But it has the virtue of being a durable tool.  The one I built was anything but durable.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Replacing Z80
« Reply #31 on: January 19, 2019, 03:13:39 pm »
Sorry guys!

The NSC800 step / run circuit is *NOT* directly compatible with the Z80 as /WAIT is sampled during the memory or I/O access and extends that cycle, so applying /M1 directly to U2B /CLR prevents it clocking in a '1' to step or slow run.  The fix is to OR the active low /M1 or other control signal from the Z80 with U2B /Q so the  /CLR is removed as soon as its done its job.
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #32 on: January 29, 2019, 12:13:35 pm »
Hi All,

So here is the update I purchased a DART and while I was at it thought I Should grab a new Z80 as well as I am paying for shipping anyway and there cheap. They arrived today. Unfortunately no different, still no response. I have taken some pictures of the two new parts. Attached also are some screen shots of some waveforms. I have only noticed this now but the 4Mhz Clock signal is offset and also pretty far from a Square. Any thoughts 
Cheers
JBLISS
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
SCHEMATIC
« Reply #33 on: January 29, 2019, 12:23:15 pm »
Schematic for REF
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Replacing Z80
« Reply #34 on: January 29, 2019, 02:17:00 pm »
... Two Z80s ;
Z0840006PSC Z80 CPU 2D
Z84C0010PEC Z80 CPU HU

They look both to be Z80s CPU's Would a new Z80 like this be ok to replace them with?
https://au.element14.com/zilog/z84c0008peg/mcu-8bit-z80-8mhz-dip-40/dp/1081890
Cheers
JBLISS
Why would you think a 4MHz Z80 (   
Z8400APS in your photo) can be used to replace  a 6MHz or 10MHz one?

http://www.cpu-world.com/CPUs/Z80/Zilog-Z8400APS.html

Also the 8MHz one linked in your original post probably cant be used to replace the 10MHz one unless its seriously under-clocked.

How are you probing the Z80 clock signal?  What capacitive load is your probe adding?
« Last Edit: January 29, 2019, 02:22:08 pm by Ian.M »
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Replacing Z80
« Reply #35 on: January 29, 2019, 02:27:01 pm »
Whe don't know the history of this broken unit, but the schematics clearly shows a 4MHz clock.

We don't know why it had one 6Mhz NMOS Z80 and one 10MHz CMOS Z80, but no DART. It is also unknown if other parts are broken or replaced with something that shouldn't be there.
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #36 on: January 29, 2019, 02:42:45 pm »
... Two Z80s ;
Z0840006PSC Z80 CPU 2D
Z84C0010PEC Z80 CPU HU

They look both to be Z80s CPU's Would a new Z80 like this be ok to replace them with?
https://au.element14.com/zilog/z84c0008peg/mcu-8bit-z80-8mhz-dip-40/dp/1081890
Cheers
JBLISS
Why would you think a 4MHz Z80 (   
Z8400APS in your photo) can be used to replace  a 6MHz or 10MHz one?

http://www.cpu-world.com/CPUs/Z80/Zilog-Z8400APS.html

Also the 8MHz one linked in your original post probably cant be used to replace the 10MHz one unless its seriously under-clocked.

How are you probing the Z80 clock signal?  What capacitive load is your probe adding?

Hi Ian Thanks for you reply. I used a 4mhz Z80 as that is what is referenced in the schematic. (4MHZ Clock)
scope probes are specified at 85 pf / 18 pf.
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #37 on: January 29, 2019, 02:45:42 pm »
I have thoroughly checked the rest of the board the rest of the IC's are as per the Schematic.
Quote from: glarsson

link=topic=163681.msg2159725#msg2159725 date=1548772021
Whe don't know the history of this broken unit, but the schematics clearly shows a 4MHz clock.

We don't know why it had one 6Mhz NMOS Z80 and one 10MHz CMOS Z80, but no DART. It is also unknown if other parts are broken or replaced with something that shouldn't be there.
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Replacing Z80
« Reply #38 on: January 29, 2019, 02:48:50 pm »
Where did you probe the 4MHz clock? On the crystal or the CLK signal, in the test connector for example?

The original NMOS Z80 was quite picky about its clock and the triangle wave you showed does not look good if it shows the CLK signal.
 
The following users thanked this post: Ian.M

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #39 on: January 29, 2019, 02:51:19 pm »
Where did you probe the 4MHz clock? On the crystal or the CLK signal, in the test connector for example?

The original NMOS Z80 was quite picky about its clock and the triangle wave you showed does not look good if it shows the CLK signal.

Hi glarsson, Thanks for you help. I probed Both at the test point and Pin 6 of the Z80 both signals are the same as the screenshot I have uploaded.
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Replacing Z80
« Reply #40 on: January 29, 2019, 03:03:30 pm »
What is used for IC18? What is actually there, not from the schematics.
R15 should be 330 ohm. Its purpose is to pull up CLK to NMOS levels as the NMOS Z80 does not work with TTL levels. The clock needs to swing from close to 0V to close to 5V.

The clock you show seems to be loaded down by something acting as a capacitor. I would remove everything socketed that is connected to CLK (except IC18) and see if the clock shape changes. Then, if that didn't make a change, follow CLK on the PCB and see what it is actually connected to.
 

Offline JblissTopic starter

  • Regular Contributor
  • *
  • Posts: 205
Re: Replacing Z80
« Reply #41 on: January 29, 2019, 03:06:03 pm »
What is used for IC18? What is actually there, not from the schematics.
R15 should be 330 ohm. Its purpose is to pull up CLK to NMOS levels as the NMOS Z80 does not work with TTL levels. The clock needs to swing from close to 0V to close to 5V.

The clock you show seems to be loaded down by something acting as a capacitor. I would remove everything socketed that is connected to CLK (except IC18) and see if the clock shape changes. Then, if that didn't make a change, follow CLK on the PCB and see what it is actually connected to.

Excellent! great Idea! Shall do tomorrow! its 2AM in Aus  :)
IC 18 is a 74ls04B1
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Replacing Z80
« Reply #42 on: January 29, 2019, 03:25:57 pm »
The 74LS04 is a classic click driver for Z80. I used it for a 7,3728MHz Z80 board in the early eighties. A NMOS Z80B (6MHz) selected to run at higher frequencies. Static RAM, no waitstates, MMU for 1MB address space, fast.

The output of a LS04 should not look like this.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf