Krsultov wrote:
But, Why does this problem occur? I built the computer exactly how Ben did. He didn't have this problem.
Well, no you didn't. That's a hard lesson to learn, but an essential one. (It may be easier to learn if you've worked in software and had to deal with the,
"But I didn't change anything!" cry from a user who really meant, "I didn't
mean to change anything," or from another developer who really meant, "I didn't
mean to change
that!")
The first thing to understand here is that "digital" electronics are still very analogue, and thus are affected by all sorts of environmental factors (the current temperature and humidity in the room, the RF environment around you, grounding considerations), parts variances/tolerances assuming you are using the
exact same part from the
exact same production run, more variances/tolerances if you're using the exact same part from a different production run, and relatively huge differences if you're using different parts, such as a different maker of peripheral chip or breadboard.
This is why you're having problems with your reset circuit here, when the last time I put a 6502 on a breadboard I was using a much worse part (an NMOS CPU of dubious origin that was probably pulled from e-waste), probably a lower quality breadboard, and not even a switch, yet I was getting successful resets by just touching a wire to the reset pin (which had a resistor pulling it high when I wasn't grounding it).
The way all these variances are handled in production of electronic devices is to use careful, very conservative design that takes into account all the things that could cause problems and mitigates them. Sadly, wiring things together on a breadboard is pretty much the opposite of this approach: it's doing things that just invite problems in less-than-perfect environments.
I don't want to discourage you with all of this: nothing that you're experiencing is unfixable and, as you've no doubt seen,
many others have built pretty much this same project and (at least eventually) got it working just fine. But the the particular problems you're seeing here are representative of the kinds of classic problems you'll be seeing when doing any hardware design of this sort, so if you expect that this is a one-off thing, you're in for some disappointment. It's simply not possible to have the same kind of consistency in environment for hardware that one can have in software. (And anybody experienced with software already knows that even there, reproducing fairly consistent environments is a challenge. Huge projects such as NPM, involving tens of thousands of programmer-hours, are devoted just to this.)
Quote:
Is there an easy way to fix the problem without adding any parts? Just rewire something?
Well, adding and changing parts is one of the basic techniques in hardware design, so if you want to avoid that and just want a working board for which you can start writing software, it might make more sense to go with a single-board-computer based on a printed circuit board (which will work much more reliably than a breadboard!) and that uses a more robust design (e.g., has a proper reset circuit).
To get this project working reliably you may have to buy a few more parts, but eventually you'll build up a stash of the more common ones that you'll constantly be using as you twiddle with hardware projects. That's just the nature of rolling your own systems at this level.