Breadboard Computer

Finally I’ve worked out why this thing wasn’t working! It was very much a ghost in the wires. I’ve just spent the better part of three hours wiring up these address lines, data lines, and then the Arduino of course as our logic analyzer.

The kit came with a little package of cool prebent wires, so I used those by default. It seems their sheathing is not quite as thick as some of my friends bulk wire though. It took us quite a while to try this adjustment, but I replaced all of the long wires of the clock with heavier sheathed wire and Voila the CPU and Arduino are now stepping Perfectly. SO it is time to add an EEPROM 😀

Please checkout Ben Eater and his very concise video channel, where I learned these things from and wanted to talk about my experience thereafter.

EEPROM TIME!

So there we go, EEPROM… right?

Haha if you noticed that the address wires are completely covering any oppurtunity to plug the analyzer back in, you get a gold star xD So I spent another 2 hours doing this all over again but with very specific and prestine wiring:

What’s an EEPROM…?

There we go, EEPROM all wired in. So wtf is an EEPROM? Well it’s kind of like our hard drive for our little breadboard, it’s where we’ll store a program to run through the processor. Simple enough you might think. I had to rewatch Bens video at least 6 times before fully comprehending how this interaction was going to work.

The first thing to note is how the EEPROM works; There are 15 address lines, so inherently you can set them to 32,768 positions OR instructions where each instruction can hold 8 bits that are output on the I/O of the EEPROM. So if we set the address pins to all 0’s then the EEPROM will set the I/O pins to match the instruction at 0000 0000 0000 000. That would direct to a string of 8 bits, maybe 1110 1010, which is the command to… do nothing.

But the processor has 16 address lines, one more than the EEPROOM. So what Ben has us do, and what many have done like the Atari, is map half of the address pins to the EEPROM and the other half to… well whatever we want! This is where it gets Interesting…

Confusion

You see the EEPROM has a pin that enables and disables it, basically keeps it from outputting anything on our address lines. Well we can use the extra pin to turn the EEPROM on and off. But the problem is that the pin reads 0 as On. Which is kinda whack, but shouldn’t bother us, right? No it totally does because in order to work out where to start, the processor fetches it’s first starting address from FFFC and FFFD. Which is hexadecimal for 1111-1111-1111-1100 and …-1101, notice that we have 16 bits here. So by default it will turn the EEPROM off while it tries to fetch it’s first address to point to the beginning of our program and it will read… nothing. Okay easy enough, right? We’ll just invert that address pin so that this first address will read correctly and so the EEPROM will just have to be on the opposite side of the address pins. This is simple enough in theory, but in practice this means that when the CPU fetches it’s first address from FFFC and D we will write that address in address 7FFC and 7FFD. Once you have this concept down it’s easy enough to work out, but confusing as heck to grasp at first.

The first instruction Ben had us run was just the No-Op instruction just forever, but strangely enough the first address EAEA pointed to was F2EA, and I thought this was odd so I asked my friend that’s working on the same project and this was his response:

“Mine did that too. I think it’s the wiring. After jiggling things around a bit, it worked.”

Just nerdy knitter things xD

I’m glad I got it worked out though, thanks for listening to my Ted Talk

-funcyChaos