Ultra slow clock for debugging

Back in the heyday of the Z80 we would occasionally need to single-step the chip to chase odd bugs. After booting at a normal speed, the clock would then be switched-over to a bounceless pushbutton or a (very slow) oscillator. As long as the RAM was static RAM, this worked fine. The chip didnt care.

Can this same strategy be used on the Prop1 (assuming we dont care about upsetting any timing-critical external components and we use a direct/non-pll clock mode)? I know the Prop1 works fine at 32khz, but will the internals hold-up to very long pauses between clock pulses? What about the Prop2?

Comments

  • Yep, I'd clock those kinds of chips from another board which could access the address/data over a 40-pin test clip and display a trace and registers etc. But, you know, the P1, ain't got no external address/data bus of any kind so the absolute best you could do with a slow clock is to see what happens on the I/O but that wouldn't normally be of any help.

    Yes, you can clock the P1 as slow as you like.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Yes a completely stopped clock is no problem to both Prop1 and Prop2. CMOS fabrications are static by nature.
    We have the vastness of the internet and yet billions of people decided to spend most of their time within a horribly designed, fake-news emporium of a website that sucks every possible piece of personal information out of you so it can sell it to others. And they see nothing wrong with that.
  • So, how would one wire this? Would the push button sold by Parallax work?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • Many thanks Peter and Evan! I was hoping to use this trick on the Prop.

    Cronk: here is what I’m doing. YMMV. Make yourself a bounceless pushbutton (BPB) circuit and wire it to the Prop clock_in pin via a couple of gates. What you want is basically a data selector circuit that allows switching between the “fast” external clock and the “slow” BPB clock using a single input as control. Tie the control line to any free Prop pin. At boot time the Prop deasserts the pin output and the “data selector” logic routes the fast external clock to the Props clock_in. When you hit the part of your code where you need to slow the clock, assert the pin. Now the “data selector” switches to feed the BPB input to the Props clock_in and you can single-step it. When you exit the function where the slow clock is needed, simply deasserting the pin puts the Prop back up to full-speed.
Sign In or Register to comment.