8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 1/14
Experiment No.: 2
Title: Introduction to the Standard/ Normal (SPP) of the Parallel Port of a PC
Group Members:
BARRIENTOS, Rocelle Mae
COLYONG, Nikki Grace
DE LEON, Jeffrey
DUMO, Tatiana Amor Cuepo
MATIS, Amelyn
Submitted To:
Engineer Jefferson Walcien
Date:
August 23, 2011
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 2/14
I. EXPERIMENT OBJECTIVES
1. To show how to configure the parallel port for standard/ normal SPP
operation.
2. To show how to use the data, status and control ports of the parallel port to
output or read-in data from an input application.
II. EQUIPMENT AND MATERIALS
Parallel Port Interface Testing Board
PC (with WIN2000 or lower OS)
Parallel Port data cable/ DB25 data cable
III.EXPERIMENT PROCEDURES
1. Do the following exercises using DOS debug:
A. Output any number in hex on your data port.
a. Open MS DOS prompt.
b. Type debug then enter.
c. Type o 378 NN. Where NN is the number in hex you will output.
B. Read the status of the switches on your status port by executing the
command: i 379 (enter).
C. Interpret the number inputted. Change the status of the switches on your
input generator module then read in again the input. Take note of the effect of
the most significant bit (MSB) in your readings.
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 3/14
D. Output any number in hex on your control port. Interpret the displayed
output. Take note also of the bits on the control port that are inverted.
2. Do the following:
A. On your data port, display/output binary counting for:
a. One run.
b. Repeated run.
c. Ten times run.
B. Repeat (a). Instead, display the numbers in the Fibonacci Series.
C. Write a routine using DOS debug to turn ON Data 0 on the data port of the
parallel port when any of the switches on the status port are activated
(reset/presses).
D. Write a routine using DOS debug to turn ON the LEDs on the data port
from the LSB LED to the MSB LED when the PBNO switch on Bit 4 on the
status port is momentarily pressed. When the PBNO switch on bit 3 is
momentarily pressed the LEDs will turn ON one at a time from the most
significant bits (MSB) to the least significant (LSB) bits.
E. Repeat 4a. (Binary Counting): Instead, use bit 6 on the status port to
increment the count. Use bit 5 to decrement and Bit 4 to reset the count
displayed on the data port.
IV.EXPERIMENT RESULTS
MS DOS:
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 4/14
C:/Windows/debug
o 378 11
o 378 22
o 378 56
o 378 88
o 378 A3
-i 379 0III IIII
7F
-i 379 IIII IIII
FF
-i 379 I0II 0III
B7
-i 379 I0II IIII
BF
-i 379 00II 00II
33
LEGEND:
I – ON / LED LIGHTS
O – OFF / LED DIMINISHED
FOR PROCEDURE I = 1.C
1. O 378 11 LED DISPLAY : _000I 000I__
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 5/14
2.
2.
2.
2. O 378 22 LED DISPLAY : __00I0 00I0__
3. O 378 56 LED DISPLAY : __0I0I 0II0__
4. O 378 88 LED DISPLAY : __I000 I000__
5.O 378 A3 LED DISPLAY : __I0I0 00II__
0 0 0 0 I 0
0 0 I 0 0
0 I 0 I 0 I
I 0 0 0 I
I 0 I 0 0
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 6/14
FOR PROCEDURE I = 2
1. 0III IIII OUTPUT IN THE PC : __7F__
2. IIII IIII OUTPUT IN THE PC : __FF__
3. I0II 0III OUTPUT IN THE PC : __A7__
4. I0II IIII OUTPUT IN THE PC : __AF__
5. 00II 00II OUTPUT IN THE PC : __33__
V. OBSERVATIONS
From the conduct of the experiment, the group observed the operation of the
parallel port. This is when the module was connected to a windows 98 computer.
First, we observed that we use the notations o 378 to denote the desired outputs. Our
instructor however assigned the output numbers so that all groups will have uniforms
data results. We have seen how the 2-bit hexadecimals when inputted as the output of
the module, have altered how many and which of the LED’s will light. The LED’s
however are operating in two 4-bit binary numbers. For example, when we inputted o
378 14, the LED had an output of 0001100 showing the equivalent of the
hexadecimal in the binary system. Second, we reversed the procedure wherein we
inputted the data. We have done this by changing the status of the switches, taking
into consideration the most significant bit. The switches now indicate the two 4-bit
binary number which is interpreted as a 2-bit hexadecimal number. This can be done
by entering i 379, and pressing the enter key. The equivalent binary number will
appear simultaneously. We noticed that this part is just the reverse of the first
procedure. The two procedures are maintaining the same principles.
VI.CONCLUSION
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 7/14
From the data and results obtained from the performance of the experiment,
the following conclusions can be made. First, the need for the correct notations for
input and output are very much needed in order to gather correct data. Second, we
only enter the output in the hexadecimal system accompanied by the o 378 notation.
After which the LED’s will respond, producing the equivalent binary number
expressed in two 4-bit binary numbers. Third, we enter the input by changing the
status of the switches wherein the 8 switches corresponds now to the two 4-bit
number. We enter the notation i 379 and then the hexadecimal equivalent will appear
simultaneously after pressing the enter key. The experiment is mainly about the
function of the module wherein we utilized the parallel port to output or read-in data
from the DOS debug application.
VII. RECOMMENDATIONS
The conduct of the experiment is a success, however the group believes that it
is better to make a research work before the performance of the experiment. This is to
limit and prevent the errors and difficulties in the gathering of the required data and
results. Despite of this, the group still wants to recommend this activity as a way of
checking whether or not the whole module is working. The procedures for this
activity or experiment are easy to follow, thus it is student-friendly. In addition, the
procedure is not only limited on the Instrumentations but the theories and facts
learned in Logic lecture are also reflected in this activity.
VIII. APPENDICES (RESEARCH WORK)
PARALLEL PORT
A parallel port is a type of interface found on computers ( personal and otherwise) for
connecting various peripherals. In computing, a parallel port is a parallel
communication physical interface. It is also known as a printer port or Centronics port. The IEEE
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 8/14
1284 standard defines the bi-directional version of the port, which allows the transmission and
reception of data bits at the same time.
a. HISTORY
The Centronics Model 101 printer was introduced in 1970 and included the first parallel
interface for printers. The interface was developed by Robert Howard and Prentice Robinson
at Centronics. The Centronics parallel interface quickly became a de facto industry standard;
manufacturers of the time tended to use various connectors on the system side, so a variety of
cables were required. For example, early VAX systems used a DC-37 connector, NCR used the
36-pin micro ribbon connector, Texas Instruments used a 25-pin card edge connector and Data
General used a 50-pin micro ribbon connector.
Dataproducts introduced a very different implementation of the parallel interface for their
printers. It used a DC-37 connector on the host side and a 50 pin connector on the printer side—
either a DD-50 (sometimes incorrectly referred to as a "DB50") or the block shaped M-50
connector; the M-50 was also referred to as Winchester. Dataproducts parallel was available in a
short-line for connections up to 50 feet (15 m) and a long-line version for connections from 50
feet (15 m) to 500 feet (150 m). The Dataproducts interface was found on many mainframe
systems up through the 1990s, and many printer manufacturers offered the Dataproducts
interface as an option.
IBM released the IBM Personal Computer in 1981 and included a variant of the
Centronics interface— only IBM logo printers (rebranded fromEpson) could be used with the
IBM PC. IBM standardized the parallel cable with a DB25F connector on the PC side and the
Centronics connector on the printer side. Vendors soon released printers compatible with both
standard Centronics and the IBM implementation.
IBM implemented an early form of bidirectional interface in 1987. HP introduced their
version of bidirectional, known as Bitronics, on theLaserJet 4 in 1992. The Bitronics and
Centronics interfaces were superseded by the IEEE 1284 standard in 1994.
b. USES
Before the advent of USB, the parallel interface was adapted to access a number of
peripheral devices other than printers. Probably one of the earliest devices to use parallel
were dongles used as a hardware key form of software copy protection. Zip
drives and scanners were early implementations followed by external modems, sound
cards, webcams, gamepads, joysticks and external hard disk drives and CD-ROMdrives.
Adapters were available to run SCSI devices via parallel. Other devices such
as EPROM programmers and hardware controllers could be connected parallel.
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 9/14
For consumers, the USB interface—and often Ethernet —has effectively replaced the
parallel printer port. Many manufacturers of personal computers and laptops consider parallel to
be alegacy port and no longer include the parallel interface. The guidelines for
Microsoft'sWindows Logo Program "strongly discourages" systems builders from including
parallel ports.[5] USB-to-parallel adapters are available that can make parallel-only printers work
with USB-only systems.
c. HARDWARE PROPERTIES
The D-Type 25 pin connector is the most common connector found on the Parallel Port
of the computer, while the Centronics Connector is commonly found on printers. The IEEE 1284
standard however specifies 3 different connectors for use with the Parallel Port. The first one,
1284 Type A is the D-Type 25 connector found on the back of most computers. The 2nd is the
1284 Type B which is the 36 pin Centronics Connector found on most printers. IEEE 1284 Type
C however, is a 36 conductor connector like the Centronics, but smaller. This connector is
claimed to have a better clip latch, better electrical properties and is easier to assemble. It alsocontains two more pins for signals which can be used to see whether the other device connected,
has power.
Pin No (DB25) Pin No (36 pin) Signal name Direction Register - bit Inverted
1 1 Strobe In/Out Control-0 Yes
2 2 Data0 Out Data-0 No
3 3 Data1 Out Data-1 No
4 4 Data2 Out Data-2 No
5 5 Data3 Out Data-3 No
6 6 Data4 Out Data-4 No
7 7 Data5 Out Data-5 No
8 8 Data6 Out Data-6 No
9 9 Data7 Out Data-7 No
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 10/14
10 10 Ack In Status-6 No
11 11 Busy In Status-7 Yes
12 12 Paper-Out In Status-5 No
13 13 Select In Status-4 No
14 14 Linefeed In/Out Control-1 Yes
15 32 Error In Status-3 No
16 31 Reset In/Out Control-2 No
17 36 Select-Printer In/Out Control-3 Yes
18-25 19-30,33,17,16 Ground - - -
Table 1. Pin Assignments of the D-Type 25 pin Parallel Port Connector.
The above table uses "n" in front of the signal name to denote that the signal is active
low. e.g. nError. If the printer has occurred an error then this line is low. This line normally is
high, should the printer be functioning correctly. The "Hardware Inverted" means the signal is
inverted by the Parallel card's hardware. Such an example is the Busy line. If +5v (Logic 1) was
applied to this pin and the status register read, it would return back a 0 in Bit 7 of the Status
Register. The output of the Parallel Port is normally TTL logic levels. The voltage levels are the
easy part. The current you can sink and source varies from port to port. Most Parallel Ports
implemented in ASIC, can sink and source around 12mA. However these are just some of the
figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source
4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so
the least current is drawn from the Parallel Port.
d. STANDARD PARALLEL PORT
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 11/14
Table 2. Data Port
Note 1 : If the Port is bi-directional then Read and Write Operations can be performed on the
Data Register.
The base address, usually called the Data Port or Data Register is simply used for outputting data on the Parallel Port’s data lines (Pins 2-9). This register is normally a write only
port. If you read from the port, you should get the last byte sent. However if your port is bi-
directional, you can receive data on this address.
Table 3. Status Port
The Status Port (base address + 1) is a read only port. Any data written to this port will be
ignored. The Status Port is made up of 5 input lines (Pins 10,11,12,13 & 15), a IRQ status
register and two reserved bits. Please note that Bit 7 (Busy) is a active low input. E.g. If bit 7
happens to show a logic 0, this means that there is +5v at pin 11. Likewise with Bit 2. (nIRQ) If this bit shows a '1' then an interrupt has not occurred.
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 12/14
Table 4. Control Port
The Control Port (base address + 2) was intended as a write only port. When a printer is
attached to the Parallel Port, four "controls" are used. These are Strobe, Auto Linefeed, Initialize
and Select Printer, all of which are inverted except Initialize.
The printer would not send a signal to initialize the computer, nor would it tell the
computer to use auto linefeed. However these four outputs can also be used for inputs. If the
computer has placed a pin high (e.g. +5v) and your device wanted to take it low, you would
effectively short out the port, causing a conflict on that pin. Therefore these lines are "open
collector" outputs (or open drain for CMOS devices). This means that it has two states. A low
state (0v) and a high impedance state (open circuit).
Normally the Printer Card will have internal pull-up resistors, but as you would expect,
not all will. Some may just have open collector outputs, while others may even have normal
totem pole outputs. In order to make your device work correctly on as many Printer Ports as possible, you can use an external resistor as well. Should you already have an internal resistor,
then it will act in Parallel with it, or if you have Totem pole outputs, the resistor will act as a
load.
An external 4.7k resistor can be used to pull the pin high. I wouldn't use anything lower,
just in case you do have an internal pull up resistor, as the external resistor would act in parallel
giving effectively, a lower value pull up resistor. When in high impedance state the pin on the
Parallel Port is high (+5v). When in this state, your external device can pull the pin low and have
the control port change read a different value. This way the 4 pins of the Control Port can be
used for bi-directional data transfer. However the Control Port must be set to xxxx0100 to beable to read data, that is all pins to be +5v at the port so that you can pull it down to GND (logic
0).
Bits 4 & 5 are internal controls. Bit four will enable the IRQ (See Using the Parallel
Ports IRQ) and Bit 5 will enable the bi-directional port meaning that you can input 8 bits using
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 13/14
(DATA0-7). This mode is only possible if your card supports it. Bits 6 & 7 are reserved. Any
writes to these two bits will be ignored.
e. FIBONACCI SERIES
The Fibonacci Series is a sequence of numbers first created by Leonardo Fibonacci (fi-
bo-na-chee) in 1202. It is a deceptively simple series, but its ramifications and applications are
nearly limitless. It has fascinated and perplexed mathematicians for over 700 years, and nearly
everyone who has worked with it has added a new piece to the Fibonacci puzzle, a new tidbit of
information about the series and how it works. Fibonacci mathematics is a constantly expanding
branch of number theory, with more and more people being drawn into the complex subtleties of
Fibonacci's legacy.
In mathematics, the Fibonacci numbers are the numbers in the following integer
sequence:
(sequence A000045 inOE
IS).
By definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the
sum of the previous two.
In mathematical terms, the sequence F n of Fibonacci numbers is defined by
the recurrence relation
with seed values
The Fibonacci sequence is named after Leonardo of Pisa, who was known as Fibonacci.
Fibonacci's 1202 book Liber Abaciintroduced the sequence to Western European
mathematics, although the sequence had been described earlier in Indian mathematics. (By
modern convention, the sequence begins with F 0 = 0. The Liber Abacibegan the sequence
with F 1 = 1, omitting the initial 0, and the sequence is still written this way by some.)
Fibonacci numbers are closely related to Lucas numbers in that they are a complementary
pair of Lucas sequences. They are intimately connected with the golden ratio, for example
the closest rational approximations to the ratio are 2/1, 3/2, 5/3, 8/5, ... . Applications include
computer algorithms such as the Fibonacci search technique and the Fibonacci heap data
structure, and graphs called Fibonacci cubes used for interconnecting parallel and distributed
systems. They also appear in biological settings, such as branching in trees, arrangement of
8/4/2019 August23 Report
http://slidepdf.com/reader/full/august23-report 14/14
leaves on a stem, the fruit spouts of a pineapple, the flowering of artichoke, an uncurling fern and
the arrangement of a pine cone.
The first 21 Fibonacci numbers F n for n = 0, 1, 2, ..., 20 are:
F 0 F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 F 9 F 10 F 11 F 12 F 13 F 14 F 15 F 16 F 17 F 18 F 19 F 20
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
The sequence can also be extended to negative index n using the re-arranged recurrence
relation
which yields the sequence of "negafibonacci" numbers satisfying
Thus the complete sequence is
F −8 F −7 F −6 F −5 F −4 F −3 F −2 F −1 F 0 F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8
−21 13 −8 5 −3 2 −1 1 0 1 1 2 3 5 8 13 21
IX.BIBLIOGRAPHY
http://en.wikipedia.org/wiki/Parallel_port
http://beyondlogic.org/spp/parallel.pdf
http://library.thinkquest.org/27890/mainIndex.html
http://en.wikipedia.org/wiki/Fibonacci_number