Posts

Showing posts from 2020

8-bit CPU: Register and counter

Image
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).

8-bit CPU: Display (part 2)

Image
Earlier I worked on a display module, but could not proceed because I had no means of programming an EEPROM. I had to step aside for a moment and build a device that can do that. Now I have programmer, but what data should I write on the chip? Well, Ben explained the main idea quite carefully in a series of videos, but my build differs a little. One thing is - I did not follow the videos exactly, so I'm fairly certain that I have connected display segments to EEPROM's data output pins differently. In Ben's video there were several wires, connecting pins on different sides of EEPROM and displays. I have just one. Ben mapped every digit on a paper and carefully worked out the byte values for each. I suppose it's fine if you want to show the process in detail. But I have lazier idea - let C compiler and Arduino do it for me. They are much better at performing tedious calculations. I'll just set the rules. For starters, I have to figure out which bit is connected to w...

8-bit CPU: EEPROM burner

Image
In previous post I got to the point where I need to program an EEPROM, but have no device to do that. This time I'll try to build it. Ben had similar side-build as part of his Output register , so this should be a replica of that, right? Well it could have been, but I did not follow his footsteps exactly. First, I do not have Arduino Micro , just an Uno with a half-size breadboard attached to it. So I was planning to use that. I could not source 74HC595 shift registers, so I got 74HC594 instead. As it turned out later, they are so similar, that there actually are no differences for this use-case, but I did not compare them carefully at the beginning. Also, I was not following the video exactly, just got the main idea about shift registers and continued on my own. Placed the chips on the small breadboard, but there was a problem - the breadboard was a little too short. I placed chips end-to-end without any gaps in between, and there was just enough holes to fit all the pins. Unfort...

8-bit CPU: Display (part 1)

Image
In his series , after building the clock module, Ben started to work on registers . Those are important parts of the computer, but feels a little underwhelming again. So I decided to go for output display instead. The module requires a clock for multiplexing its output to four 7-segment displays. The clock should eventually be independent from the main clock and run much faster. But in the meantime other parts of the computer do not exist yet, and I might like to run it really slow. So I just placed the 555 on the board, but did not even bothered to wire it up. I'll just use signal from my freshly finished clock module . I haven't really used it for anything yet! Ben used 74LS76 JK flip-flop to manually build a 2 bit counter. I just went for 74HC163. It's a 4-bit counter, but there's no harm in using only two outputs. Wired counter to inputs of (one side of) 74HC139 2-to-4 demultiplexer - that should allow us to cycle the displays. I was anxious to see if I'm on the...

8-bit CPU: Clock module

Image
The parts are finally here an I can have some fun! Since nothing runs without clock, I decided to start with that module. It's probably not the most fun one, but I definitely need it, before doing something else. I was planning to follow Ben's design to some point. I had some TS555CN timers at home, so I decided to try those first, before opening the package with the new ones I ordered. Wired up the 555 in basic astable configuration with capacitors, potentiometer and decided to test if it works. So I connected a LED to the output and powered it up. It worked. Well, sort of. LED blinked and I  could adjust the frequency, but then suddenly it started to blink very fast, then again back to normal. What's even stranger I could trigger or suppress the effect by touching either chip or capacitor (just top of the chip, not the leads). I did accidentally connect my power backwards on first try 😓, so I figured it caused some damage or something. Replaced the chip with one of my n...

8-bit CPU: Ordering the parts

In order to start building, I need some materials and parts, I have to order those first. In terms of logic chips I decided to go with 74HC* series (Ben used 74LS* in his builds). Why? Well, it looks like it's newer design with lower power consumption, also the list of what's currently is stock looks better. I won't be able to mix the logic families trough, there are some differences on what voltages are considered LOW and HIGH between them.

8-bit CPU: Playing with 7-segment displays

Image
I'm playing around with electronics from time to time, so I already had some parts and tools that might be useful for this project.

8-bit CPU: Intro

The combination of COVID-19 lockdowns and quite unpleasant weather has forced me to spend much more time indoors and online. So, I stumbled on Ben Eater's web site . He builds various interesting things on breadboards , shoots videos of the process and is very good at explaining what he does. I've always wanted to know how a CPU works. I have pretty good idea how higher-level programming languages translates to machine code. Also I knew about logic gates, and that you can combine them together into higher level constructs as latches, adders, counters and whatnot. But it still remained mystery to me how all that works together. After watching the series about building an 8-bit computer , it became much clearer to me. But also I was hooked. Literally couldn't sleep for 2 nights straight, head full of ideas of modifications and experiments. But first I need to build one. I could have ordered a kit , but I'm feeling more like trying to do things on my own, using Ben...