TSR555.TXT

1. There are disabled people who can only communicate with the outside world through a not manually activated PC
keyboard. For their use I have constructed PC interfaces, controlling AC power switches, TV remote control units and
other household appliances. At first I used the IBM DAC, but now I use low priced 48 channel I/O adapters. I replace AC
power switches by SSR's, and control TV remote control unit keyboards and the like by reed relays.

2. When one of my clients got a job as a typist, I interfaced a Dutch designed portable lightbeam/fototransistor
operated PC keyboard with the office PC. His main task however turned out to be the transcription of tape recorded text.
This was a problem since he cannot move a limb, and the Philips LFH555 Transcription System can only be operated either
manually or by footswitch. I was then asked to build an interface, but the proposal containing an I/O adapter was turned
down because of portability and 'computer warranty' problems. A second design using a serial interface was considered to
costly. I therefore had to find a way to use the printer port, that however already had a printer attached.

3. There is a documented use of the parallel printer adapter port for other purposes than printing. The known interfaces
for model trains and slide projectors all require the exclusive use of the port. I realised that there had to be a way to
use the port together with a printer, since printer transparent software protection keylocks (dongles like Protech) use
it for their Q&A purposes.

4. I studied a hardware specification of the parallel printer adapter in Micro Cornucopia, the IBM BIOS listings and a
few printer manuals. DB25 pin 17 turned out to be the clue: the status of the pin is controlled by baseport+2 bit 3, read
and write, BIOS POST sets it low, as does interrupt 17H upon printer communicating, and printers either always connect
this pin to ground or do not connect it at all.

5. The first prototype I have build led pin 17 via a 22 K resistor to the base of 3 NPN transistors, with pin 2, 3 and 4
(D0, D1 and D2) connected via optocouplers to the collectors and pin 19 (signal ground) to the emitters. The footswitch
pins 4, 5 and 6 where connected to the collectors of the PNP transistors of the optocouplers and the footswitch pin 2
(gnd) to the emitters. Except for pin 17, all the DB25 pins were connected to both PC and printer.

6. I wrote a short TSR program that intercepts keyboard interrupt 9H, executes the original interrupt 9, turns off or on
pin 2-4 when one of 4 hotkeys (rewind, stop, play and forward) is available in the keyboard buffer, resets the keyboard
buffer pointers to erase the hotkey and returns from interrupt. The program worked fine with all MSDOS wordprocessing
software. Cooperation with Microsoft Windows could not be achieved.

7. Both interface and program worked fine with most printer ports, but since pin 2 and 4 turned out to be less potent
then pin 3 on some computers, the 22K resistor had to be reduced to 15K. With some computers another problem demonstrated
itself only at computer power up. A lack of tri-state logic in the parallel port adapter, open collector design with pull
up resistors to 5 volt on inverted printer control pins, and the use of the PC bus data lines for both adapter data and
control registers led to the unprovoked switching of the LFH555 footswitch port. Both pin 17 and one ore more of the pins
2-4 where set high immediately following PC power on. Only after the BIOS POST had accomplished initialization of the
parallel adapter port, things where as they were supposed to be. 

8. In the known specifications of the parallel printer adapter Pin 9 (D7) does not share a PC bus data line with any of
the pins that are controlled via the parallel printer port control registers. In the second prototype I therefore
connected pin 9 to another optocoupler and then to a 4th NPN transistor collector with pin 17 at base and pin 19 at the
emitter, and so used it to switch the footswitch ground. This worked fine with all computers, except for one that was
equipped with an Hercules brand video/printer adapter, which pulled pin 9 high at power up.

9. The final solution turned out to be pin 14 (auto linefeed XT, another obsolete pin with modern printers). This pin is
pulled high during power up; after POST it is low. Using it to control pin 17, I connected it via a 680K Ohm resistor to
the base of a PNP transistor, with pin 17 at the emmitter and the 15K resistor etcetera at the collector. As a result,
the interface is only activated at command.

10. Since there is no power supply available in the parallel printer adapter port, the optocoupler switches off during
printer communication.

11. The currents in the interface are well below 1 mA and within specification. If necessary, currents can be further
reduced by the use of CMOS components.

12. Using a 2 layer 50*35mm PCB the interface can be easily fitted into a dongle case; in my prototypes I put the
components on a 1 by 2 cm's PCB and soldered about 50 wires between 2 DB25's and then fitted these in the casing of a
gender changer.

13. Upon completion of this project, I considered and turned down the idea of 'mass' procudtion, since I'm not in the
business of catering to able people, and also because my 1 man firm cost of production would be ten times that of a the
price of a ordinary  footswitch. I then offered the idea to Philips Vienna. Their  conclusion was that it worked well,
but hampered with a printer switching device (two or more pc's to one hp laserjet; - I figure the cause is in the
disconnection of the Select_In line). They also told me that they were already developping a serial device. 
So it was a no sale again!

14. I have no further use for the idea, but maybe someone else?

15. Marcel Claessen, Rotterdam, 28/01/1992
