Clock Runs Computer In Slow-Motion

At the heart of all computers is a clock, a dedicated timepiece ensuring that all of the parts of the computer are synchronized and can work together to execute the instructions that the computer receives. Clock speeds for most modern off-the-shelf computers and smartphones operate around a billion cycles per second, and even clocks that tick at a human-dizzying speed of a million times per second have been around since at least the 1970s. But there’s no reason a computer can’t run at a much slower speed, as [Greg] demonstrates in this video where he slows down a 6502 processor to a single clock cycle per second.

To reduce the clock speed from the megahertz range down to a single hertz or single clock cycle per second, [Greg] is using the pendulum from an actual clock. He attaches a small magnet to the bottom of the pendulum which is counted by a sensor as it swings past. Feeding that pulse into a monostable conditioner yields a clock signal which is usable for one of his 6502-based computers, and at this extremely slow rate, it’s possible to see the operation of a lot of the computers’ inner workings a step at a time. In fact, he optimized the computer’s operation as this slow speed let him see some inefficiencies in the program he was running.

It helps if your processor is static, of course. Older CPUs with dynamic storage for registers and some with limited-range PLLs would not work with this technique. The 8080A, for example, required a clock of at least 500 kHz.

Not only can this computer use a pendulum clock as the basis for its internal clock, but [Greg] also rigged up a mechanism to use a heartbeat. Getting in a little bit of exercise to increase his heart rate first will noticeably increase the computer’s speed. And, if you’re looking to get a deeper glimpse into the inner workings of a computer, we’d recommend looking at one which forgoes transistors in favor of relays.

