EE 352 Project 2

Parallel Port Implementation using an Altera Chip

Design an eight-bit bi-direction parallel port using an Alter chip and an address decoder. Use the following pinouts:

Function

Pin

D0

2

D1

3

D2

4

D3

5

D4

6

D5

7

D6

8

D7

9

CTRL0

1

CRTL1

16

CTRL2

17

ST0

10

ST1

13

ST2

11

GND

18-25

There should also be two internal registers, CT3 and CT4. CT3 will be used to control the port direction (CT3 = 0 for output, CT3 = 1 for input), and CT4 will be used as the interrupt enable (CT4 = 0 will disable the interrupt, CT4 = 1 will enable the interrupt).

  1. Use a handshaking protocol like that of Messmer.
    1. The transmitter should raise pin 17, which the receiver sees on its pin 13.
    2. The receiver responds by bringing pin 16 high, which the transmitter sees on pin 11.
    3. The transmitter places its data on D7-0, then brings pin 1 low.
    4. The receiver sees this on pin 10. The receiver reads the data on D7-D0, then brings its pin 1 low.
    5. The transmitter sees this on its pin 10, and acknowledges by bringing its pin 1 high; the receiver responds by bringing its pin 1 back high.
    6. The transmitter can then send another byte.
    7. When done, the transmitter will release the port by bringing pin 17 low, and the receiver will respond by bringing pin 16 low.
    8. Build a PC interface card to implement this. Your card should use four consecutive address locations. You should be able to choose the base address by means of jumpers. You should also be able to select the IRQ used by means of jumpers.
    9. Write a program to transmit and receive data over the parallel port.