⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jan axelson's parallel port faq.htm

📁 Parallel Port description of the communication port
💻 HTM
📖 第 1 页 / 共 5 页
字号:
      make the port unusable in any mode, until a hard reset (or clearing the 
      bit)! </P>
      <P>Beware #2: Don't test for an EPP at address 3BCh. The added EPP 
      registers aren't available at this address, and may be used for video. 
</P>
      <P>Detecting an SPP </P>
      <P>To test for an SPP, use the tried and true method of writing two values 
      to the data port and reading them back. If the values match, the port 
      exists. Otherwise, the port doesn't exist, or it's not working properly. 
      Also note that the port-test routine only verifies the existence of the 
      data port. It doesn't test the status and control lines. The other port 
      types (EPP, ECP. PS/2) should also pass this test. </P>
      <P>Detecting a PS/2-type Port </P>
      <P>To test for simple bidirectional ability, first try to put the port in 
      input mode by writing 1 to bit 5 in the port's control register (at base 
      address + 2). If the port is bidirectional, this tri-states the data 
      port's outputs. Then write two values to the data port and read each back. 
      If the outputs have been tri-stated, the reads won't match what was 
      written, and the port is almost certainly bidirectional. If the reads do 
      match the values written, you're reading back what you wrote, which tells 
      you that the data-port outputs weren't disabled and the port isn't 
      bidirectional. An ECP in its internal PS/2 mode and some EPPs will pass 
      this bidirectional test. Test for a PS/2-type port only after you've 
      verified that an SPP, EPP, or ECP exists. Because the PS/2 test uses the 
      failure of a port read to determine that a port is bidirectional, a 
      non-existent port will pass the test! </P>
      <H2>ECP Modes </H2>
      <P><I>Q: Can an ECP emulate other port types? </I></P>
      <P>A: An ECP has several internal modes. In addition to ECP mode, an ECP 
      can emulate an SPP (original) or PS/2-type (Byte-mode, or simple 
      bidirectional) port. Many ECPs also support EPP emulation. Fast Centronics 
      is an additional mode that gives faster performance with many SPP-type 
      peripherals. </P>
      <P>ECP internal modes: </P>
      <P>000 SPP<BR>001 Byte<BR>010 Fast Centronics<BR>011 ECP<BR>100 EPP<BR>101 
      Reserved<BR>110 Test <BR>111 Config </P>
      <P>Set the mode in bits 7, 6, and 5 of the ECR at base address + 402h. For 
      example, to set an ECP at 378h to ECP mode in Basic:</P>
      <P>'The ECR is at 77Ah (378h + 402h) <BR>EcrAddress=&amp;h77A <BR>'The 
      code for the selected mode (EPP) from the table above: <BR>EcpMode=3 
      <BR>'Read the ECR <BR>ECRData=Inp(EcrAddress) <BR>'Set the highest 3 bits 
      to match the selected mode. <BR>ECRData=(ECRData AND &amp;h1F) + EcpMode * 
      &amp;h20 <BR>'Write the result back to the ECR. <BR>Out EcrAddress, 
      ECRData </P>
      <H2>Cables </H2>
      <P><I>Q: I am tring to find the pin-outs and pin descriptions for an 
      IEEE-1284 cable or ECP cable. </I></P>
      <P>A: It depends on what you mean: </P>
      <P>1. A cable labeled "IEEE-1284 compliant" has to meet certain standards 
      defined in the IEEE 1284 standard, such as double shielding and having 
      each signal wire in a twisted pair with its ground return. The connectors 
      may be the traditional 25-pin D-subs, 36-contact Centronics-type, or the 
      new, more compact 36-contact IEEE-1284C type. If the connectors are D-subs 
      or Centronics, some of the pins have multiple ground wires. (The 
      Centronics connector has 36 contacts, but the conventional use of it 
      doesn't allow a ground return for every signal wire.) </P>
      <P>2. If you're just looking for a cable that will do ECP transfers, you 
      don't need an IEEE-1284-compliant cable, but it may give you faster 
      transfers or allow a longer link. </P>
      <P>3. See Lakeview Research's web site for the connector pinouts. </P>
      <P><I>Q: Where can I find the wiring diagram of an ECP parallel cable for 
      connecting a pair of computers to do file transfer at ECP port speed ? 
      </I></P>
      <P>A: The PC's parallel port was designed for PC-to-peripheral links, 
      where the ports on the PC and peripheral complement each other. On the 
      PC's port, the data and control bits are outputs, and the status bits are 
      inputs, and on the peripheral, the data and control bits are inputs, and 
      the status bits are outputs. If you want to connect the parallel ports of 
      two PCs, you need a special cable that connects inputs on one port to 
      outputs on the other. With old-style ports, the conventional way to do 
      this is to cross-connect the status lines with 5 of the data lines, and 
      have the software write a nibble at a time to the data lines and read the 
      data on the status lines. (The other two lines do handshaking.) </P>
      <P>Parallel ports that support ECP mode (or PS/2 (Byte) mode or EPP mode) 
      have bidirectional data lines, and it would be nice to be able to use 
      these for faster data transfers between PCs. For the handshake, you would 
      need to cross-connect the status and control lines so that each output 
      connects to an appropriate input. </P>
      <P>One problem is that the default state for the data lines on both of the 
      PCs' ports is output. If you connect the data lines of two ports to each 
      other, you have outputs connected to outputs, and the resulting currents 
      may destroy the port circuits. Some port controllers have protected 
      outputs, but relying on this isn't the greatest solution. Other 
      possibilities: Add an electronic switch that keeps the data lines from 
      connecting until the software explicitly requests it. Be very, very 
      careful not to plug in the cable until at least one data port has been 
      configured as input. Use Parallel Technologies' Universal Cable 
      (http://www.lpt.com/lpt/) which contains active circuits that handle the 
      signal switching for you. </P>
      <P>With that said, there is a document on the Microsoft Developer's 
      Network CD-ROM titled, "Extended Capabilities Port: Specifications." A lot 
      of the information in it is reprinted word-for-word in the controllers' 
      data sheets, but it does also describe a method of connecting two PC-side 
      ECPs to perform a "compliance test." This is the recommended wiring from 
      this document: </P>
      <P>Make these connections (PC "A" to PC "B"): <BR>nStrobe (pin 1) to nAck 
      (pin 10) <BR>nAck (pin 10) to nStrobe (pin 1) <BR>Busy (pin 11) to nAutoFd 
      (pin 14)<BR>nAutoFd (pin 14) to Busy (pin 11) <BR>Data (pins 2-9) to Data 
      (pins 2-9) <BR>*nInit (pin 16) to PError (pin 12) <BR>*PError (pin 12) to 
      nInit (pin 16) <BR>*nFault (pin 15) to nSelectIn (pin 17)<BR>*nSelectIn 
      (pin 17) to nFault (pin 15) <BR>*SelectIn (pin 17) to Select (pin 13) on 
      both PC A and PC B </P>
      <P>* indicates a connection that isn't essential for data transfer. Pin 
      numbers are for 25-pin D-subs. </P>
      <P><EM>Q: I&#8217;m experiencing some problems with my printer which may be 
      caused by the fact that I do not use a BI-directional cable. I just bought 
      a new cable, but I do not know for sure that it&#8217;s indeed a BI-directional 
      cable. Does anyone have the specs (pin-layout), so that I can check it, or 
      is there another 'trick' to see whether the cable is 
      BI-directional?</EM></P>
      <P>A: The term Bidirectional printer cable is confusing, because all PC 
      printer cables have the same 17 signal lines. A PC with a bidirectional 
      Data port can receive as well as send data over the 8 Data lines. Some 
      printers can use a bidirectional port to send detailed status information 
      back to the PC. But the signal lines are the same.</P>
      <P>All printer cables should have at least 25 wires and be shielded. There 
      are 17 signal lines and 8 ground wires. Some cheaper cables skimp by using 
      just one ground wire, but even the cheap cables usually work OK if the 
      printer doesn't use high-speed modes.</P>
      <P>Some printers support a high-speed ECP mode, and other peripherals may 
      use a different high-speed mode called EPP. A cable labeled 
      "IEEE-1284-compliant" is designed to guarantee performance at ECP and EPP 
      speeds. (Each signal wire forms a twisted pair with its ground return, and 
      the cable has two shielding layers.) These cables might also be advertised 
      as "bidirectional" cables, because ECP and EPP are bidirectional 
      interfaces. But don't confuse this type of cable with a "Laplink" cable, 
      which is used to connect two PCs' parallel ports and is a different animal 
      altogether. Also, some printers and other peripherals support an older, 
      slower bidirectional mode called "PS/2-type."</P>
      <P><EM>Q: Where can I get the new IEEE-1284-C connectors?</EM></P>
      <P>A: These are some manufacturers and part numbers listed in the 
      IEEE-1284 standard:</P>
      <P>PC mount Receptacle</P>
      <P>AMP<BR>2-175925-2<BR>2-176971-5<BR>2-178238-5<BR><BR>3M<BR>10236-52A2VC<BR>10236-5202VC<BR><BR>Molex<BR>52311-3611<BR>52311-3621<BR><BR>Cable 
      Plug<BR><BR>AMP<BR>2-175677-5<BR><BR>3M<BR>10136-6000EC<BR><BR>Molex<BR>52316-3611<BR></P>
      <H2>General Printer Problems</H2>
      <P><I>Q: I am having trouble getting my printer to work. Everytime I try 
      to print a test page I get a three line mess of numbers. I have a 
      Panasonic KX-P4410 LASER PRINTER. I have tried many times to install a new 
      driver for it. I have uninstalled and then installed it again but I keep 
      getting the same getting that same message of some sorts everytime. I am 
      working under Win95 </I></P>
      <P>A: I had a similar problem - a newly installed HP 6MP printer that 
      spewed out a few lines of garbage on every bootup. A search of Dejanews 
      brought up the advice to rename or delete this file: </P>
      <P>\windows\system\iosubsys\drvwppqt.vxd </P>
      <P>&amp; it solved the problem. The file is apparently used by Microsoft 
      Backup. If you don't use Backup, you don't need the file.</P>
      <P><EM>Q: How can I determine printer status (on/off-line, paper out, 
      etc.)?</EM></P>
      <P>A: You can do this with an API call that retrieves a PRINTER_INFO_2 
      structure. To find out how, see article Q160129, <EM>HOW TO: Get the 
      Status of a Printer and a Print Job</EM>, at 
      http//support.microsoft.com/support .</P>
      <P>However, you can read the status only after sending a job to the print 
      spooler: </P>
      <P>"The Spooler does not query for the state of a physical printer to 
      which a Printer is connected. Instead, the state of a physical printer 
      determines the success of a print job at the time it is despooled over the 
      port monitor. If some error occurs in this process, the error is reported 
      by the port monitor and recorded in a print job's status information. The 
      Spooler, in turn, propagates reasonable error information to the Printer 
      Queue. Consequently, a system Printer reports no status when the Printer 
      queue is empty. In this state, the Printer is assumed ready to accept 
      print jobs." </P></TD></TR>
  <TR>
    <TD align=left bgColor=#c0c0c0 borderColor=#ffffff borderColorDark=#ffffff 
    borderColorLight=#ffffff vAlign=top width="20%">&nbsp;</TD>
    <TD align=left bgColor=#ffffff borderColor=#ffffff borderColorDark=#ffffff 
    borderColorLight=#ffffff vAlign=top width="80%">&nbsp;</TD></TR></TBODY></TABLE>
<P>&nbsp;</P>
<P>&nbsp;</P><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -