This application claims the priority benefit of Taiwan application serial no. 88205924, filed Apr. 16, 1999, the full disclosure of which is incorporated herein by reference.
1. Field of the Invention
This invention relates to a computer interface device for periphery device, and more particularly to a dual purpose printer interface device for a printer and a joystick to a host computer, in which the dual purpose printer interface device is used by the printer or the joystick to immediately perform their function once they are plugged in.
2. Description of Related Art
Currently, it is a trend to fabricate a personal computer (PC) to be a greatly reduced dimension with, for example, light, thin and small properties. A portable PC, such as a notebook PC has been a common commercial product already, in which a sub-notebook PC or even a palm PC are also available in the current portable computer products. Even though most of functions of the desk computer are transferred to the portable computer, the portable PC lacks a connector for a joystick, which is commonly used to play computer games in the desk PC. That is because the portable PC is limited by its greatly reduced dimension, resulting in an insufficient space to accommodate a joystick by providing, for example, extra 15 pins for joystick connection. So far, the portable PC usually has no individual connector for the joystick even though the joystick is also fabricated with a reduced size. One conventional solution is that the control functions are installed in the keyboard, typically, on those rare used or even often used keys. This method disturbs the normal functions of the keyboard and also causes an inconvenient use to control the moving direction. Another solution is further proposed as described in U.S. Pat. No. 5,513,302, which provides an interface device with a basic input output system (BIOS), serving as a switch, commonly used by a printer and the joystick. This method needs an action to switch operation modes between driving the printer and the joystick. It may also cause a certain degree of inconvenient use.
FIG. 1 is a block diagram, schematically illustrating a conventional printer interface between a printer and a portable computer. In FIG. 1, a printer interface 10 includes a connector 16 that typically has 25 pins, a printer data register 11, a printer control register 12, a printer status register 13, an address-decoder and read/write controller 14, and a bus driving means 15. The printer data register 11 includes eight connecting lines PD0-PD7. The printer control register 12 has four connecting lines: STROBE (STB), AUTO FD XT (AFD), INIT and SLCTIN (CLIN). The printer status register 13 has five connecting lines: ACK, BUSY, PE, SLCT, and ERROR (ERR). The these three registers 11, 12, and 13 are electrically connected to the connector 16, and each of the registers 11, 12, and 13 separately receives an address signal from the address-decoder and read/write controller 14, which also communicates with a potable host computer through address lines AS0-SA9, and two input/output (I/O) lines IOR and IOW respectively for read and write. The host computer 17 also communicates with the bus driving means 15, which is connected to the printer data register 11.
FIG. 2 is a block diagram, schematically illustrating a conventional joystick interface device. In FIG. 2, the host computer 17 of FIG. 1 sends an address to a address decoder 23 through the address lines SA0-SA9, which is decoded into an enable signal GMCS. The GMCS is compared with an I/O read (IOR) signal and an I/O write (IOW) signal to separately produce a GMRD signal and a GMWR signal. The GMCS signal determines which signal is enabled. If the GMWR signal is enabled, it is sent to an one-shot circuit 22 to first clear voltage set values for the X-axis and Y-axis of a joystick and then start. The one-shot circuit 22 serving as an game interface is coupled to a game port 21 through a resistor PR3 on four output lines T/A-T/D, which are also respectively coupled to grounded capacitors C5-C8 before the resistor PR3. As a result, a RC circuit is formed and is coupled, in series, to the variable resistors (not shown) for the X-axis and Y-axis of the joystick, which is connected on the game port 21. The charges are gradually accumulated, resulting in a raise of voltage as shown in FIG. 3. FIG. 3 is a voltage waveform, schematically illustrating the voltage levels of several control signals varying with the time. In FIG. 3, the voltage level of the TA/TB signal gradually rises at time periods C and D, which are also the time periods for game reading operation controlled by a signal D0/D1. Once the TA/TB reaches a preset voltage value, the one-shot circuit 22 (FIG. 2) is triggered and the TA/TB voltage level is reset to zero.
The variable resistors of the joystick can be changed by shifting its X-Y location. By the actual resistance of the variable resistor, the rising slope of the TA/TB is changed. A small shift distance of the joystick causes only a little change of the variable resistance, causing a larger rising slope. The one-shot circuit 22 therefore needs a shot time to be triggered. On the contrary, if the X-Y location shift is large, the trigger time is accordingly long. The trigger time usually varies within a few milliseconds of difference. During the trigger time, the GRMD of FIG. 2, continuously exports, such as one per few hundred ns, and reads and accumulates the status of the one-shot circuit 22. Before the one-shot circuit 22 is triggered, all read status are equal to 1 so that the actual shifted distance of the joystick can be estimated. In this conventional method, the one-shot circuit 22 has to send its data of the joystick shift to a computer bus through a bus driving circuit 24.
Due to a fact that the current portable computers have no extra space to provide 15 pins for uses of the joystick, how to make use its current available connector for multiple uses so as to include, for example, the function of the joystick is a developing goal. In the U.S. Pat. No. 5,513,302 as mentioned above, the printer connector can be shared with the joystick but it needs a switch action for each time of change. This still gives a little inconvenient as is, so called, user unfriendly.
It is at least an objective of the present invention to provide a dual purpose printer interface device, which is used by a printer or a joystick to immediately perform their function once they are plugged in. Whether the printer or the joystick are automatically recognized and a desired operation mode is automatically switched by the device.
In accordance with the foregoing and other objectives of the present invention, a dual purpose printer interface device is provided. The dual purpose printer interface device includes at least a printer connector with several pins, a printer interface, a joystick interface, a power generator, a mode selection circuit and a selection device.
The printer connector is used to connect to a printer. The printer interface is used to transmit desired data from a host computer to the printer for printing and printer control signals to the printer. The printer also responds a printer status signal to the host computer through the printer interface. The joystick interface is used to receive action signals from a joystick and accordingly export signals to the host computer. The power generator provides a power source for the joystick. The selection device further includes a first selector and a second selector. The first selector is connected to the host computer, the printer interface, and the joystick interface so that the first connector can connects one of the printer and the joystick to the host computer according to a mode selection signal. The second selector is coupled to the printer connector, the power generator, the printer interface, and the joystick interface so that the printer connector is selectively connected to the printer face, the joystick interface, and the power generator according to the mode selection signal. The mode selection circuit is coupled to the printer connector at some of its the pins, which preferably are those usually grounded pins, to produce the mode selection signal, which is sent to the first selector and the second selector of the selection device.
In the foregoing, the printer interface further includes a printer data register, a printer control register, and a printer status register so as to temporarily register all needed information for the communication between the host computer and the printer. The first selector further includes a first multiplexer and a switch circuit so as to achieve its switching function. The first multiplexer can selectively connect the host computer with either the printer interface or the joystick interface according to the mode selection signal.
The second selector further includes a second multiplexer and a third multiplexer. The second multiplexer, according to the mode selection signal, receives the data from he printer data register and transmits the data to the printer connector. The third multiplexer receive the control signals from the printer control register and transmits the control signals to the printer connector also so as to control the operation of the printer.
Moreover, if the mode selection signal determines an operation mode for the joystick, the second multiplexer receives signals from the joystick through the printer connector and exports the signal information to the joystick interface. The third multiplexer receives a power from the power generator so as to provide the necessary power to the joystick through the printer connector. For example, the joystick typically has an adapter with 15 pins, which can be converted into the type of the printer connector with several pins, such as 25 pins, through a connector converter.
The mode selection circuit includes a gate logic circuit, which is coupled to some pins of the printer connector so as to properly produce the mode selection signal. The connected pins are also connected to a voltage source Vcc through pull-up resisters. Since the pints 18-25 are usually grounded for a normal use of the printer. The connected pins are preferably the 18th and the 25th pins as a preferred example. The actual connection of the pins is changeable depending on the actual need of operation. The joystick can also replaced by other periphery device, in which case the joystick interface is necessary to be accordingly modified.
In conclusion, the invention uses the mode selection circuit to automatically select the desire operation mode so that once either the printer or the joystick are plugged into the printer connector the mode selection circuit automatically generate the proper mode selection signal to switch the operation mode. Users can just simply plugs in the printer or the joystick as thy want without any further action to switch the operation mode.
USPTO Backgrounds
USPTO Backgrounds