Related Links On Parallel Port
CVGS
Parallel Port
Structure of Parallel Port.
Overview :
There are 8 data pins in the parallel port D0-D8 as shown. The are also eight ground pins as shown. The output can be taken between any of the output pins and any of the ground pins. Since the car is capable of moving in onlt two directions, we just need two data pins. We used data pin D0 for the forward motion and data pin D1 for backward motion. The other pins are not of any use to us as for now.
The output from parallel port is fed to the Op-Amp amplifier ans fed to the 555 timer and then to the FM transmitter. This will be discussed in detail in the Communication system section.
Parallel Port Modes :
Today, most Parallel Ports are multimode ports. They are normally software configurable to one of many modes from BIOS.The typical modes are,
Printer Mode (Sometimes called Default or Normal Modes)
Standard & Bi-directional (SPP) Mode
EPP1.7 and SPP Mode
EPP1.9 and SPP Mode
ECP Mode
ECP and EPP1.7 Mode
ECP and EPP1.9 Mode
Printer Mode is the most basic mode. It
is a Standard Parallel Port in forward mode only. It has no bi-directional
feature, thus Bit 5 of the Control Port will not respond. Standard & Bi-directional
(SPP) Mode is the bi-directional mode. Using this mode, bit 5 of the Control
Port will reverse the direction of the port, so you can read back a value
on the data lines.
EPP1.7 and SPP Mode is a combination of EPP 1.7 (Enhanced Parallel Port) and
SPP Modes. In this mode of operation you will have access to the SPP registers
(Data, Status and Control) and access to the EPP Registers. In this mode you
should be able to reverse the direction of the port using bit 5 of the control
register. EPP 1.7 is the earlier version of EPP. This version, version 1.7,
may not have the time-out bit.
EPP1.9 and SPP Mode is just like the previous
mode, only it uses EPP Version 1.9 this time. As in the other mode, you will
have access to the SPP registers, including Bit 5 of the control port. However
this differs from EPP1.7 and SPP Mode as you should have access to the EPP
Timeout bit.
ECP Mode will give you an Extended Capabilities
Port. The mode of this port can then be set using the ECP's Extended Control
Register (ECR). However in this mode from BIOS the EPP Mode (100) will not
be available. We will further discuss the ECP's Extended Control Register
in this document.
ECP and EPP1.7 Mode and ECP and EPP1.9
Mode will give you an Extended Capabilities Port, just like the previous mode.
However the EPP Mode in the ECP's ECR will now be available. Should you be
in ECP and EPP1.7 Mode you will get an EPP1.7 Port, or if you are in ECP and
EPP1.9 Mode, an EPP1.9 Port will be at your disposal.
The above modes are configurable via BIOS.
You can reconfigure them by using your own software, but this is not recommended.
These software registers, typically found at 0x2FA, 0x3F0, 0x3F1 etc are only
intended to be accessed by BIOS. There is no set standard for these configuration
registers, thus if you were to use these registers, your software would not
be very portable. With today's multitasking operating systems, its also not
a good idea to change them when it suits you.
A better option is to select ECP and EPP1.7 Mode or ECP and EPP1.9 Mode from BIOS and then use the ECP's Extended Control Register to select your Parallel Port's Mode. The EPP1.7 mode had a few problems in regards to the Data and Address Strobes being asserted to start a cycle regardless of the wait state, thus this mode if not typically used now. Best set your Parallel Port to ECP and EPP1.9 Mode.
Port
Address :
The Parallel Port has three commonly used base addresses.The 3BCh base address was originally introduced used for Parallel Ports on early Video Cards. This address then disappeared for a while, when Parallel Ports were later removed from Video Cards. They has now reappeared as an option for Parallel Ports integrated onto motherboards, upon which their configuration can be changed using BIOS.
LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h. However this may not always be the case as explained later. 378h & 278h have always been commonly used for Parallel Ports. The lower case h denotes that it is in hexadecimal. These addresses may change from machine to machine.
When the computer is first turned on, BIOS (Basic Input/Output System) will determine the number of ports you have and assign device labels LPT1, LPT2 & LPT3 to them. BIOS first looks at address 3BCh. If a Parallel Port is found here, it is assigned as LPT1, then it searches at location 378h. If a Parallel card is found there, it is assigned the next free device label. This would be LPT1 if a card wasn't found at 3BCh or LPT2 if a card was found at 3BCh. The last port of call, is 278h and follows the same procedure than the other two ports. Therefore it is possible to have a LPT2 which is at 378h and not at the expected address 278h.
What can make this even confusing, is
that some manufacturers of Parallel Port Cards, have jumpers which allow you
to set your Port to LPT1, LPT2, LPT3. Now what address is LPT1? - On the majority
of cards LPT1 is 378h, and LPT2, 278h, but some will use 3BCh as LPT1, 378h
as LPT1 and 278h as LPT2. Life wasn't meant to be easy.
The assigned devices LPT1, LPT2 & LPT3 should not be a worry to people
wishing to interface devices to their PC's. Most of the time the base address
is used to interface the port rather than LPT1 etc. However should you want
to find the address of LPT1 or any of the Line Printer Devices, you can use
a lookup table provided by BIOS. When BIOS assigns addresses to your printer
devices, it stores the address at specific locations in memory, so we can
find them.
More Basics on Parallel
Port.
Sending signals through parallel port :
The signals through the parallel port are sent through commands given in the software. The code for this is given and discussed in the software section.
<< Previous(The Car) Next(Communication System) >>
Copyright © 2003 Gammaworkz. All rights reserved.