8-bit CPU: Register and counter

I decided to proceed with the "boring" parts - Register A  and Program Counter.

Building a register was completely uneventful. The only difference from Ben's build was that I used 74HC** series of logic chips, and in order to add current limiting resistors for LEDs, had to move them to the right (and add additional 8 wires).

To make things more interesting, I decided to connect the register to Arduino and write a sketch that exercises it, verifying that everything works as expected.


First I added a LED on the left side to indicate that register outputs data to the bus, because something did not work, but later decided to keep it. It gave me an additional idea, that I could move other control signal LEDs to their modules, instead of grouping them into a single big control word. I think it will make it more obvious to follow.

As for Program Counter, I've decided to go with 8-bit counter from the start. This means that it is built using 2 4-bit counter chips. Since I plan to use 32 KiB RAM chip, there's no point to restrict the addressing to 4 bits. I'm sure that will cause some challenges later, but it's Ok - I'm building a computer that is inspired from Ben's design, not a replica.

I could not source 74HC161 chips, so I decided to go with 74HC163 instead. Pinout is identical, the only difference is that this chip has synchronous reset - meaning that reset does not take effect immediately, it requires a clock pulse. Not a big difference, but I suspect I'll have to build more complex reset circuitry when time comes.

Arduino sketch was useful to also test the counter, as it works as a simple register as well. Then I extended it to check the counting capabilities. My plan is to add new testing modes as I go. By the time my 8-bit computer will be done, I should have an Arduino sketch, that can test each and every component of it.

In the end, I could not resist to "wire-up" my modules: Clock, Counter and Display.


Now I have a device, that can count numbers on its own, without help from Arduino. While not very useful, it's a start.

If you look carefully, you may have noticed that my clock module looks quite different from Ben's one. This is yet another version of it. I'll describe it in more detail soon.

Comments

Popular posts from this blog

8 bit CPU: Soldering the boards

8-bit CPU: Clock module

8-bit CPU: Memory