TalreyOP•

Hi everyone, I've got something interesting to share today, of my own design. I've been steadily working on my 6502 computer recently, having relented and bought an EEPROM programmer. I've been using a MicroPython board as a debug harness (which I may write about at some point) but eventually, I knew I wanted the computer to be able to stand on its own. I'd seen a few ideas floating around discussing how to select different clock speeds at runtime reliably, and I remembered I had a couple eight-channel multiplexers lying around. So, this crazy idea was born.

​

I just barely managed to fit it all onto one standard breadboard, and it will probably end up going over that anyway if I want to debounce the single-step "properly" the way Ben does, with a 555. It features the 1 MHz oscillator from Ben's 6502 kit, divided by 1,2,4,8, and 16; it also has a 555 RC clock, a button for single-step, and a blank slot tied low (for an external clock like my debug harness).

​

So far, it's working well! I don't have any oscilloscope shots to show of its output right now, because my bench's wall socket is apparently dead (not my fault, I swear, it shares a circuit with another room). The only issue I've seen so far is that the 555 RC clock is non-symmetric despite Falstad telling me it should be good... any suggestions on that front would be appreciated. I think I can run a 'scope off a battery inverter if necessary, hahaha!

​

Anyway, let me know what you think of this clearly overkill solution. I've got it clocking out a nice "hello world" from my 6502 at low speed (555RC), and once I handle the LCD's long delay when homing the cursor I'll see about switching to the high speed (oscillator division) settings.

1
gfoot360•

Nice. Do you do anything to allow clean transitions between clock speeds, without bouncing etc?

Personally I find the best way to even the duty cycle on a 555 bistable oscillator is to feed it through a frequency divider. You can also try feeding its output back in to the input side but I get mixed results from that.

Equally though, having the clock unbalanced shouldn't matter much, so long as each half is long enough.

3
TalreyOP•

The D flip flops and AND gates on the right side handle cleaning duty. They put a 2-cycle dead period whenever the /Write line is pulled down (to set the 373 register that selects a clock source) but that's the price of a stable clock transition.

Yeah, I've actually got the pot feeding back from output to input of the 555, and the sim claims it should be 50% duty, but it isn't. Possibly a result of my component choices (most of it is salvaged or legacy stuff, heh), or there's some other effect I'm unaware of that will require scope probing. I tried using the 555's Discharge line to help, but it mostly made the clock even less balanced. I may have to just use a flip flop as you said. That will push me over a single breadboard though.

2
gfoot360•

Ah yes I didn't look at the diagram before. I think I found in the past that my load was affecting the duty cycle when I did it this way, or the RC circuit was affecting the output level, I don't remember exactly. I'd guess that falstad isn't simulating the internal impedance of the 555 output pin, maybe.

2