Article 10179 of comp.misc: Xref: utkcs2 comp.misc:10179 comp.sources.wanted:12676 comp.sys.ibm.pc:2556 Path: utkcs2!memstvx1!ukma!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!munnari.oz.au!metro!tplrd!markb Newsgroups: comp.misc,comp.sources.wanted,comp.sys.ibm.pc Subject: Here it is : Bidirectional Parallel I/O ! Message-ID: <1991Jul9.035642.22133@tplrd.tpl.oz.au> From: markb@tplrd.tpl.oz.au (Mark Bower) Date: 9 Jul 91 03:56:42 GMT Sender: markb@tplrd.tpl.oz.au (Mark Bower) Organization: Telectronics Pacing Systems Keywords: IBM PC, printer port I/O Summary: Mods to make parallel port read and write Lines: 249 MAKING YOUR PC PARALLEL PORT BI-DIRECTIONAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By Mark F. Bower I have had a large number of requests for this information so here it is. Disclaimer: Doing this modification may void you warranty on your computer components, and I take no responsibility for any damage that mey be caused by making this modification. Introduction: ~~~~~~~~~~~~~ This simple modification allows a standard IBM PC type parallel port to be used as a bi-directional 8 - 12 bit I/O port for use in applications such as control, sensing, monitoring, and high speed data trasfer. WARNING: Do NOT attempt to read data in from the parallel port using a (non modified) a standard printer port card. The LS373/374 octal buffer can sink current and may overheat if this is done. The 4 handshake lines are also open collector outputs. Requirements: ~~~~~~~~~~~~~ o 1 piece of insulated copper wire (1 - 2 inches long). o Soldering Iron. o Solder, maybe some de-soldering wick. o A sharp tool for cutting PCB tracks. o A TTL data book is handy. o A parallel printer port schematic helps. o A digital multimeter for testing. o An IBM type parallel printer card - either an original single card or multi- function card. It may be possible to modify other types of parallel ports since most are of similar design (in PC's). However, special cards that use a single VLSI controller chip to perform the functions of the entire multi-function card may not be modified (of course!). Note: Laptop computers generally have a bi-directional parallel printer port - note however that these bi-directional port use open-collector outputs on the parallel data bus which may require pull-up resistors if they are to be connected to a 'standard' modified port for data trasfer. Method: Hardware mods ~~~~~~~~~~~~~~~~~~~~~ The following step are meant as a guide to performing the modification. When handling circuit cards, be aware that static electicity and carelessness can easily cause damage - be extra careful and patient when working on them! NOTE: The LS abbreviation may be F, L, or HC in you printer card. 1. Remove the parallel printer card/multi I/O card from the PC. 2. Locate the IC named 74LS374 (on standard PC printer port cards) or 74LS373 (multi I/O cards). If there is more than one of these IC's, select the one which connects to pins 9 to 2 of the 25 pin printer port connector. On the IBM PC printer schematic this is U4. This IC is an octal buffer. 3. Pin 1 of this IC (the output enable pin) should be currently tied to ground (on the underside of the board). Cut the track at pin 1 so that it is now NOT connected to ground. (alternatively it my be possible to cut pin 1 and bend it up - this is not recommended however). This pin was originally connected to gound. In this configuration, the LS373/374 was hard wired to OUTPUT mode. 4. Now locate the IC named 74LS174. This IC (a hex latch) is connected to pins 1,15,14, and 16 of the 25 pin printer connector through either a 74LS05 (IBM PC printer card) or a 74LS06 (multi I/O card) invertor. NOTE: Both the LS373 and LS174 IC's are also connected to the Address/ Data bus on the card through a LS243 IC. 5. This IC (LS174) is a hex latch. In the IBM printer port design, only 5 of the 6 available latches are used. The state of the sixth latch can be controlled in software, and by attaching its output to pin 1 of LS373, we can control the direction of data by toggling a single bit. 6. To determine which D flip flop is not used, trace the outputs from the LS174 (use a TTL/LS data book for a pinout of the chip) and see which one does not connect to the 74LS05 or 74LS06. On the standard PC printer adapter, pin 15 of the LS174 was not connected (the input from the data bus should already be connected (on pin 14 in this case). If it is not, then another wire jumper connected may be necessary). 7. Now solder a piece of insulated wire from pin 1 of the LS374/373 to the output of the unused D flip flop (e.g. pin 15 in this case). The printer port should now be configurable to be readable and writeable. (Notes: This only works because the original printer port could read the data back that it just printed. When data was sent to the printer, it passed through LS373 and onto the connector pins and was also stored in the LS244 latch - this data was then re-read by the printer software to ensure that the data that appeared on the pins was correct. Unfortunately, you could not read data that came in from the printer port connector because the octal buffer was hard wired for output. Using this modification, the octal buffer can be read (rather than written) and the data that is latched from this printer port connector can be read by the system). Compatibility ~~~~~~~~~~~~~ When the computer is powered on as normal, the BIOS should initialise the printer port to be in output mode (0 in the direction register). Therefore, all software should work as normal - printing operations will work as before. If custom software alters the direction register, then some software may have problems printing (a printer not ready signal or paper out error may be generated). This can be resolved by either clearing the data direction register (use debug for example) or by resetting the computer. Software Interface: ~~~~~~~~~~~~~~~~~~~ To use this 8 bit I/O port for data trasfer the following software can be used. This assumes that the parallel printer port is located at 378 hex. If this os not the case, subtract the suitable value (e.g. 100h for a printer as 278 hex) from the register addresses. 1. Setting the port for output mode (normal printer output): Clear bit 6 of the data direction register (formerly unused) at 37A (hex). e.g. i = inportb(0x37A); outporb(0x371, i & 0xDF); /* output mode */ or outporb(0x37A, 0); 2. Setting the port for input mode: Set bit six of the data direction register at 37A (hex). e.g. i = inportb(0x37A); outportb(0x37A, i | 0x20; or outportb(0x37A, 0x20); 3. Sending 8 bit bytes to the port (output): Send the data to 378 (hex) e.g. outportb(0x378, 0xAE); /* send 0xAE over port */ 4. Reading 8 bit bytes from the port (input): Read data from 378 (hex) e.g. x = inportb(0x378); /* read data from port */ 5. Hardware handshaking - essential for any communications: For successfull communiucations, some sort of hardware handshaking is required, This requires a couple of extra lines in you connection cable. For example, the ACK and STROBE lines can be used to signal data ready between two systems. An example is an A-D convertor on the port. To sample a value, send a pulse on the strobe line (or any oth spare line), wait for an interrupt (acknowledge/sample taken) from the A-D and then read it from the port. e.g. to send pin 14 of the connector high (and set input mode at the same time): outportb(0x37A,0x28); e.g. wait until pin 14 of connector is low : while (inportb(0x37A) & 0x08) == 0) ; Pinouts: ~~~~~~~~ Name Pin -Strobe 1 < +Data 0 2 <> \ +Data 1 3 <> | +Data 2 4 <> | +Data 3 5 <> |- now bidirectional +Data 4 6 <> | +Data 5 7 <> | +Data 6 8 <> | +Data 7 9 <> / -Acknowledge 10 > +Busy 12 > +Paper out 13 > +Select 14 > -Auto Feed 15 < -Error 16 > -Initialize 17 < -Select input 18 - 25 Ground 2 - = active low, + = active high. > from printer/other computer < from printer adapter Comments: ~~~~~~~~~ People who wish to attempt to use this modification to construct a parallel port SCSI interface should have a look at the Tiny Tiger SCSI hard drive interface which is used on the Commodore Amiga 500 and 1000 computers to provide a SCSI hard-drive interface. I am in no way connected with the manufacturers of Tiny Tiger. Any followups, extensions, or developments : email me any time. Please email me if you have success with this modification - I've done it and it works. Cheers, Mark | /\ ------------------------------------------------------------|/ \ /----------- Mark F. Bower. (markb@tplrd.tpl.oz.au) || \/ Design Engineer, || "Synchronize watches! - 11.45!" Telectronics Pacing Systems R & D. || "2.33!" 7 Sirius Rd, Lane Cove 2066, || "7.54!" Australia | Phone (Voice) 413 6913|| "Perfect, lets go!" - Maxwell Smart ------------------------------------------------------------------------------- Article 1524 of comp.protocols.misc: Newsgroups: comp.protocols.misc Path: utkcs2!gatech!taco!garfield.catt.ncsu.edu!kdarling From: kdarling@garfield.catt.ncsu.edu (Kevin Darling) Subject: Microsoft Mouse protocol answer Message-ID: Lines: 20 Sender: news@ncsu.edu (USENET News System) Organization: North Carolina State University Date: Wed, 22 Apr 1992 11:24:55 GMT briana@tau-ceti.isc-br.com (Brian W. Antoine) writes: > I have found docs showing the 5 byte format for Mouse System Mice, > but have had no luck on the 3 and 4 byte [Microsoft] packed format They send 7-bit data (I believe if you leave the port at 1200 baud, 8-bit, no parity, you can just lop off bit 7 on received bytes). Like the Mouse System formats, the motions are signed relative (altho the Y direction is reversed from Mouse Systems (?)). Bit No 6 5 4 3 2 1 0 Byte 1 1 L R Y7 Y6 X7 X6 Byte 2 0 X5 X4 X3 X2 X1 X0 Byte 3 0 Y5 Y4 Y3 Y2 Y1 Y0 If it's a 3-button mouse, then the middle button can cause a fourth byte to be sent: Byte 4 0 M 0 0 0 0 0 Sorry for response delay, and Luck! - kevin Article 5369 of alt.comp.hardware.homebuilt: Path: cs.utk.edu!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!newsjunkie.ans.net!news0.cybernetics.net!dancon.cybernetics.net!dtrinh From: dtrinh@cybernetics.net (Danh Trinh ) Newsgroups: alt.comp.hardware.homebuilt Subject: IBM PC Parallel Port Interfacing Kits for Sale Date: Mon, 27 Mar 1995 14:19:43 +1000 Organization: Cybernetx, Inc. Lines: 47 Message-ID: NNTP-Posting-Host: dancon.cybernetics.net X-Newsreader: Trumpet for Windows [Version 1.0 Rev B] Parallel Port Interfacing Kits for Sale ----------------------------------------------------------- I've assembled 99 of the following kits to make it easier to prototype designs with the IBM PC Parallel Port. Each kit includes the following parts: - A standard 8-bit parallel port adapter card. The card has 3 jumpers which lets you select the card's address for Hex 3BC, Hex 378, or Hex 278 (these are the standard LPT1 through LPT3 locations). Two other jumpers are for the IRQ5 or IRQ7 selection. Note: the card is not bidirectional. - A 4" by 5" single-sided fiberglass protoboard with a black silk screen. On the left side of the board are holes for a 36 pin Centronics printer connector. Just to the right of these holes are another set of holes organized into ports n+2, n+1, and n. The remainder of the board is a huge prototyping area with gnd and +5V power rails. There are also holes for a 7805 5 volt reguator, 2.1mm AC/DC transformer jack, and holes for capacitors. All of these locations are clearly labeled with a black silkscreen image. - A 6-foot long Centronics type printer cable to connect the protoboard to the parallel port adapter card. - A 500mA 9V AC/DC wall transformer with a 2.1mm plug that connects to the protoboard to supply power. - All the supporting components for the protoboard consisting of a 36 pin Centronics style printer connector, a 7805 5V regulator, a 2.1mm AC/DC jack, a 10uf capacitor, and four 3/4" aluminum board spacers with screws. - Instructions on how to assemble and test the board. I made this board so that it would be easier to prototype designs using wirewrap. The only things missing are the wirewrap sockets, headers, and your design : - ) I have all the parts for a total of 99 kits ready for shipment immediately. Each kit is $45 plus $5 for US shipping. NC residents, add tax : - ( If you're interested please drop me some email at dtrinh@cybernetics.net Danh dtrinh@cybernetics.net Article 2547 of alt.sys.pc-clone.micron: Path: cs.utk.edu!cssun.mathcs.emory.edu!emory!gatech!udel!news.mathworks.com!panix!not-for-mail From: schuster@panix.com (Michael Schuster) Newsgroups: comp.sys.ibm.pc.hardware.comm,comp.sys.ibm.pc.hardware.misc,alt.sys.pc-clone.dell,alt.sys.pc-clone.zeos,alt.sys.pc-clone.micron,alt.sys.pc-clone.gateway2000,comp.periphs,comp.periphs.printers Subject: Re: EPP parallel port Date: 24 Mar 1995 18:05:26 -0500 Organization: Public Access Internet & UNIX Lines: 47 Distribution: inet Message-ID: <3kvj7m$ste@panix3.panix.com> References: <3kv9ib$krf@ni1.ni.net> NNTP-Posting-Host: panix3.panix.com Xref: cs.utk.edu comp.sys.ibm.pc.hardware.comm:9320 comp.sys.ibm.pc.hardware.misc:25519 alt.sys.pc-clone.zeos:1872 alt.sys.pc-clone.micron:2547 alt.sys.pc-clone.gateway2000:20166 comp.periphs:9863 comp.periphs.printers:23968 In article <3kv9ib$krf@ni1.ni.net>, John Richardson wrote: > >Hi, > >After having some trouble locating an I/O card that supported >EPP for my PC (as much due to salesmen that were not familiar >with EPP as my not being familiar with EPP), I am trying to >compile a list of PCs or I/O cards that support it. >I know this will be a re-occurring issue for me. > >If there is a FAQ that contains this information, please >let me know. Or if you know any PCs that support this >on the motherboard, or any add-on cards that support this, >please let me know. > >So far, I have heard of >SIIG CN2405 HighSpeed I/O Controller, but >it also contains several other high speed ports >which makes me think there might be a more >efficient solution (price wise) out there. Many of the Taiwanese cards use a buggy version of the SMC 66QFP VLSI chip which is essentially useless. Give a call to the nice folks at Farpoint Communications. They make three ISA-bus i/o cards having differing assortments of functions. These use the new SMC chipset and are reputed to work well and be backed by excellent tech support. I'm just about ready to buy, having messed with the no-names ad nauseum and gotten absolutely nowhere: voice: 805-726-4420 fax: 805-726-4438 Models: F/Port: software configurable EPP card F/Port Plus: EPP/ECP plus one 16550A serial port F/Port IDE: IDE/floppy/EPP-ECP/2 16550 serial/game For an excellent discussion of this stuff look at Parallel Technology's utilities (PARA145.ZIP is current) in the ioutils section of any SimTel mirror. -- Mike Schuster | schuster@panix.com | 70346.1745@CompuServe.COM ------------------- | schuster@shell.portal.com | GEnie: MSCHUSTER