# Difference: CSLogicActivity (6 vs. 7)

#### Revision 72019-04-12 - JimSkon

Line: 1 to 1

 META TOPICPARENT name="IntroToCSS2019"

# Digital Logic Lab - Using CircuitVerse to simulate digital circuits

###### Moodle

In this lab you will learn the how to use digital logic gate to solve a problem.

### Documents

#### Step 1:

Review the CircuitVerse Tutorial Above. Create an account using your Kenyon email address.

### Step 2:

Consider the following block diagram for a seven segment display:

Note that there are 7 inputs to the 7-segment LED display. A one (1) on any input line lights the matching segment. A zero (0) input turns the segment off.

Thus a "4" can be displayed by putting the following values into the 7-Segment LED display inputs:

0 -> a, d, e
1 -> b, c, f, g

Create a test circuit with a 7-segment LED display. and make it display a 4 using this (crude) method.

#### Step 3:

Consider the block diagram of the "BCD to 7 Segment Decoder". This is a circuit that takes binary values from 0 to 9, and sends the right signals to the Display to show the right number.

BCD stands for "Binary Coded Decimal".

Below is a incomplete truth table showing the decimal number, the binary version of the decimal number, ABCD, the corresponding inputs to the decoder, and abcdefg, the outputs needed by the decoder to light the LED correctly. It only shows the proper outputs for an input of 0, and it also shows the column for how each number affects segment e.

 Decimal # Binary A B C D a b c d e f g 0 0000 0 0 0 0 1 1 1 1 1 1 0 1 0001 0 0 0 1 0 2 0010 0 0 1 0 1 3 0011 0 0 1 1 0 4 0100 0 1 0 0 0 5 0101 0 1 0 1 0 6 0110 0 1 1 0 1 7 0111 0 1 1 1 0 8 1000 1 0 0 0 1 9 1001 1 0 0 1 0

### Step 4:

Notice that the 0 inputs turns on all the segments BUT "g", which is the center segment and must be off.

Also look down the "e" column. This shows all the times the "e" segment must be turned on, e.g. for 0, 2, 6, 8 only.

Fill in the rest of the table in your lab report.

Now consider a truth table constructed for only the "e" segment:

 A B C D e 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0
*
Now consider a circuit to implement the truth table above. Look in the table and see that the a segment is "1" in four (4) cases, when ABCD is 0000, 0010, 0110, and 1000. We can thus create 4 small curcuits for each of these cases:

Create a new circuit called "Segment E". These four circuits can be copied in and combined into the new circuit by ORing the results!

New your can start yet another circuit, called BCDto7Segment, and then bring in the previous circuit with the "new subcircuit" command. This brings in the circuit as a box that you can use. This can then be connected to the appropriate segment.

Create and test this circuit.

#### Step 5:

Now make a truth table, and a circuit for each of the other 6 segments. Turn each of these into a template. The inputs should all be connect to the same four inputs. Test out the circuit on all 10 values. Clip the circuit and paste into your Lab Report. Try to keep you circuits orderly and easy to read.

### Step 6:

Save each of your curcuits, and turn in a link to each on moodle.