Z80 won't run - Page 1
Forum section: electronics / general

author: Schwuuuuup
author_rank: Newbie
timestamp: July 30, 2024, 09:34:00 am
content: Hi, I'm a noob (with retro computers as well with this forum) If I'm wrong here with the following question, please direct me where to go.I decided to do an educational project with my trainee at work, where we both learn, how CPUs and Computers work. I'm way ahead of him on the theoretical side, but never did it in practice, so I thought, this might be fun and interesting for us both.We picked the Z80 as a CPU for its easy single-stepability and are at the point where we try to let the CPU run for the first time.So weConnected GND and VCCPulled down all Datapins via 10K to GND (as a NOP-Generator)Pulled up INT, NMI, RESET, WAIT, BUSREQThere is a button to GND for Reset as well. (which works correctly - I checked, the pin at the CPU is HIGH and goes LOW when I press the Reset-Button)We tried to clock it with another Button and tried the 1KHZ test-square-wave of my oscilloscope. (It's 3V so we also tried it using an Inverter, that produced a nice 5V square wave)I expected M1 (or RFSH for that matter) to "do something" but as far as I can tell, they are just floating as if the CPU wasn't even powered on.I have 4 used Z84C0008, for now I could only test 3 of them, but they all behaved the same. Maybe I got ripped off by the seller and got sent only dead ones. But as I am new to this hardware stuff, I really have no clue if I do something stupid.Any clue, what I might do wrong, or a simple failsafe test, if the CPUs are working at all, would be appreciated.

author: glenenglish
author_rank: Frequent Contributor
timestamp: July 30, 2024, 09:44:06 am
content: 1) Clock cannot be not static (NMOS) - it has asynchronous paths2) do you have bypass caps on the device ?3) yes could be a scam.

author: Schwuuuuup
author_rank: Newbie
timestamp: July 30, 2024, 10:16:03 am
content: No bypass caps yet - Thanks I'll try, but I doubt that will help... what I just remembered: I checkt if the CPU draws any power on the power pins... and there was nothing...Will a functional Z80 draw at least some mA when connected to VCC and GND, regardless what else is connected? Than I'm sure the chips are dead.The part about the clock seams strange to me. AFAIK the Z84C0008 has static ram registers and the datasheet states "DC to 8 MHz" for the CMOS version Z84C00 should be CMOS while Z08400 should be NMOS... But I'll verify that I have the correct version

author: fchk
author_rank: Frequent Contributor
timestamp: July 30, 2024, 10:18:59 am
content: Look here for a working system:https://www.ndr-nkc.de/compo/z80/index.htm+ Always put 100nF X7R ceramic between EACH VCC-GND pair using minimal wire/trace length.+ no open CMOS inputs (TTL/NMOS may not be so sentitive)

author: Andy Watson
author_rank: Super Contributor
timestamp: July 30, 2024, 11:35:32 am
content: The CMOS versions are static and can be clocked down to DC. However, the clock does require fast rise and fall times. The datasheet that I have specifies the clock rise and fall times of 10nSmaximum, for the 8MHz part.Other inputs may have similar requirements for correct operation. Have you debounced the reset switch ?Quote from: Schwuuuuup on July 30, 2024, 10:16:03 amThe datasheet quotes a maximum "standby" current of 10\$\mu\$A for a stopped clock (other conditions may apply).

author: pqass
author_rank: Super Contributor
timestamp: July 30, 2024, 12:17:05 pm
content: Seeherefor a Z80 tester.Although, I'd try a faster (>100KHz) clock and move the LEDs to A15,A14,A13.Also, adding a 100nF cap across the reset button will automatically reset the Z80 on power-up.When you graduate from the tester stage, seeGrant Searle minimalist Z80.

author: glenenglish
author_rank: Frequent Contributor
timestamp: July 30, 2024, 10:13:46 pm
content: Quote from: Schwuuuuup on July 30, 2024, 10:16:03 amwhy do you doubt that will help ? WHere are the high instantaneous currents for the CMOS logic going to come from otherwise without glitchingAll logic, especially CMOS logic, must have low inductance power supplies, as they might draw 100x the max average current during internal logic switching from 1 to 0 and 0 to 1 all over the chip.

author: radiolistener
author_rank: Super Contributor
timestamp: July 30, 2024, 10:55:02 pm
content: Using button to simulate clock is not reliable way, because button down/up produces a bunch of pulses with different length.

author: rich t
author_rank: Contributor
timestamp: July 30, 2024, 11:11:08 pm
content: I found this which looked like what you are trying to do, image below.Good for you -- this is the only way to really learn -- there is no substitute for watching an address bus and understanding stack layouts in binary.The next step is to add DMA switches (address and data) and LEDs that can read and write RAM and then let the program rip!You can find some simulators on line at that level as well, though the javascript ones I tried failed the most basic test of 0x3e, 0xaa, 0x76 (many of us still remember op-codes from those days!).

author: pqass
author_rank: Super Contributor
timestamp: July 31, 2024, 02:21:48 am
content: If you're into switch flipping, the project below wins on simplicity, ingenuity, and execution (wait for it until 1:50).It's only a bit more complicated than the tester above but you'll learn a lot and be able to brag about doing sw dev "the hard way"TM.Seeproject overview here.

author: SteveThackery
author_rank: Super Contributor
timestamp: July 31, 2024, 04:31:51 pm
content: Quote from: pqass on July 30, 2024, 12:17:05 pmHey, cool, he has done a minimalist 6809 computer as well! I think the 6809 was the finest 8-bit micro ever made. Some useful 16-bit elements inside, plus a beautiful instruction set which was largely orthogonal and allowed for position-independent code. (Mind you, I never had much use for that.)Oh, and on the subject of religion (because that's what it felt like back then), he has also done one based on the 6502, which I think is the most over-rated 8-bit micro ever.

author: bson
author_rank: Unknown
timestamp: July 31, 2024, 10:01:24 pm
content: You really want a capacitor on the reset so you get a proper reset on power-on. Some might also put a resistor in series with the cap to debounce and reduce the discharge current, although millions of shipped boards out there have worked fine without it.

author: glenenglish
author_rank: Frequent Contributor
timestamp: July 31, 2024, 11:59:07 pm
content: even that can be a poor reset because the rise time is too slow.That circuit is wayyyyyyy too slowSuggest a 1nF cap and 1k resistor.or use a RC one shot monostable cmos ic (4528, 4538 or 74xx123 etc) or a reset ic....

author: bson
author_rank: Unknown
timestamp: August 01, 2024, 07:47:44 am
content: Oh yeah, definitely use sensible values. Like 0.1µF and a 1k resistor.

author: westfw
author_rank: Super Contributor
timestamp: August 01, 2024, 08:39:48 am
content: See also:https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer4 chips, all readily available. No difficult-to-program EPROMs, no rare IO chips.Add an SD card module to simulate floppies, and it runs CP/M. Also runs BASIC and/or Forth from "ROM."Do let us know if you figure out what's going wrong with your current experiments. They do seem worthwhile and educational.

author: Schwuuuuup
author_rank: Newbie
timestamp: August 01, 2024, 02:52:25 pm
content: Hi folks,thanks for all the good advice.I had a colleague check my Z80 and know now that is in deed working.A bypass cap did nothing, as i thought, becaus the was essentially nothing happening on the powerpin.But thanks to you I realized how tight the requirements are for the edges of the clock. 10ns ... the Signalgenerator I was using gave 1000mn from 0 to 5v and 700ns from 0.5-2V ... so way too slow.I followed a guide, in which a 7414 was used, but this was only called "HexInverter" and only was "for debouncing" the fact that it is a Schmitt-Triger inverter was not mentioned and escaped me.I was using a HexInverter as well - mainly to be sure that the clock had a 5V high since my signal generator just gave 3V, so I did not think much about it. Unfortunatly I just had a CD4069 at hand which is much slower.I will go to my parts bin later and see if there is anything resembling a schmitt-trigger later.... and then I will try again next week.Thanks for all the helpful clues

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 01, 2024, 09:09:42 pm
content: Ah yes for the clock you need fast enough edges whatever the frequency is. So yes, if you say control the clock with a pushbutton, you need debouncing and a schmitt trigger.Even if it wasn't your issue, you should still use proper bypassing on the power supply pin(s).