Cookies   I display ads to cover the expenses. See the privacy policy for more information. You can keep or reject the ads.

Video thumbnail
In a previous video we built this decimal decoder that takes an 8-bit binary value here and will display
Whatever that value is equal to as a decimal number here either as a two's complement in which case
It's positive or negative or we can switch it to
Be signed or unsigned rather so that it just displays the normal whatever the binary value here is in
In decimal now use this as the output for our computer
We [don't] want the number to be just [hard-coded] like this
We want to have a register that we can write to and whatever values in that register is what gets displayed here
so let's get rid of these and
[this] is kind [of] fun, because how these pins are floating and we can just kind of mess around with it, but
Anyway, I'll [just] connect power and what we want to do is we want to build a register that connects to our [computer's] bus that
We can then store a value in and whatever value is stored in their register is what gets [displayed]
so I'm going to add another breadboard here, but first I'm going to remove the
power strip from the top here
Because we've already got the power strip for this other breadboard and we can just snap this in here now
[we've] built 8-bit registers in Previous videos
and this is an example here of
an 8-bit register for the a registry that we built and we've got the 8-bit bus connected here and
you can see that that bus goes into the 74 LS 173 s and it also comes out through the 74 LS 245 and
In each of the 74 LS 173 stores four bits of Data and so to soar data in this
Register you put whatever value you want to store on the bus that [would] come in here and we go to these inputs
On both of these chips, and then we'd have [our] a in signal which is right here
We take this low because it's an active low signal and then on the next clock pulse because these chips are
Clock Edge triggered on the next clock pulse it would take whatever data is on the bus and store it here
And then we'd be able to see the output here on these leds and of course for an output register
We could just replace these leds with our nice decimal display
And in fact we could build our output register using only the 74 LS 173 s we don't need the 74 LS 245
That's an extra feature so this register has that we don't need and in this case the 74 LS
275 is used so that the data can [be] read the register, and if the 74 loss [245] is enabled using this a output signal
Then that data that's in the register will then be sent out [onto] the bus but for the output register
We really only need Data to come in from the bus and be displayed. We don't really need to take that data
that's already been displayed and put it back on [the] bus so we can do away with this mu for all s 245 and
We could build it with just the [two] 74 LS
173 s instead, but I'm actually going to do something different instead of using two 74 LS
[173] s I'm going to use a 74 LS
273 which has 8 d flip-flops in a single chip and so within [this] single chip you can see there's
8 inputs and 8 outputs, and there's a clock pulse input here
And [there's] also a reset pin over here that just sets everything to 0
But otherwise this just has 8 d flip-flops, so you can see there's 8
8 Flip-flops here each of them has an input, and so these are just the pin numbers here for [each] of those inputs
And then each has an output as well, and then there's a single clock pulse
Which is active on the rising edge, so on the rising edge of the clock pulse?
whatever is on the input goes to the output whether it's high goes high or if it's low it goes low and
[then] there's a master reset which just clears everything to zero [so] just to do something different
I'm going to use this chip instead of building it the same way that we built the other registers
So here's the 74 LS
[273] and of course I'll start by connecting power and ground
So next I'll just hook the outputs of the register up [to] the address line input of our eeprom here
The pin out for the 74 LS
273 is a little bit wacky here. So these outputs are kind of spread around in kind of weird places
But you have to make sure [that] the outputs line up to the appropriate inputs and right order here
and so that's it now so all of the output pins here should be going to the appropriate address lines here, so
Q0 through qk
0 through a [7] address lines here to provide the input for
our display
Now in addition to the inputs and outputs. There's also the clock pulse and the master reset. [I'll] just tie
I'll just tie the master reset [hi] for now, so that it's not active [in] the clock input
I don't want to hook that directly to the [computer] system clock because then
The register would latch in whatever is on the bus every clock pulse, and we don't want to do that
We want to have some control over when it latches in whatever is on the bus
So what I want to do is end the system clock
With some sort of control signal that says whether or not we want to change the output display
So I am actually going to need a second ship
to go with this 273, so I thought I was saving [a] chip by by not using two of the
74 Ls 173 s, but I am going to need a nand gate
[too] to be able to end the clock pulse, and we didn't need [that] with the 74 LS
173 s because we've got the clock input, but then we also have an enable input here or an input enable
I should say but oh well that's fine. It's easy enough to add a nand gate
This is just a 74 Ls 0 8 quad en gate chip, so we'll add that and we'll hook up power and ground for that
so the clock pulse for our
Register we want that to be the output of one of these an gates so we can just use the one that's closest here
The output then to the clock pulse and then the [input]
One of those inputs is going to be a control signal
That will hook up to our control logic later on but for now if it's low
Then that means that this clock pulse will never
Change and so the output will will stay whatever it is and then the other input will be the actual system clock and so then
if this goes high then whenever the system clock pulses then this
Register will read in the content from the bus and the output will [change] so we have this control line that will control whether or
Not we want the output to change so the other input to our and gate [have] got to go up to our
System clock and so I'll connect this here
And if we come up here, you can see the system clock is used in this register here, and I can
Connect that there too to the system clock up here get this led back in place
Until then yeah this system clock will come down and connect to the other input of our end gate
So there we go
We've got our clock coming in we've [got] our control signal coming in and then the output of that goes
into the actual clock input of our 74 LS 273 and so the output
that we're actually displaying over here will only change if the
If this if the output register is enabled and the clock pulse comes
So it's actually about it for the output register
Although of course we need to connect it to our bus
And I think now is as [good] a time as any to actually connect everything to the bus because at this point
We've got pretty much everything done except for the control logic now to make the bus
I'm going to use these power rails that we've pulled out from between these boards as we've connected them together
And so I'm going to take four of these and connect them together because these these actually connect together very nicely like like this
And this will make up our bus because this then gives us eight
Signals that go up and down like this
And we can connect all of the different components of our computer to those same eight signals and actually to go the whole
Height of our computer I'm going to use two [of] these connected together like this, but because we're going to sandwich
The bus in between kind of the two halves of our computer. We do have these little
Connector tabs on the on the one side that I want to get rid of so that everything just kind of fits snugly together
So to get rid [of] those you can just use some
Wire cutters to try to snap them off and they snap off pretty well
So now this should sit together a little bit better. So we'll start by [joining] the two pieces [of] the bus
There we go, and then I'm going to set my bus up so that it lines up at the top
And I'll go ahead and connect the new register that we just built to the bus. So there we go. I think we've got
D0 through D7
Hooked up appropriate to the appropriate places on our register. So that should do do it for our register, but of course
We might as well go ahead and cook everything else up to the bus as well
so just above our output we've got our b register and
our sum and
Our a register and our program counter so I can start hooking these things up to the bus as well
Since the program counter and of course the program counter is only
four bits
So we only need to hook the first four bits up
to our bus
And of course those will go to the the four least significant bits on the right and then the top bits will just all be
Zero so I actually have to tie everything on our bus to ground through through pulldown resistors at some point next
We've got the a register here, and so that's just a full 8-bit
Register that we can hook right to our bus. So there's the a register all eight bits of that hooked up to the bus
We can do the exact same thing with the D register
So that's the B register
So now we've got our a register [and] our b register both hook up to the bus
So I got the a register [and] B register feed into the some register
which is either going to add or subtract the contents of the a and B registers and
That can output its contents to the bus as well
So let's look the some register up to the bus now
So there's the output of the some register or the alu going to the bus as well and the other side of our computer
We can bring that over here and connect that up as well
So [of] course this is our clock up here the next we've got the memory and there's a memory address register
And then of course [the] memory contents, so the memory address register. We can hook that up now first
It looks like I need to move these
Connections from the Haver [adjuster] down just a little bit I've got room so our memory addresses are only four bits
So we only need to hook up the lower four bits of our bus
Because any time we're going to have a memory address on the bus that's going to be between 0 and 15
So we just hooked those up, and that should be it [for] a memory address
Next is the memory content so once we've put an address here
We can either write or read contents from them or you know it's going to be 8 bits
So we need to get these 8 bits here connected to our bus
So it looks like maybe I want to move some of these things up a little bit to make room
[I] had all these jumper wires measured out ahead of time, but I necessarily know where to put them exactly
[okay], so move those up a little bit
And I think that'll give us room to hook up our 8 bits from our memory and there we go
We got it to fit. So that's our memory contents coming onto our bus and
then I
Think the last thing we have is the instruction register
So there's the [instruction] register, so that's all of our registers so far. We've got our output register down here. We've got our a
register B register and
Some output or difference or alu arithmetic logic unit. We've got our program counter up here. Which is just [four] bits
We've got our memory address register. Which is just four bits, and then we've got the contents of our memory and our
Construction register now something else. We need to do is because we have some of these
Registers hooked to our bus only on the lower four bits
We're going to make sure that the top floor bits
Default to zero and actually what I'm going to do is I'm going to tie all of these or pull all of these to ground
with a with a pulldown resistor
so these are just 10k resistors [that] go from ground to each line on the bus and so if none of the
Modules on the computer [our] asserting either a positive or or ground signal onto a bus line then there
They're going to be sort of pulled to ground by default so we should have all zeros on the bus if nothing on the bus
If none of the modules on the bus are actually asserting any any particular value
I'd also like to be [able] to see what value is on the bus
So I hooked up eight leds one to each bus line by bending the leads
Just right so that they they all line up very nicely at the top of the bus
and [I] connected one of the cathodes over to an
adjacent board that I
Put next to it so I could get the cathode lined up so that [it] connects to one of our ground points
then it bent the the rest of the cathodes over in a line and
One by one soldered each of the the cathodes to each other so [that] all the cathodes are soldered together
And I used a little mini grabber to hold everything in place
Which which worked out really nicely because it doesn't have a lot of thermal Mass
So it didn't suck all the heat away when I was trying to solder so the soldering went pretty quickly
And of course trimming off the little bit of each lead as I went and so here's the finished led
indicator [saying] that I can hook up here to
the Bus
so it slides in very nicely right at the top of
The bus, just like that and the cathodes are all connected to ground over here
So I should let us see what values on our bus at any point in time
Now another thing we want to make sure we take care of is connecting power and ground across the board as well
And actually rather than just having that one cross connection for power and ground
I'm going to connect a power down here on the bottom as well
Just to make [sure] we don't have any problems of power distribution on the board
Because you know these bread boards aren't perfect obviously
And you can get a fair amount of resistance if you know let's say power is coming in over here
For it to get all the way around down to here
you know there's a fair amount of resistance and impedance and things that can happen there, so
adding more of these power cross connects and just to make [sure] you're not getting a you know a
Big voltage drop as you as as you're distributing power to the throughout your entire set of bread boards
So we'll go with that for now. We've got a pretty decent power distribution
The other thing I want to do before we power this up and start playing with it is
I just want to make [sure] the clock is also connected across because we've got our clock signal
We've got our clock module up here in the in the top left and we've got the signal getting distributed over here
But well are there's a few pieces that still aren't connected so I'll connect the clock input for the program counter here
To the clock for the a register
Which is already connected down to the b [register] and then on down to the output register?
and then from there, we want to connect it over to the clock module so we'll connect right across and
Over to the clock and this is their clock output up here
and so now that clock signal is getting distributed all the way down the right-hand side of the board and
it's already being distributed here along the left side so it's coming down to our memory address register and then from there down to
This is actually our memory for when we write
And then we just need to connect it down
To the construction register, so we've got our instruction register clock signal here
So we just need to connect that up to the rest of the clock signals and there we [are] so now this clock for [our]
Instruction register is tied [into] the rest of our clock for everything else
So now we've got our clock signal distributed to all of the different modules in the computer that require the clock
As well as our power
So I think the only other thing I'm going to do right now is we've got these sort of empty spaces here
And it seems to make sense to add some additional [breadboards] here
Which is where [our] control logic is going to go eventually you know connect up all the power to each of these
And then we'll add another connection for power
Just down here on the bottom again
Just to make sure we don't have any problems with [power] [distribution] and getting enough power to all of the different parts of the board
And speaking of power let's try connecting power to our computer and see what happens of course we've got everything here, but the control logic
So each of the modules individually should work just fine, and so we see the program counter is counting away here
And we can turn off counter enable and it stops counting
but each [of] the modules we should be able to put its contents onto the bus so the counter has these three bits set so
If we change our counter out
We see those three bits go on the bus. So that looks good
We should also be able to load something from the bus actually what I want to do is let's run this counter
See if I can stop it on one
There we go
Because what I want to do is I want to put a one into the b register
so I've got a one on the bus now from the counter and if I go to my d in signal which is
Somewhere be out. Let's [begin], so
[let's] begin
and if we take that low
Then the B register reads that one from the bus into the b register
and so now I'll take that high so we're not doing that anymore and
Now I don't have to put this one on the register anymore, so the counter out
Turn that off. So now there's nothing on the bus
but if I take the sum
Which is the sum of the a and the b which right now is zero in a plus [one] and b is a one
So I can put that on the bus so I can say some out
Now that one is on the bus and if I read that into the a register, we're going to stop the clock
if I read into the a register, so if I say a in
It's going to take the one from the bus and put it in the a register on the next clock pulse
So [let] me advance the clock
And you see that happens the one goes on in the a register
but now my some register is one plus one and so that's two which is going on the bus and
So if I do another clock pulse, it'll read that into the a [register], and there's a two and if I run the clock
You'll see it's now counting because it's adding the [1] and the b register each time
so now
If we have our output register
Inputting from the bus as well
We should see that count showing up on [our] output [register] and there it is
and if we want we can switch to the two's complement mode for our output and now it's
Counting down to zero and then it should start counting up to 127
And so I'll leave it there for now, but in the next video. We'll take a closer
Look at exactly what's going on here, and what we've built, so far
So that we can better understand what it is exactly [that] the control logic needs to do in order to turn this into a fully
functional programmable computer