
Hardware Interfacing through VB.NET
Computer Programming and Principles
CE-203
Usman Institute of Technology
October 11, 2009. Presented to: Miss Shagufta Yasmeen.
Submitted by: Mohsin Yousuf

2
Table of Content
Introduction 3
Objective 3
Definitions 3
Theory 3
Assumptions 5
Equipment 5
Procedure 5
Discussion of Result 9

3
Introduction
There are two types of Hardware interfacing, serial interfacing and parallel
interfacing. In this lab we will learn parallel interfacing which is much easier then serial
interfacing. Parallel interfacing is faster then serial interfacing. For parallel interface we
will use LPT (Printer port) of our PCs.LPT can be interfaced through so many languages
and compilers like C,C++,C#,VB and .NET etc.In this manual I used VB.NET as a
reference language because in C++ that program does not work on Windows xp operating
system.
Objectives
The objective of this lab is to turn ON and OFF the 100 Watt Bulb through PC.
Definitions
Serial Interfacing: When hardware is attached to any serial port of PC then it will be
called serially interfaced.
Parallel Interfacing: Whenever hardware is interfaced through LPT port of your PC
then it is called parallel interfacing.
Theory
Traditionally IBM PC systems have allocated their first three parallel ports
according to the configuration in the table below.
PORT NAME Interrupt # Starting I/O Ending I/O
LPT1 IRQ 7 0x378 0x37f
LPT2 IRQ 7 0x278 0x27f
LPT3 IRQ 5 0x3bc 0x3bf
If there is an unused LPTx slot, the port addresses of the others are moved up. (For
example, if a port at 0x3bc does not exist, the port at 0x378 will then become
LPT1.)[citation needed] The IRQ lines, however, remain fixed (therefore, 0x378 at LPT1
would use IRQ 7)[citation needed]. Unfortunately the default IRQ used by the first two
addresses is the same, and it's difficult to get correct interrupt behaviour if both of these