27 thoughts on “Clock Runs Computer In Slow-Motion

  1. That’s really cool! I really appreciate this unconventional idea. ^^

    Btw, blink LEDs and their ancestors, flashing lights can be used as ~1 Hz clock generators.

    (Those little incandescent lamps with a bimetall. They were used in model making, in doll houses etc. The 3v to 12v types, I mean. Some had the same screw threads as those lamps used in bicycles)

    1. Cool idea! I may revisit this project in the future, if anyone has other unconventional oscillator ideas, I would love to hear them! The craziest idea I’ve heard from the community so far is bone, which I guess is piezoelectric.

      1. For the slowest silly thing, set up something like the pitch drop experiment with an infrared beam that cycles when the drop falls every decade or so. For something more useful, maybe a metallic vibrating reed in an instrument, so the note you play is the speed.

        Or a geiger counter where the clicks cause a cycle, and you have some kind of small sample that can be moved closer or farther away.

      2. I had an Apple ][+ in the early 80s.

        There was a project in one of the magazines ( I forget which one ) called ‘The Apple Throttle ‘

        It used a 555 timer iirc with the game paddles plugged into it.

        One was a delay and one was for number of pulses – which were used to toggle the 6502 RDY line which would slow the processor enough to where you could SEE it drawing individual pixels when aa hi-res graphic was drawn.

        Also useful for slowing down games

  2. Not all 6502 are created equal, [Greg] is probably using a WDC 65C02. NMOS parts use clocked logic and have some limitations. The MOS 6502 has no lower limit on clock cycle duration, but a rather tight spec for high pulse width, while the Rockwell 6502 should not be run slower than 100kHz.

      1. In most parts of the world it is easier and cheaper to pull an ancient Rockwell 65(C)02 from surplus industrial/automotive/military gear than ordering a brand new WDC part from Mouser.

    1. The 555’s output slew rate is too slow for guaranteed reliable operation with WDC’s W65C02S.  A CMOS Schmitt-trigger inverter is usually simpler and something like the 74AC14 has an output that’s plenty fast.  A 74HC14 might have a fast-enough slew rate too.  I’m not sure why anyone still uses a 555.

  3. “Older CPUs with dynamic storage for registers and some with limited-range PLLs would not work with this technique. ”

    Many later Intel CPU’s (386, 486) even had very strict rules about frequency stability. The datasheet demanded that the clock should not deviate more than 2%!

    On the other hand, a 68000 CPU can be clocked by hand. With the aid of a flipflop and two additional gates I could single step my homebrew VME board.

    1. Not all 68k CPUs support a clock frequency down to DC. Motorola and Hitachi don’t, Thomson does. Nearly all NMOS/HMOS CPUs have some “dynamic” stuff inside. Using clocked logic and exploiting the parasitic capacitance of MOSFETs can speed up things and save precious silicon real estate. One notable exception is the NEC µPD780 (Z80), this is a fully static design.

    2. “Many later Intel CPU’s (386, 486) even had very strict rules about frequency stability. The datasheet demanded that the clock should not deviate more than 2%!”

      I recall reading that the am386DX had a static CMOS design, though. It didn’t have minimum frequency and could be halted at will. So maybe this one could be operated at unusual clock signals, at least? 🤷‍♂️

  4. Couple possible applications for these techniques:
    – a hardware step-through debugger where you manually flip the clock and can observe what’s going on everywhere with a logic probe
    – teaching videos, like here’s what happens when I send a single bit into this shift register, look how the LED pattern changes

  5. Well, one good thing would be to see the CPU run in a debugger.
    That’s what happens when I use AppleWin to debug 6502 code.
    I hit the spacebar and the next instruction executes.
    I’ve been messing with the Diversi-Dial program off and on for 40 years just for fun.
    I’m getting a new Ryzen 7950x this week, but I still have a fondness for 6502.
    I wonder if it’s possible to take a 6502 binary and convert it to a higher language like C or something.
    Just some of the random thoughts that go through my head.
    There is a Diversi-Dial clone running at http://www.magviz.ca that does a great job of emulating the
    old software. Another thought, when running a debugger and stepping through code, the computer
    (or in this case emulator) is “frozen in time”. As a certain pointed eared Vulcan would say: “Fascinating”.

  6. An Pulse Is Like An Heartbeat within An Humans Nervous System Which Keeps an Strong Motion Rates per Beats per Second with an Machine Pulses Could Work Perfectly In the Same Way As to Lervage The Movements Clock Speed Within the PC

  7. I am reminded of the venerable DEC PDP-10’s KA10 CPU, which used discrete transistors throughout, . First of all, contrary to most people’s expectations of computers, the CPU did not use a clock for its operation. Instruction execution was driven by 1-shot timers, where each subsystem took an input trigger and produced an output trigger when its operation was completed, to start the next circuit, and when an instruction was completed, would trigger the fetch for the next instruction. Even the magnetic core memory produced a trigger when it completed a read or write operation, allowing the system to used mixed memory types, and always running as fast as it could depending on what memory unit it was getting instructions or data from. The average instruction took somewhere between 1 and 3 microseconds to execute, and naturally, different instructions took different amounts of time.
    But here’s the fun part: the KA10 had a clock module on its maintenance panel that could slow the system down so that instead of free-running at maximum speed, the fetch of a new instruction could be initiated by a clock circuit with a “speed” knob a technician could set to slow it down enough to see what instruction failed, by watching the incandescent bulbs on the operator panel and memory unit panels, or by probing circuits with an oscilloscope while running a test sequence. The hardware manual stated that this could produce triggers to execute instructions at rates from about 1 Hz to 500 kHz, and warned that if you turned it up to its maximum speed, some instructions would not have completed when the next fetch trigger was produced. So yes, you could “overclock” the CPU, but no, you should not expect it work.
    My apologies if I got any or all of the actual numbers wrong – I’ve long since discarded my PDP-10 manuals, so this is all from memory.

    1. Silly me: just because I thew away a book, doesn’t mean it stays thrown away. Here is the hardware manual from 1968 for the KA10 CPU: https://onedrive.live.com/?authkey=%21AD98CjlwRrGRE5E&id=7D567B5161FE0EB7%2136575&cid=7D567B5161FE0EB7&parId=root&parQt=sharedby&o=OneUp. I could not find the page in this edition that mentions the maintenance speed control, BUT, it turns out that the edition from 1982 that covers the KA10, KI10 (upgrade to integrated circuits), KL10 (microprogrammed CPU) and KS10 (not clear to me what got upgraded – after my time), does: https://onedrive.live.com/?authkey=%21AJ3KVP4wCyy5Fm0&id=7D567B5161FE0EB7%2136579&cid=7D567B5161FE0EB7&parId=root&parQt=sharedby&o=OneUp. On its page 455, it shows a picture of the maintenance panel on the KA10. However, this edition also does not contain the admonition against cranking the speed control all the way up. Possibly there was an update that prevented the maintenance clock from generating a start pulse until after a completion pulse has been detected.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.