Hello and welcome back.
If you follow the channel, you know that we ran into a snag while trying to repair our
complicated HP 9825 memory controller.
In order to go further, we needed more understanding of what it does, and I decided to simulated
it.
Transcribing it to Verilog seemed error prone and definitely not fun, so I looked for a
graphical way to enter and simulate the schematics.
That’s when I chanced upon Logisim Evolution, and I liked it so much that I thought I would
give you a little intro.
Most of the introductions videos I found are painfully slow and way too basic.
I fell asleep in the middle before I even learned anything.
So for the common good, I decided to make this short tutorial introduction.
So, not to worry, we won't go through this whole complicated schematics, but I'll give
you enough to get you started [so] that you could do it if you wanted to.
So here is Logisim Evolution and you actually want to use the latest.
Not the latest release, but the latest beta.
Because the release was full of bugs.
They corrected most of the ones I found very quickly though.
So it's a little bit intimidating, you don't know where to start.
And what you have to start with is a clock.
So we're going to do the "Hello World" version of Logisim.
Here is a clock and then you have to go into input/output, grab an LED.
There we go.
And we're going to put a wire between the clock and LED.
And try to make it blink.
So you go to simulate, and there you go, we have our blinking LED.
Of course we want to do some basic logic with it.
So let's remove that wire, and put an AND gate, and put the gate here.
Drop our LED.
Here, what we want to add, is a pin.
Here's a pin, and now it's a zero.
And what you want to do to change it, you want to take the finger here and you want
to poke it.
So I'm going to poke it.
And now it's the AND of the clock and the one, so it blinks.
And if I poke it again, it turns into a zero.
So that's how you interact with things and change their levels - that's one of the ways.
But the the first thing I had to do, and I was confused, is: okay, I need to build something,
I need to first generate some signals.
And all I had as an input was the clock.
So that's - the first thing I did was a signal generator.
That's probably the first thing that you'll need too, and it's an interesting circuit.
So I'm just going to build it for you.
So first I needed a counter which unintuitively is in the memory section.
Uh, counter, there we go.
I'm going to put a counter right here next to our clock.
Uh, we're almost correct, it's about here.
So, another thing, is that if you hover over the pins, it tells you what the pin does.
So this is a clock.
So I'm just going to connect my clock.
And here you go, it's starting to count.
I want it to count to 16, so I'm going to drop over here and do "F".
And it's already past 16, so I need to reset it, give it a good reset.
Poke, zero, there we go.
And now it's going to count up to 16.
But it's in binary here, that's not very nice to look at, so let's let's have an LED output.
And you do it exactly as you would do in with TTL: you look at a binary to BCD block, which
is a chip that you would get in TTL.
And it's going to break it into the hundreds, the tenths and the units.
But here you see it complains because my BCD wants three numbers, so it wants nine bits
and I have only eight.
So I'm going to put that to eight.
Now it's happy.
So I can't still see anything over here, because I need to drive a seven segment.
But fortunately right next to it there's a BCD to seven segment thingy, which is also
- that would be a 7447 chip.
And I'm going to put three of those on my three digits, although I really need two digits.
And they're connected.
I still can't see anything because I have to connect my 7447 to some LEDs.
And here they are.
And, actually, I was wondering how many things I would have to draw - I have to draw nothing,
because it fits right in.
So this is obviously made for it.
And here we go, we are counting!
So let's make some interesting signals out of this.
So here we're going to go to...
We need a comparator.
Where would that be?
Arithmetic?
Comparator, here we have one.
So we are going to compare
our input.
Too close, over here.
And we are going to compare it to zero.
So I will this time use a little constant as an input.
Here we go, this one.
And again it complains because this is a binary constant, I need eight bits here.
So I'm going to go down here, put it at eight bits, and put it at zero.
And that thing is going to give us a nice signal when we go to zero.
Here we have it, a little LED.
So when it doesn't come in the right orientation, you have to right click and rotate it so that
the pin is at the bottom.
So our LED should light up when it's zero.
There you go, it did.
And also, let's view the signal on a scope.
Where is the scope?
Input/output extended - there it goes.
There is my scope.
Actually I'll put it a little higher.
So, we'll put it on the scope.
And the scope needs to be triggered by something, and we'll use the clock.
But it's inconvenient to wire it from over here to or to over there, so we'll do a tunnel,
which is all the way at the top.
Tunnel.
So we'll put it here, and we'll rotate it, once is enough, and we'll call it the clock.
Here we go.
And this one, we're going to actually copy and paste it.
Rotate.
Actually I want a little bit more space out here, so I'm going to move this over here,
put my clock, and here we have my scope working!
And it's going to give us this, and actually I'm going to make it a little bit more interesting,
I'm going to put a buzzer
over here.
Rotate, rotate, rotate.
And I'm actually going to change the tone to something I like.
Grab another constant, put it here, wire it up.
And this pin is the frequency pin, and it wants eight - uh, where am I?
This one it wants 14 bits, my goodness!
And we want it at 533.
And now, to generate my other signals, first I'm going to make this a little bit bigger.
Number of states - we want like 20 states.
Okay.
So now it's counting, it's giving me a signal.
And let's say I would like to uh have a signal from step 2 to step 10.
So I'm going to copy this thing,
replicate it once, replicate it twice,
connect it, connect it.
And this, we're going to make
two, and this we are going to make 10.
Ao this is A in hexadecimal.
But it's not going to do exactly what we want, it's going to give us our equal signal.
There you go, we got the two - the zero, the two and the ten.
Zero, two and ten.
But what we want is really a signal that goes from 2 to 10.
So what we need to do, is like, exactly what we would do if we were designing a real circuit.
We need a flip-flop.
So we need a JK flip-flop, which is right here.
And here it goes.
Woohoo, I aligned it perfect!
JK flip-flop.
And it needs to be triggered by our clock.
So you're actually designing exactly as you would [if you were] making a real circuit.
Okay.
So here is our JK flip flop, and now it's going to trigger our signals from step 2 step
10.
So the J is the set, and the K is the reset.
So it gets the pulse at step two to set it to one, and it gets the pulse at step 10 to
set it to zero.
And actually it tells you here if it's a one or a zero.
So, pretty cool, and actually we are going to replicate this thing.
Let's say I want a second one of these.
Let's do this one.
Let's have it start a little later.
Let's do five to ten.
And did it catch it?
Yeah!
So now I have my test signal that starts from two to ten - let's say that's my row signal
- and this is my column signal from 5 to 10.
And then you we can play a little bit more here, we can make it musical.
5333 here we go, and then 1066
All right, and see if that works.
There we go, we have a nice musical signal generator.
But you get the idea, you just build your circuit visually.
And it's tremendous.
it works really well!
Well, we’ll dive into the full simulation in the next episode of the HP 9825 series,
but needless to say, I was able to understand what the convoluted circuit did, which would
have been nearly impossible without this wonderful tool.
And if you want, you can even generate Verilog of your logic, and upload it in an FPGA.
So here it is folks, Logisim Evolution, and for a free tool that is a work of love, originally
intended to teach logic design, it is nothing short of amazing.
I'm sure we’ll put it to good use in the next episodes.
See you soon!