This first laboratory assignment will get you familiar with the prototyping board you will be using the entire quarter. Your goal will be to realize the Boolean expression you derived for the “jack of diamonds” using simple Boolean logic gates included in your laboratory kit. By the end of this lab you should know how to construct and verify the operation of a small circuit (3-6 logic gates) using switches and LEDs as I/O devices.
• Digilent XLA5
prototyping board (including a prototype area consisting of a solderless
• Power supply
• Logic probe
• Bag of pre-cut, pre-stripped wires
• Wire stripper/cutter
• Needle-nose pliers
• Some standard TTL logic chips (all DIP - dual-in-line pin packages - compatible with the breadboard)
• Chip extractor tool (the only way you will remove chips from the breadboard - for the safety of your fingers and the chip's pins)
This is a block diagram for the entire XLA board. Note that it highlights a large programmable logic chip on the board. Your kit may or may not have this chip in place right now, but we will use it later in the quarter to provide an environment for your digital circuits. In this class, you will not program this chip; that will happen in CSE 467. For now, your focus will be on the upper right hand corner - the prototyping area. You will also make use of buttons, switches, LEDs, and 7-segment displays as I/O devices except for Switch 8, Pushbutton 4, and LED 8, which are used for special functions. For the final laboratory assignment, we may make use of other features on the board.
Before doing any work on the protoboard such as wiring and inserting/removing chips, be sure the power is OFF. That is, unplug the power connector while you are constructing the circuit. After you have finished wiring up your design and before you turn on the power, double check the power and ground connections.
• Arrange the IC chips on the protoboard so that only
short wire connections are needed. Put tightly connected chips closer
• Try to avoid a jungle of wires. Long looping wires that go way into the air are easy to pull out (a hard bug to find later when the circuit doesn't work as intended).
• Try to maintain a low wiring profile so that you can reach the pins of the chips and so the chips can be replaced if necessary. The best connections are those that lie flat on the board.
The logic probe provides a very convenient way to check the value of any signal in your circuit. The probe has two lights, HI and LO, which indicate the value of the signal. The logic probe responds to the input voltage in two ways depending on whether CMOS or TTL is selected. We will use the TTL setting which lights the LO light for voltages <0.8v. and lights the HI light for voltages >2.3v. If neither light is lit, then the signal is floating (i.e. not being driven by any active output) or has some value between 0.8 and 2.3v.
The large black bar just below the white breadboard area is connected to many of the devices on the XLA board. Connect a wire from the VDD pin in this black bar to a 5-hole block on the breadboard, and connect another wire from GND to a different 5-hole block. Place another wire in each of the new VDD and GND blocks on the board, and leave the other end of the wires dangling. Make sure they are far apart and don't ever touch, because this will short the power supply and could cause some smoke or bad odor as parts start to burn (should this happen, pull out the power cord immediately). Clip the logic probe's two leads to VDD and GND. The red clip must be connected to VDD and the black to GND. This is an important color convention to follow. You have now successfully prepared your logic probe for use.
For now, we will simply use the logic probe to determine which switch positions correspond to digital high and low signals. Connect a wire from one of the switches in the black connector bar to a 5-hole block on the breadboard. Remember, SW8 is already in use, so do not use this switch. You can now connect power to the board. Now, use the logic probe to "probe" the signal output by your switch; just (gently) press the tip of the probe in the same 5-hole block as the wire from your switch. You should see either the probe's red or green light activate. Flip the switch and note that the light should change as well. Note which switch position corresponds to "high."
A) Encoding a deck of cards:
Observe that the cards come in groups of 13 (suit). Therefore each card has 2 values that distinguish it: suit (Hearts,Clubs,Diamonds,Spades) and value (Ace,2,...,King). Since the suit can be one of four values, we need 2 bits to encode the suit (0, 1, 2, 3 assigned to clubs, diamonds, hearts, spades, respectively). The value ranges from 1 to 13 (1=ace, 2, 3, ... , 10, 11=jack, 12=queen, 13=king). Values of 0, 14, and 15 are unused. Note that this encoding requires 6 bits:
V3 V2 V1 V0 S1 S0
In general, note that the higher-numbered subscripts denote higher-order (more significant) bits. By convention, bits progress, left to right, from most significant to least significant.
B) Using the encoding scheme above, design a circuit which recognizes the jack of diamonds.
The diamond suit is numbered 1 and the jack is the card with value 11 . Its encoding with this scheme is 1011 concatenated with 01 to yield 101101 or:
V3 and V2' and V1 and V0 and S1' and S0
You will need to choose the appropriate gates to
implement this logic, and you will have to do it in pieces (clearly, no single gate can
implement the function directly). You will use 6 switches
and 1 LED for this part. For the sake of your sanity and that of your TA, use SW1 through SW4 for
the card value and SW5 through SW6 for the suit.
Show this last circuit to a TA, and they will "check you off" for this laboratory assignment. Additionally, they may ask you to show them your work and explain your circuit in detail, so be prepared. All future labs will follow this format.