How to Move Data Through the Parallel Port in DOS

Save

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.

  • 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".

  • 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

  • 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

  • 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.

Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!