"Interfacing the IBM PC parallel printer port" - читать интересную книгу автора (Stewart Z.)had everything needed to become bidirectional. The 74LS374 chip has a
chip enable pin which can tristate the 8 data outputs, but it is usually wired to ground to always enable the output drivers. The 74LS174 latch used for C0-C4 is actually a hex latch and processor data bus line 5 is attached to the sixth latch input; that bit IS latched when you write to the Control Out register - but the output (Q6 on the 74LS174) is not used by anything. If you cut the trace from pin 1 (/OE) of the 74LS374 to ground, and connect this pin instead to pin 15 (Q6) of the 74LS174, voila - you have a PS/2 compatible bidirectional parallel port. This only works on the older discrete TTL parallel ports, including the IBM Printer Adapter and at least some clones of that era. One theory is that IBM had a bidirectional port in mind initially, but decided to omit that aspect at the last moment (even while still latching the C5 bit from the processor into the LS174 hex latch). There are now PS/2 compatible third party bidirectional parallel ports. The cost for a TTL bidirectional port should have been identical, but now that parallel ports are done with one LSI chip (or a fraction of one), this will require an appropriate LSI chip. Apparently some of them now have bidirectional ports, some do not. Note that some people have for many years been using the standard (not bidirectional) data out port as an input port. They output data 0xFF, that is, all high. Any pins which are externally pulled low via TTL or switches will probably read as low (0) in the data feedback register, (sourcing current), and tend to "win" when there two drivers fighting on the same line. An external high signal, or no signal, will allow the pin (and data bit) to remain high (1). This is NOT reccommended, as it stresses the 74LS374 (or equivalent) beyond its safe margins and could cause chip failure. However, some people report doing this for years without problem. Note that all recent parallel ports are implemented with single chip LSI controllers rather than the MSI TTL originals, which means that they may have different drive capacities, electical margins, and replacement costs, should you attempt this approach. Sometimes the LSI controller also includes other functions, such as serial ports or a monochrome display port; if it overheats, more than just the parallel port could be damaged. Beware. However, if you have an old TTL parallel port (with a 74LS374 chip, preferably socketed), it may be easy and cheap to replace if that chip should die. I bought TTL parallel port card clones, fully socketed (all chips!), for about $15 mail order about 5 years ago. The bidirectional conversion was a trace cut and a wire jumper. The 74LS374 was easily replaced, if it were damaged or if one wanted a better chip like the 74ACT374. You could even strap it for any base address (including non standard ones, so as not to conflict). I wish I could get more; there must have been scads of these on the market. You may find old TTL printer ports used; latch onto them if you want to experiment with parallel port interfaces (pun acknowledged). |
|
|