开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Z80 CMOS version doesn't like single stepping


 

Hello everyone,? I am new to the breadboard computer hobby and I have purchased several of the old school processors including the Z80 (Z84C0006PEC).? I have set it up on good breadboards with a 555 time for a clock and debounced single step button.? I have decoupling capacitors in place and watch the address and data bus lines via LED's and sometimes an Arduino.? I have built a similar circuit with the 6502 and did not run into this problem.? When I try to stop the clock and single step through instructions, or if I slow the clock down too slow, the Z80 freaks out on me and goes AWOL.? It starts jumping to crazy addresses or stops reading instructions and just flashes the data bus at me.? If I let the clock run at a sufficient frequency then the processor works fine and doesn't run off the rails.? Does anyone have any insight?? My code is as simple as it can be the only instruction is to loop back to the current instruction.? This was a last resort trying to break down to the bare essentials.? Any help would be appreciated!


 

Interesting, I found another same subject about close clock Z80 cmos no likey..



William Stillwell

Board Member & Co-Founder - Byte Amusement Group // Free Play Florida Arcade & Pinball Show a 501c3 organization

Member of MakerFX - a 501c3 organization - Orlando's Premier Maker Space

Volunteer for The Phoenix - a 501c3 Organization - Providing outreach and events for those who are living a sober lifestyle.??

Former Board Member - West Central Florida Group - a 501c3 Organization. - Providing Emergency Communications across?Central Florida.

Former Board Member - Inspiration labs, Inc. a 501c3 organization - Tampa's Premier Maker Space.



On Fri, Oct 14, 2022 at 10:50 AM <kf5upm@...> wrote:
Hello everyone,? I am new to the breadboard computer hobby and I have purchased several of the old school processors including the Z80 (Z84C0006PEC).? I have set it up on good breadboards with a 555 time for a clock and debounced single step button.? I have decoupling capacitors in place and watch the address and data bus lines via LED's and sometimes an Arduino.? I have built a similar circuit with the 6502 and did not run into this problem.? When I try to stop the clock and single step through instructions, or if I slow the clock down too slow, the Z80 freaks out on me and goes AWOL.? It starts jumping to crazy addresses or stops reading instructions and just flashes the data bus at me.? If I let the clock run at a sufficient frequency then the processor works fine and doesn't run off the rails.? Does anyone have any insight?? My code is as simple as it can be the only instruction is to loop back to the current instruction.? This was a last resort trying to break down to the bare essentials.? Any help would be appreciated!


 

开云体育

Check this out:


It says there to NOT leave any inputs unconnected
Make sure that you also connect something to the outputs.

