0% found this document useful (0 votes)
24 views2 pages

Interface I

This document describes an experiment to demonstrate input and output functions of a PC's parallel port using a parallel port interface kit. The experiment involves: 1) Controlling LEDs by writing values to the parallel port and lighting up the corresponding LEDs. 2) Reading switch values on the interface kit by reading the parallel port and displaying the values. 3) Incrementing a 7-segment display from 0-9 by writing values to control lines. 4) Turning a relay on/off to control a bulb by writing 1s and 0s to the parallel port.

Uploaded by

BalaKrishnanC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Interface I

This document describes an experiment to demonstrate input and output functions of a PC's parallel port using a parallel port interface kit. The experiment involves: 1) Controlling LEDs by writing values to the parallel port and lighting up the corresponding LEDs. 2) Reading switch values on the interface kit by reading the parallel port and displaying the values. 3) Incrementing a 7-segment display from 0-9 by writing values to control lines. 4) Turning a relay on/off to control a bulb by writing 1s and 0s to the parallel port.

Uploaded by

BalaKrishnanC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

INTERFACE I

Aim:
Develop a 'C' code to demonstrate the functions of input and output ports of a
Personal Computer through a Parallel port interface kit by performing the following
experiments:
o LED interface
o Reading the input from the switches
o Incremental count in Seven segment display
o Turn on/off the Bulb with relay output
Apparatus required:

Personal Computer (PC) - 1

Parallel port interface kit - 1

Parallel port interface cable - 1

Single core wires

Turbo C software

'PonyProg' interfacing software

Procedure:
o Develop an appropriate 'C' code with 'inportb( )' and 'outportb( )' functions and
perform the following functions:
LED interface
1. Connect the PC with parallel port cable.
2. Connect 'D0 - D7' data lines of interface kit to the 'A0 - A7' LED output lines.
3. Execute the 'C' code
4. Choose the 'LED interface' menu and give the input value in Decimal format
5. Watch the LED in the interface kit, the given Decimal number is converted as binary
format and the appropriate LED's will be glow.

Reading the input from the switches


1. Connect the PC with parallel port cable.
2. Connect 'D0 - D7' data lines of interface kit to the 'S0 - S7' input lines.
3. Execute the 'C' code
4. Choose the 'Read switch' menu and fix the input value by choosing the appropriate
switches in the interface kit
5. Watch the PC screen the value fixed in the interface kit will be shown in the form of
Hexa-decimal value.

Incremental count in Seven segment display


1. Connect the PC with parallel port cable.
2. Connect 'D0 - D3' data lines of interface kit to the 'a - d' lines of the seven segment
display.
3. Execute the 'C' code
4. For every press of the 'Any key', the incremental count from 0-9 will be displayed in
the seven segment display.

Turn on/off the Bulb with relay output


1. Connect the PC with parallel port cable.
2. Connect 'D0' data line of interface kit to the appropriate relay switch.
3. Execute the 'C' code
4. For an any key press the value '0x01' will be sent through 'outportb( )' function and
the respective relay switch will be 'switched ON' and for the next any key press the
value '0x00' will be sent through 'outportb( )' function and the respective relay switch
will be 'switched OFF'.

Result:
The functionalities of input and output ports of a Personal Computer were examined
by writing and executing a 'C' code through a Parallel port interface kit .

You might also like