eHow launches Android app: Get the best of eHow on the go.

How To

How to Move Data Through the Parallel Port in DOS

Member
By lifeengineer
User-Submitted Article
(0 Ratings)

The ability to move data through the parallel port in DOS can be very useful. It gives a user the ability to print out the file contents in DOS. Also, it provides the ability to move data across a parallel (LPT) port. This can be very useful since the parallel port is a 25 pin port which provides relatively high bandwidth. The parallel port can be easily used to control robotics or other electronic devices using very simple instructional code. This article will show you how to move data through the parallel port in DOS.

Difficulty: Easy
Instructions
  1. Step 1

    Open the MS-DOS command window. The command window can also be accessed from Windows (95, 98, and 98SE) by clicking "Start", then selecting "Run". Then type "cmd" and click "OK".

  2. Step 2

    Configure your LPT ports. By default, a printer was typically attached to the first parallel port (LPT1). In order to configure the LPT ports use the mode command. Check the LPT1 port by typing the following command:

    mode lpt1/status

    The mode command can also be used to port LPT traffic to a com port. In order to redirect parallel port 1 (LPT1) data to COM port 1 (COM1) use the command:

    mode lpt1 = com1

  3. Step 3

    Copy a data file over the printer port (LPT1) using the following command. Keep in mind the command is intended to send ascii data through the port in the format set up by the printer.sys file in DOS.

    copy [drive location]:[file name].[extension] [port location]

    For example, to copy a data file named portmove.txt from the c: drive to LPT1 use:

    copy c:portmove.txt lpt1

  4. Step 4

    Configure the wires to control data from the correct pins. Using a standard DB25, the following pin address should be considered.

    DB25 Name of Reg
    pin Signal Bit
    ---- -------- ---
    1 -Strobe C0-
    2 Data 0 D0
    3 Data 1 D1
    4 Data 2 D2
    5 Data 3 D3
    6 Data 4 D4
    7 Data 5 D5
    8 Data 6 D6
    9 Data 7 D7
    10 -Ack S6+
    11 +Busy S7-
    12 +PaperEnd S5+
    13 +SelectIn S4+
    14 -AutoFd C1-
    15 -Error S3+
    16 -Init C2+
    17 -Select C3-

    You can use D0 through D3 to send 4 bits of data through the parallel port one by one and use D4 to synchronize timing of the data since this is one way communication.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics