I'm trying to connect my arduino Mega to a Z80A chip taken from an old Amstrad CPC computer.
The final goal is to build a Z80A computer and then don't use the arduino anymore. But for the present time, I only have the Z80A & the arduino, no memory chip nor EEProm programmer nor memory decoder etc. So I thought the arduino could provide the vast majority of inputs or outputs to the Z80A (eg: RESET pin, CLK pin, address bus, data bus, etc). It's only an educational project, I've learned Z80 assembler 30 years ago, and digital electronic 20 years ago but never got the opportunity of trying it for real!
After a few hours - late at night - of trial and error, I still can't make it work. Damn it! My electronic skills being really basic, I suspect them to be the cause. (I'm a software writer, so I don't have too much concern about the 'code writing' part...)
Here are my too concerns:
1/ As the arduino and the Z80A both run on 5V, I thought I could directly connect any pins from the arduino to the Z80A. But the Z80A started to get very hot, so I think there is a problem! I've read somewhere that Z80A worked at something like 5V@90 mA (not sure, I have the exact figure at home) and the Arduino deals 40 mA per I/O pin. I don't see why it would overheat my poor old Z80A... I've tried to add a 100 ohms resistor between the Z80A and the ground, it got cooler but always ended up very hot. Maybe it's its standard temperature, but as it is an old chip and I've had hard times to find it, I'd rather not burn it! I could insert a resistor between each arduino-Z80A connexion, but it's too random and I don't have that many 100 ohms resistors right now!
2/ My second problem is that, when I spy the addresses required by the Z80A, I've got 0, 3, 7, 3, 0, etc... then 15 sometimes... I've just written a program for the arduino to send 0xC3 (JP) when the 0 address is requested, or 0 for any other address, so it will code a JP 0 and forever loop. So I'd expect it to request 0 (fetch JP = 0xC3), 1 (first part of the addess), 2 (second part of the addess => jump back to 0), 0, 1, 2, etc...
The hard part is that, since many of interesting pins of the Z80A are active-low, it's not easy to know if the thing is working or not because I merely get tons of zeros from the pins... ! Which makes me think that... I've only checked the RD pin. I could check the WR pin too, because there's a chance that they are opposite...
If anybody has an idea...