Hey folks!

Here, for a second time, I present a glimpse into one of the facets of my academic life. As an Embedded Systems major, I am taking three decently hard but fun classes this semester: Digital Logic, Digital Signal Processing, and Operating Systems. Since Digital logic is currently my favorite of the three, I am going to show you what one of my recent labs was.

The assignment was to build a circuit that would display the digits of my phone number - simple, right? Not so much. The way it would display them would be by taking as input the numerical position of the digit, in binary, and using a simple seven-segment display (like one digit of your digital watch) to show the number. This is how the input works:
Input Output
0000 => 2
0001 => 0
0010 => 7
0011 => -
0100 => 7
0101 => 5
0110 => 1
0111 => -
1000 => 1
1001 => 0
1010 => 7
1011 => 4
1100 => X
1101 => X
1110 => X
1111 => X

The last four places didn't need to be anything in specific, which made the logic easier to design than otherwise. I won't go into boolean algebra or Karnaugh maps, but suffice it to say, it takes a bit of manipulating to get those numbers to come out.

A little about gates:
Gates are the basic unit of any circuit. They are like dendrites in your brain (i think) - they actually manipulate the ones and zeros running around inside the computer. There are 6 different types of gates: NOT, AND, OR, NAND, NOR, and XOR. I was able to simplify my circuit down to using only two types of gates: NANDs and NOTs.
A NOT gate is the most simple of the gates. it takes a bit (a one or a zero) and "flips" it. If it was a one, it makes it a zero, and vice versa.

The truth table for a NOT gate looks like this:

A NAND gate is slightly more complicated. It takes two or more inputs, and if they all are '1' then it returns a '0', otherwise, it returns a '1'.

The truth table for a two-input NAND gate looks like this:
Input 1
Input 2

Now, before I actually physically built the circuit, I first simulated it in a program that allows you to test your design for errors. This is what the circuit looks like in symbolic representation:

The five dots on the left are the inputs (four binary digits and one that is always '1', for certain reasons). The green symbols are the gates. The triangle with the little circle in front of it is a NOT gate, and the one that looks like a D with a circle in front of it is a NAND gate. You can see the 7-segment display on the right. All the lines are wires that I have to connect.

Now, here are some pictures of the finished circuit. Ivan and I worked on putting this together for about 2 hours or so.

The wires we used

You can see the 7-segment display on the top right

The input switches - we used the first four.
When the switch is down, it inputs a zero,
and when it is up, it inputs a one.

Close-up of circuit

The black things you see in the above picture are chips, each of which contain anywhere from 2 to 6 gates, depending on what type of gate is on the chip. We used NOTs (6 per chip), 2-input NANDs ( 4 per chip) and 4-input NANDs (2 per chip).

Here is a video of me switching through the numbers:

Well, hopefully this didn't bore you too much, I know at least Ivan and probably Joel would like it, maybe more. I had a lot of fun doing this project, and just wanted to share it with you! :)

Have a happy Sabbath, everyone!


Bivan said...

This was definitely the most fun I've had doing any lab so far. Thanks for posting this it might help to explain a little bit of our madness as Embedded Systems majors to the outside world. lol It was a blast working with you on this lab.

ragamuffin child said...

I think my brain is broken just looking at that mess. I suppose I'd rather deal with recalcitrant teenagers than do that! Probably...

Johonn said...

Bivan: I had a great time as well, man. Thanks for working with me! :)
Becky: I think I am glad I am doing this instead of working with recalcitrant teenagers! :)

Kelsey said...

01110111 01101111 01110111. 01101110 01101111 01110100 01100110 01101111 01110010 01101101 01100101 (translation required)

Johonn said...

well, I can translate it to hexidecimal, if you want...
77 6f 77 . 6e 6f 74 66 6f 72 6d 65
or decimal...
119 111 119 . 110 111 116 102 111 114 107 101
or octal...
167 157 167 . 156 157 164 146 157 162 155 145
or unicode...
(I think you meant 'not for me' :)

That's really cool that you could do that...I didn't know you knew about unicode!

Paul said...

I'm basically lost, better you than me.

would you be interested in meeting up at Mount Rogers for a camping trip?
it should be about 3.4 hours from SAU and about the same for me. It's supposed to be rather grand.
Petra and I would be happy to chaperon a mixed gathering if you wanted to gather a gaggle.

Johonn said...

sure, paul, I would definitely be interested, provided it occurs over fall break! :) (fall break is Oct. 18 - 21)
Is mount rogers in VA or TN? I got the general area from a google map, but it appears to be right on the border.

Kelsey said...

Don't be too impressed Jonathan.. Google is amazing. So is copy and paste. You are correct: typo not intended.

Johonn said...

I still think it was cooler than anything anybody else said... :)

Caitlin said...

goodness! I feel all tangled up just looking at that!

Julianne said...

no clue what you just posted, but it looked complex as I scrolled to the comment box.

I am making my rounds of blogs before I rush off to vespers.

good job for staying the most up to date with the blog.


Post a Comment