Documentos de Académico
Documentos de Profesional
Documentos de Cultura
In computers, ports are used mainly for two reasons: Device control
and communication. We can program PC's Parallel ports for both.
Parallel ports are mainly meant for connecting the printer to the PC.
But we can program this port for many more applications beyond
that.
Note: All the parallel ports do not have bidirectional capability. Earlier
parallel ports had only output enabled in data pins since printers only
inputs data. But latter, to make parallel port capable of communicating
with other devises, bidirectional ports are introduced.
• You will get details of LPT port. Make sure that "Use this
Port (enable)" is selected.
• Select tab recourses. In that you will get the address range
of port.
To start programming, you will need a D-25 type Male connector. Its
pin structures can be found in the connector as follows:
Programming the Parallel Port in DOS:
Main bitwise operators that we need are bitwise AND '&' and
bitwise OR '|'. To make a particular bit in a byte high without affecting
other bits, write a byte with corresponding bit 1 and all other bits 0; OR
it with original byte. Similarly, to make particular bit low, write a byte
with corresponding bit 0 and all other bits 1; AND it with original byte.
Procedure:
1. Open windows 98 as OS
2. Connect the male connector of the parallel port cord to the PC
3. Now connect the Female Connector of cord with seven
segment C-5611 as shown in table.
Introduction: -
To communicate world the computers use peripherals (I/O devices). Commonly used
peripherals are: A/D converter, D/A converter, CRT, printers, hard disks etc. Peripherals
are connected to the microcomputer through electronic circuit. The interfacing circuit
converts the data available from an input device into compatible format for the computer.
Some interfacing devices are I/O ports, Programmable
Peripheral Interface (PPI) etc. This I/O port can be either of PC or Micro controller etc.
Interface actually get input from the input side and convert the data into the compatible
form which can be received in interpretable form and the same interface also collect the
signal from output side and reconvert in the form which can be received by input side.
In an IBM PC, these registers are I/O mapped and will have a unique address. We have to
find these addresses to work with parallel port. For a typical PC, the base address of
LPT1 is 0x378 and of LPT2 is 0x278. The Data register resides at this base address,
Status register at base address +1 and the control register is at base address +2. So, once
we have base address, we can calculate the register in this manner. The table below
shows the register addresses of LPT1 and LPT2.
8
Status register (base address +1) 0x37 0x279
9
Control register (base address +2) 0x37a 0x27a
Example of a Computer Interfaced Relay Driver Circuit