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:
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.
How to Convert Parallel Dongle to USB
If you have an old printer or scanner that has a parallel dongle and can't connect it to a newer computer, don't...
How to Capture a Printer Port
In most cases, printing in Windows requires only the click of the "Print" icon or choosing the appropriate menu bar option. Printing...
How to Connect a Printer With Cmd.exe
Microsoft Windows has the ability to connect to shared printers through the command line. The shared printer can be local or on...
How to Assign USB Printers to LPT Ports
Many older DOS and command-line programs were designed before the USB standard was invented. Before USB, most printers used a parallel port...
How to Redirect LPT1 to a USB Printer
If you are using an older software program that was designed before the USB standard became popular for printers, the program may...
How to Control LPT Ports on the DOSBox
DOS may be an old technology, but it still quite useful to computer professionals and ordinary computer owners. Some legacy programs still...