Are you sure that the power is ‘clean’ (no ripples or not a stable 5v voltage?

Love to read more of your experimentations!

Cheers

Robbert TA2/PA3BKL
The dutch guy living (it up) in Istanbul

?XS Max (512Gb)

On 14 Oct 2022, at 18:17, William Stillwell - KI4SWY <ki4swy@...> wrote:

?
Interesting, I found another same subject about close clock Z80 cmos no likey..



William Stillwell

Board Member & Co-Founder - Byte Amusement Group // Free Play Florida Arcade & Pinball Show a 501c3 organization

Member of MakerFX - a 501c3 organization - Orlando's Premier Maker Space

Volunteer for The Phoenix - a 501c3 Organization - Providing outreach and events for those who are living a sober lifestyle.??

Former Board Member - West Central Florida Group - a 501c3 Organization. - Providing Emergency Communications across?Central Florida.

Former Board Member - Inspiration labs, Inc. a 501c3 organization - Tampa's Premier Maker Space.



On Fri, Oct 14, 2022 at 10:50 AM <kf5upm@...> wrote:
Hello everyone,? I am new to the breadboard computer hobby and I have purchased several of the old school processors including the Z80 (Z84C0006PEC).? I have set it up on good breadboards with a 555 time for a clock and debounced single step button.? I have decoupling capacitors in place and watch the address and data bus lines via LED's and sometimes an Arduino.? I have built a similar circuit with the 6502 and did not run into this problem.? When I try to stop the clock and single step through instructions, or if I slow the clock down too slow, the Z80 freaks out on me and goes AWOL.? It starts jumping to crazy addresses or stops reading instructions and just flashes the data bus at me.? If I let the clock run at a sufficient frequency then the processor works fine and doesn't run off the rails.? Does anyone have any insight?? My code is as simple as it can be the only instruction is to loop back to the current instruction.? This was a last resort trying to break down to the bare essentials.? Any help would be appreciated!


 

开云体育

?Hi there.

Interesting experiments!

Here is a quite interesting YT video where the maker interfaces an Arduino in order to test and si gle step the Z80z

Here also says here that the clockpulse should be coning out of a ‘single shot’ pulse generator, in order to ‘please’ the Z80. (my words!!)

Here is the link to that video:


And a other simple Z80 tester:

Check this out:


It says there to NOT leave any inputs unconnected
Make sure that you also connect something to the outputs.

Are you sure that the power is ‘clean’ (no ripples or not a stable 5v voltage?

Love to read more of your experimentations!

Cheers

Robbert TA2/PA3BKL
The dutch guy living (it up) in Istanbul


?XS Max (512Gb)

On 14 Oct 2022, at 17:50, kf5upm@... wrote:

?Hello everyone,? I am new to the breadboard computer hobby and I have purchased several of the old school processors including the Z80 (Z84C0006PEC).? I have set it up on good breadboards with a 555 time for a clock and debounced single step button.? I have decoupling capacitors in place and watch the address and data bus lines via LED's and sometimes an Arduino.? I have built a similar circuit with the 6502 and did not run into this problem.? When I try to stop the clock and single step through instructions, or if I slow the clock down too slow, the Z80 freaks out on me and goes AWOL.? It starts jumping to crazy addresses or stops reading instructions and just flashes the data bus at me.? If I let the clock run at a sufficient frequency then the processor works fine and doesn't run off the rails.? Does anyone have any insight?? My code is as simple as it can be the only instruction is to loop back to the current instruction.? This was a last resort trying to break down to the bare essentials.? Any help would be appreciated!


 

开云体育

Hi there (again)

Found another usefull
Project fir Z80 testing.

Please read the authors comments about ‘tri-state’ port states.




?XS Max (512Gb)

On 14 Oct 2022, at 17:50, kf5upm@... wrote:

?Hello everyone,? I am new to the breadboard computer hobby and I have purchased several of the old school processors including the Z80 (Z84C0006PEC).? I have set it up on good breadboards with a 555 time for a clock and debounced single step button.? I have decoupling capacitors in place and watch the address and data bus lines via LED's and sometimes an Arduino.? I have built a similar circuit with the 6502 and did not run into this problem.? When I try to stop the clock and single step through instructions, or if I slow the clock down too slow, the Z80 freaks out on me and goes AWOL.? It starts jumping to crazy addresses or stops reading instructions and just flashes the data bus at me.? If I let the clock run at a sufficient frequency then the processor works fine and doesn't run off the rails.? Does anyone have any insight?? My code is as simple as it can be the only instruction is to loop back to the current instruction.? This was a last resort trying to break down to the bare essentials.? Any help would be appreciated!


 

Thank you to everyone who has replied.? I moved forward with the circuit just accepting I would not be able to single step the processor, however upon attempting to implement the Z80 PIO chip the IOREQ line has now stopped working completely.? I am now suspicious of the chip and am seeking a replacement.? Once I have the replacement chip and can see if it behaves the same in my breadboard setup I will update you.? Once again thank you for all of the help.


 

Good news, the IOREQ line on my Z80 is functional.? I had two data bus lines that were swapped resulting in the instruction not arriving at the CPU as the OUT instruction.? Now the only issue I'm facing I believe is timing related.? When I first plug the circuit into power, the PIO doesn't appear to be to initialize properly.? The only way I can get it to activate is to bounce the IOREQ line a little until it outputs on port A.? After that I can reset the CPU and the code executes fine.? Any suggestions?



 

Well I may have spoken too soon.? I was testing with the clock frequency low-ish.? I turned it up? to 500kHz and now it works after a reset.? Next I need to create a power on reset circuit.


ajparent1/kb1gmx
 

Take care with reset as it has to be held for a minimum time.
Also when stopping clock I think it has to be stopped with clock high.
?
also are you saying single step as in slingle clock cycle or asserting
/wait after each /M1?
?
?
?
Allison
?