Oh, good. The mistake is an easy one. No hard feelings. And I should have left out the hashtag, that was dumb.
GARTHWILSON wrote:
Zowee those are expensive! Be sure to get the panel ones that are intended for regular use. The DIP switches, although better than some DIP switches, have an electrical life specified in the data sheet as 2,000 detent operations which is only 125 times around the circle. DIP switches are usually intended to set options on a board and then close up the equipment, not keep turning them hundreds of times per session.
I was thinking of the 220ADC16, which has a life of 10,000 steps(625 full turns), now that I look at the data sheet. Is that a good lifespan, or should I see if i can find something better?
GARTHWILSON wrote:
Ok, but know that once you get even short portions of code going, you can do that in software. What you would do there is insert a BRK instruction or a JSR BREAK which does exactly what you're talking about but with simpler hardware. This lets you put the subroutine call exactly where you want it. To get there mechanically, you would have to single-step the program. I've done it when I was debugging a problem that showed up immediately in the reset routine, but if the bug doesn't show up for a few thousand cycles after boot-up, you're pretty much out of luck. Letting it go on the normal clock to start, and then stopping it at the right time to single-cycle it, is hopeless, unless you have hardware that will stop it at a particular address. Even then, it could be in a subroutine that's used thousands of times before the trouble comes up because a different routine called it with different inputs.
True, and thinking about it, I probably won't use it much, if at all. If I find I do need it, I'll do it then, but otherwise, it's looking like a big pain in the backside to integrate.
GARTHWILSON wrote:
Why not use a 74HCTxx 8-bit buffer. Its outputs are strong enough to feed the LEDs, and you won't load the buses. (Do still use series resistors for the LEDs to control the current.) Ah, wait a minute. I just remembered you're not using software to translate raw hex to human-readable segment combinations. What do you plan to do for that? Are the LEDs already made with decoders in them? Or were you going to do that in your drivers?
I was going to use the raw binary data, as it appeared on the bus, fed into one of these:
http://au.mouser.com/ProductDetail/Broadcom-Avago/HDSP-4830-GH000/?qs=sGAEpiMZZMuu2qEGwSNRoA32ppSJvMD%252bVl36svZe8XM%3d.
But again, thinking about it, it would be better to go for a few 7-segment displays. I even have one that I pulled from an old DVD player ages ago that looks like it multiplexes sensibly. If I pair this with an appropriate decoder IC, I can have a far more compact and easy-to read display.
GARTHWILSON wrote:
The switching will have to make sure it's clean and that no pulses are cut shorter than what you need for the chosen speed. For example, if you have slow memory and 1MHz speed, each half cycle is 500ns (give or take), and you wouldn't want it cut off at 130ns just because that's when the switching happened. I'm sure there's a way to do it with flip-flops but it's 3am here and I'm much too tired to figure it out at the moment.
What I thought I'd do was this:
You hit the 'suspend' button, and a flip-flop stores the fact that you pushed it. Then, it waits for the next phase-2 high(maybe by looking for a rising edge), and then holds that line high, in such a way that the clock itself has no say in the matter(Maybe by running it though a gate). Then it pulls down BE and the CPU is stopped.
Then, when the 'run' button is pressed, the flip-flop flops back, the BE line is pulled up, and when the clock is next high, it lets the clock have the line back.
My problem is the BE line, as it needs to switch last on the suspend, but first on the de-suspend. I'm not sure how to do this. I should probably think about it more, but not today, as it's 9 PM here.
EDIT: Or maybe I'll use the one button to toggle stop/run and use a toggle latch instead of a flip-flop.
EDIT 2: I found a circuit in an old textbook that I can modify to avoid chopping clock pulses(It's the bottom one in the picture). Am I being overly picky about the timing of BE? Because it's looking like a pain to get it the way I'm thinking. I can do it, I'm sure, I just haven't found it yet.