This video was helpful for me when cross-checking with my own results. As it turns out, BOTH the Z80 chips I have are defective and the outputs are static regardless of what I do. It's always worth spending a little extra and ordering through a reputable distributor like Mouser to get a brand new working chip. When starting out it's difficult to recognize whether you've screwed up or a part is defective.
Can I recommend Ben Eater's series on building an 8 bit computer on breadboards. He has excellent understanding and grasp of the concepts you are trying to get your head around. I found his series most helpful.
That was my holy grail while building my own 8 bit CPU on breadboards, and bugger me, it works! I also bought a Z80 chip a while back, I really should use it for something one of these days.
FYI the Z80 is a 70's CPU. Also you could've just configured the 555 as a monostable to provide a single pulse per button press. Better still you could've used an output pin on the Arduino to provide the clock for the Z80.
I'm using an Arduino Nano instead of an EEPROM for my Z80 project. Problem I had had is, the Arduino is not a tri-state device. The digital pins behave OK input mode, but the analog pins still draw too much current in input mode and therefore kept pulling my data bus down. I found a 74LS245 bus transceiver didnt work satisfactory, but 74ls241 buffer does enable me to bridge the Arduino Nano to the data bus. Bonus for using the Arduino Nano is, My "ROM" emulator code can also disassemble on the fly, which has been amazing for debugging (helped by M1 signal) This is limited to 512 bytes of address space for Z80 code on the Arduino, but my Z80 assembly coding is pretty awful and I havent written a program that big yet lol
Very interesting. Personally I'm more a computer/software person than an electronics person. So perhaps a stupid question, but how do you make the button to give only one short pulse? That seems useful for lots of projects.
That is a really good question. You can do it in software by effectively sampling the button over a few milliseconds, or you can make a small circuit using a few different techniques. What I did was search for things like “Arduino button debounce”.
@@ncot_tech Thanks for your reply. I know of the software debounce technique with Arduino but I find it unsatisfactory. Debouncing is a hardware problem that (imho) should be addressed in hardware. I know of RC filters, and personally with Arduino projects I sometimes use optocouplers since I found they also work. Doesn't answer the question though of how to generate only a single pulse of fixed duration after each (long or short) button press.
@@olavl8827 Ben Eater does a very detailed description of a simple circuit using a 555 chip in monostable mode, which does what I think you are asking for. th-cam.com/video/81BgFhm2vz8/w-d-xo.html
@@olavl8827 I think the answer to your question is part of Ben Eater's breadboard computer series here on YT. It's fairly early, and he too uses a 555 timer.
Great video. I'm getting ready to do exactly the same thing. Does anyone know if they've come up with an RC2014/MEGA card, that just let's the MEGA plug directly onto a RC2014 bus?
3:20 "which is not really what the cpu wants to see" actually it doesn't usually care at all, i've clocked a 6MHz Z80 with a 1-statechange-per-minute clock just for the lulz and it worked just fine :P
I have a simple question. From where the Z80 fetches the instructions? From what I see, there is no memory and the DATA pins are inputs in the Arduino.
Nice going, James! Have you watched Julian Ilett's TH-cam channel on the Z80? Your videos are inspiring me to build a Z80 machine. I'm just trying to recall what the bootup sequence of the Z80 is? i.e does it fetch an address from a particular location and jump to there?
Perhaps I'm getting confused with the 6502 - (I should have paid more attention to you single-stepping the Z80) - I can see the address bus starting at 0x0000. I'm slightly confused by the opcode/address debug output. It seems you were initially presented with the instruction 'load hl,0000', and then your upper 8 bits of your address bus suddenly flips.
Yes, I watch Julian's channel (and his side channel where he's building a shed in the exact way an engineer would build one 😁). The Z80 looks for code at address zero. I wouldn't look too closely at the output from my Arduino debugger thing, I'm not sure it was working properly. All it was doing was spitting out whatever went across the busses so some of the data was probably coming from other chips and possibly not during the fetch cycle of the CPU.
@@johnwilson3918 IIRC the Z80 reset vector is location 0x0, this is usually a jump instruction. There are several RST (reset) instructions which are located in the lowest part of the memory.
Also dont forget your stepping the clock, an instruction can take some cycles to read, then the data maybe (unless a instruction is just a jump or halt) and the data could be anything and the z80 would ignore whats happening. Funny to see the databus being equal for like 3 clk pulses, probably has to do with these cycles.
Bonjour, Très intéressant , mais je pense que ton interruption doit être sur le signal BAS (O volt) sur le MREQ donc FALLING et non RISING. Superbe explication , encore Merci :-)
Now I am confused, I have always thought that the Arduino was on something like 3,6 Volts logic and I know the Z80 that this pinnacle of technology is working on a powerful 5 Volts. What is happening here?
This video was helpful for me when cross-checking with my own results. As it turns out, BOTH the Z80 chips I have are defective and the outputs are static regardless of what I do. It's always worth spending a little extra and ordering through a reputable distributor like Mouser to get a brand new working chip. When starting out it's difficult to recognize whether you've screwed up or a part is defective.
Can I recommend Ben Eater's series on building an 8 bit computer on breadboards. He has excellent understanding and grasp of the concepts you are trying to get your head around. I found his series most helpful.
That was my holy grail while building my own 8 bit CPU on breadboards, and bugger me, it works!
I also bought a Z80 chip a while back, I really should use it for something one of these days.
Great video. Also inspired by Ben Eater's videos I bought the same kit.
Very nice. Expert editing with windowed scope displays and code displays. I like how all the hardware diagrams are using NCOT branding :)
FYI the Z80 is a 70's CPU. Also you could've just configured the 555 as a monostable to provide a single pulse per button press. Better still you could've used an output pin on the Arduino to provide the clock for the Z80.
Excelente video , me inspira a realizar el montaje arduino Z80 , gracias por compartir !!!
What’s the music @5:15??
Very interesting. Did you make any othe videos on this?
Is there a second part to this yet?
Found the music that's @5:15! Jincheng Zhang - Consider Together 🤍🎶
th-cam.com/video/rJ3hX1qx6L8/w-d-xo.html
I'm using an Arduino Nano instead of an EEPROM for my Z80 project. Problem I had had is, the Arduino is not a tri-state device. The digital pins behave OK input mode, but the analog pins still draw too much current in input mode and therefore kept pulling my data bus down. I found a 74LS245 bus transceiver didnt work satisfactory, but 74ls241 buffer does enable me to bridge the Arduino Nano to the data bus.
Bonus for using the Arduino Nano is, My "ROM" emulator code can also disassemble on the fly, which has been amazing for debugging (helped by M1 signal)
This is limited to 512 bytes of address space for Z80 code on the Arduino, but my Z80 assembly coding is pretty awful and I havent written a program that big yet lol
What was the problem you encountered with the 74LS245 bus transceiver?
of course the nano has tri-state io pins - just configure a pin as input
Very interesting. Personally I'm more a computer/software person than an electronics person. So perhaps a stupid question, but how do you make the button to give only one short pulse? That seems useful for lots of projects.
That is a really good question. You can do it in software by effectively sampling the button over a few milliseconds, or you can make a small circuit using a few different techniques.
What I did was search for things like “Arduino button debounce”.
@@ncot_tech Thanks for your reply. I know of the software debounce technique with Arduino but I find it unsatisfactory. Debouncing is a hardware problem that (imho) should be addressed in hardware. I know of RC filters, and personally with Arduino projects I sometimes use optocouplers since I found they also work. Doesn't answer the question though of how to generate only a single pulse of fixed duration after each (long or short) button press.
@@olavl8827 Ben Eater does a very detailed description of a simple circuit using a 555 chip in monostable mode, which does what I think you are asking for.
th-cam.com/video/81BgFhm2vz8/w-d-xo.html
@@olavl8827 I think the answer to your question is part of Ben Eater's breadboard computer series here on YT. It's fairly early, and he too uses a 555 timer.
Great video. I'm getting ready to do exactly the same thing. Does anyone know if they've come up with an RC2014/MEGA card,
that just let's the MEGA plug directly onto a RC2014 bus?
Great Tutorial , can you share your single step circuit and code please
3:20 "which is not really what the cpu wants to see" actually it doesn't usually care at all, i've clocked a 6MHz Z80 with a 1-statechange-per-minute clock just for the lulz and it worked just fine :P
Faggin made a good job!
I have a simple question. From where the Z80 fetches the instructions? From what I see, there is no memory and the DATA pins are inputs in the Arduino.
There are no instructions, I think I’d wired the CPU up to execute nop instructions using a bunch of resistors.
Did you ever update this to use RD, WR and MREQ?
I'm looking to use the arduino to check out a Z80 system to see what is happening.
Nice going, James! Have you watched Julian Ilett's TH-cam channel on the Z80? Your videos are inspiring me to build a Z80 machine. I'm just trying to recall what the bootup sequence of the Z80 is? i.e does it fetch an address from a particular location and jump to there?
I'm now looking through the Z80 chip doc - to see if I can answer my own question.
Perhaps I'm getting confused with the 6502 - (I should have paid more attention to you single-stepping the Z80) - I can see the address bus starting at 0x0000. I'm slightly confused by the opcode/address debug output. It seems you were initially presented with the instruction 'load hl,0000', and then your upper 8 bits of your address bus suddenly flips.
Yes, I watch Julian's channel (and his side channel where he's building a shed in the exact way an engineer would build one 😁).
The Z80 looks for code at address zero. I wouldn't look too closely at the output from my Arduino debugger thing, I'm not sure it was working properly. All it was doing was spitting out whatever went across the busses so some of the data was probably coming from other chips and possibly not during the fetch cycle of the CPU.
@@johnwilson3918 IIRC the Z80 reset vector is location 0x0, this is usually a jump instruction. There are several RST (reset) instructions which are located in the lowest part of the memory.
Also dont forget your stepping the clock, an instruction can take some cycles to read, then the data maybe (unless a instruction is just a jump or halt) and the data could be anything and the z80 would ignore whats happening. Funny to see the databus being equal for like 3 clk pulses, probably has to do with these cycles.
Bonjour, Très intéressant , mais je pense que ton interruption doit être sur le signal BAS (O volt) sur le MREQ donc FALLING et non RISING.
Superbe explication , encore Merci :-)
Now I am confused, I have always thought that the Arduino was on something like 3,6 Volts logic and I know the Z80 that this pinnacle of technology is working on a powerful 5 Volts. What is happening here?
No the Arduino is 5v too. I think the Pi and a few others are 3.3v the ESP 8266 definitely is.
I like the ♬ smiles
What arduino model is that board?
It's a clone of the Mega 2560.
@@ncot_tech ok thanks!
raising clock boom! better read down clock same data is there and settled down lol