{"id":290,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:17","modified_gmt":"2020-08-22T20:26:17","slug":"this-is-the-page-title-toplevel-125","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=290","title":{"rendered":"Parallel Ports"},"content":{"rendered":"\n<title>Parallel Ports<\/title>\n<p>\nParallel ports are a common way printers are attached to an Linux system.\nAlthough many different problems arise  with printers attached to parallel\nports, not many issues arise with parallel ports themselves.\n<\/p>\n<p>\nFirst, lets take a look at how parallel ports work.\n<\/p>\n<p>\nOne key difference between a parallel and <glossary>serial port<\/glossary>\nis the way data is sent. From our discussion of serial ports, you know that data\ngoes across a serial line one bit  at a time across a single data line. Parallel\nports send data across a byte (eight bits) at a time across eight data lines.\n<\/p>\n<p>\nAnother key difference is the cable. Looking at the computer end, you can\neasily  confuse the cable with a  serial connector. Both have 25 pins in the\nsame layout. On the printer end, though, things are different. There is a\nspecial kind of 36-pin connector called a <i>Centronics <\/i>connector, named\nafter the printer manufacturer Centronics. A cable that has a 25-pin\n<i>D-shell<\/i> connector on one end and a 36-pin on the other is called a\nCentronics or parallel cable. (see Figure 0-14) Unlike serial cables, there are\nnot different kinds of cables (like straight-through or crossed). Because of\nthis, all you usually need to do is to plug in the cable at both ends and\ngo.\n<\/p>\n<p>\n<img decoding=\"async\" src=\"centron.png\" width=409 height=96 border=0>\n<p>\nComparison of Centronic and DB25 Connectors\n<\/p>\n<p>\nAlthough some devices allow communication in both directions along a parallel\nport, Linux does not support  this communication. In fact, the only thing that\nLinux directly supports on parallel ports are printers.\n<\/p>\n<p>\nBecause there is no guarantee that all the data bits arrive at the port at\nthe  same time, there must be some  way of signaling the printer that the data\nis ready. This is done with the <i>strobe<\/i> line. Once a character (or any\nbyte of data) is ready, the system sends a <glossary>signal<\/glossary> along the\nstrobe line. Using the strobe line also prevents characters from being read more\nthan once.\n<\/p>\n<p>\nOften, the printer cannot keep up with the data flow from the parallel port.\nJust like RTS-CTS <glossary>flow control<\/glossary> on a <glossary>serial\nport<\/glossary>,  parallel ports also need a way to be told to stop. This is\ndone with the <i>busy<\/i> line. Actually,  the busy line is set after each\ncharacter in case the printer cannot process the character fast enough. Once the\ncharacter is processed, the printer can turn off the busy\n<glossary>signal<\/glossary>.\n<\/p>\n<p>\nHowever, this is not enough to get the parallel port to send the next\ncharacter. The printer must first  tell the parallel port it has received the\ncharacter by sending a <glossary>signal<\/glossary> along the acknowledge\nline. Note that this acknowledge occurs after <em>every<\/em> character.\n<\/p>\n<p>\nThe printer also uses other control lines. One is the <em>select<i>,<\/i><\/em>\nwhich indicates that the  printer has been selected or is on-line. There is also\na special line that indicates when the paper source is empty. This is the\n<i>paper empty<\/i> line. If the problem is unknown, the printer can send a\n<glossary>signal<\/glossary> along the <i>fault <\/i>line that says that\n&#8220;something&#8221; is wrong.\n<\/p>\n<p>\nOne thing that comes up regularly is the confusion about which physical\nparallel port is related to which lp device. For your parallel ports to work\ncorrectly, you must configure them according to Table 0-5.\n<\/p>\n<p>\nTable -5 Default Parallel Port Devices\n<\/p>\n<p>\n<center>\n<table BORDER cellspacing=2 bordercolor=\"#000000\" cellpadding=7 WIDTH=374>\n<tr><td>Device name&#9;<\/td><td>Address<\/td><td>IRQ <\/td><\/tr>\n<tr><td>\/dev\/lp0&#9;<\/td>          <td>   0x378<\/td><td>7<\/td><\/tr>\n<tr><td>\/dev\/lp1&#9;<\/td>          <td>   0x3BC<\/td><td>7<\/td><\/tr>\n<tr><td>\/dev\/lp2&#9;<\/td>          <td>   0x278<\/td><td>5<\/td><\/tr>\n<\/table><\/center>\n","protected":false},"excerpt":{"rendered":"<p>Parallel Ports Parallel ports are a common way printers are attached to an Linux system. Although many different problems arise with printers attached to parallel ports, not many issues arise with parallel ports themselves. First, lets take a look at &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=290\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-290","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/290\/revisions"}],"predecessor-version":[{"id":649,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/290\/revisions\/649"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}