OBJECTIVE: Each student will interface an 8-bit input and 8-bit output port. The input will consist of a 47373 transparent latch and a package of 8 dip switches as shown in Figure 1 (coming soon). The switch will serve the purpose of supplying the 74373 with ground (logic 0) or float (logic 1). The output will consist of a 74374 edge-triggered latch driving 8 LEDs. The LEDs for this lab have a built-in resistor for the purpose of current limiting. They will be run common cathode and be driven by the 74374 (see Figure 2 (coming soon)). The PAL programmed in the first experiment, along with additional logic to decode A0-A2(since the PAL only decides A3-A15), will be used in decoding the port address of 180H for both the input and the output. A "C" program will be written to test the interface.
NOTE: The PALCE 22V10 that we currently use for this and other labs CAN support the entire address range. That is, A0 - A15. Therefore you will not need to use additional decoding logic. It would be a GOOD exercise to see if you can actually figure out how it would be if we were still using the older (more limited) PAL.
EQUIPMENT NECESSARY:
| Breadboard |
| PAL (PALCE 22V10) (NEW: USE PAL TO DECODE ENTIRE ADDRESS) |
| 74xx (Basic Logic Gates) (NEW: DO NOT USE ADDITIONAL GATES) |
| 74373 (for input port) |
| 74374 (for output port) |
| DIP switch pack (8 switches) |
| LEDs in DIP pack (no in-line resistors needed) |
| CRO |
PRE-LAB:
1. Design a circuit to uniquely interface both latches at the
I/O address 180H (see HINTS section below). The PAL from last week's
lab will be used to decode A15-A0 (because the 22V10 permits this). Use
other logic gates if necessary. Draw a detailed schematic (have this
ready before coming to lab) to show how the circuit will be set up.
Include pin numbers, names, and interconnections.
NOTE: There should be not reason to include resistors in series with the LEDs as they already have them built-in. HOWEVER since LEDs are, by definition, diodes: polarity DOES matter.
2. Write a "C" language program to read the values of the DIP switches, increment the value and write the new value out to the LEDs. (the incrementing is just to show that the switches are not simply connected directly to the LEDs i.e. that there is computer interfacing going on.) The program should also display the HEX value of the DIP pack to the the screen.
DURING
LAB:
1. Interface the specified circuit.
2. Run the program and verify that the circuit works.
3. With the program running, display the output enable of both
ports on the OCR.
POST-LAB:
1. Write a report following the outline (coming soon online)
specified in the syllabus.
2. Include a correct final schematic.
3. Include a listing of your program, including comments.
HINT:
For designing the circuit, remember that you
have the READ and WRITE signals available on the Breadboard to help you
distinguish between when you are reading (from the DIP switches) and writing
(to the LEDs). You will need these signals to be connected to the
OE and the WE lines of the latches. (Remember that the pins with
names that the the bar or slash on them represent active low pins.)