METHOD AND APPARATUS FOR COUPLING TWO
PERIPHERALS TO AN ELECTRONIC DEVICE THROUGH
THE SAME INPUT/OUTPUT PORT
Field of the Invention The present invention relates to electronic peripherals and interfaces, and more particularly to methods and apparatus to facilitate sharing of the same port by two peripherals. Still more particularly, the present invention relates to computer systems and the sharing of the same port by two peripherals.
Background of the Invention Electronic equipment such as computers, stereos, multimedia game players and other home entertainment devices is ubiquitous in the modern household. Users often communicate with their electronic devices, particularly computers, through peripherals such as keyboards, mice or joysticks. Recently, multimedia personal computer ("PC") systems have been widely used. Figs. 1 and 2 illustrate a popular setup of a current multimedia PC system 10.
Generally, the system includes a PC workstation 12, and a number of internal and external peripherals, including: a monitor 14, a keyboard 16, a mouse 18, a printer 20, a hard drive 22, a floppy disk drive 24, a CD-ROM drive 26, television and/or radio receivers 28, a microphone 30, speakers 32, a fax/data modem 33 and other optional internal and/or external peripherals 34 and 35 for the more advanced users (e.g., a document scanner 36, a video camera for video conferencing (not shown), etc.). The PC workstation 12 also includes a main circuit board commonly referred to as a "motherboard" (not shown) containing a central processing unit (e.g., a Pentium processor from Intel Corporation) and other necessary memory chips, control processors and interface hardware and firmware (collectively referred to as controller/processor 38) to which all the peripherals, internal or external, are connected. The peripherals are connected to the motherboard either directly, or indirectly via additional circuit boards (generally referred to as "cards") coupled to the motherboard. Specifically, the motherboard has a number of defined cable connections to internal peripherals such as diskette and disk drives; a limited number of general purpose external ports, including serial ports and parallel ports for external devices such as printers, scanners and the like; and a limited number of general purpose ports (e.g. , COM ports) for accepting dedicated function cards, such as an internal modem card. All functions of the PC system 10 are controlled by system as well as application software and firmware loaded in the PC workstation 12.
As one can appreciate from Figs. 1 and 2, the large number of peripherals take up a large number of internal and external ports. With computer peripherals designed to be more useful and functional at increasingly lower prices, users may wish to include in their multimedia systems additional storage and I/O devices, such as an optical disk drive 37 for archiving data, a special function joystick 39 for advance game playing and a hand-writing recognition tablet. Given the limited number of ports available on a particular computer system, it may not take very long before the system runs out of spare ports.
New models of PC systems may be designed to provide for more ports. Further, there have been PC systems designed with ports that can be shared by I/O peripherals, for example through the use of ACCESS bus devices and USB (Universal Serial Bus) devices. These, however, all require new hardware designs (e.g., a new motherboard). Alternatively, I/O cards may be added to existing motherboards. This approach, however, affects system performance and consumes system resources (e.g., interrupt IRQs out of a limited number of IRQs are taken up). Existing users would have to either upgrade to a new model, buy add-on I/O cards, or live with the limitations.
To alleviate some of the problems associated with adding I/O peripherals and port limitation, software driven on-screen user I/O interfaces have been being used. For example, in the middle of a word-processing task, the user can click on an icon to pop¬ up on the display a volume bar window for on-screen control using the mouse the volume of the speakers (an user input), or, for systems with integrated telephony feature, can be interrupted by a pop-up message indicating that a new voice mail has been received by the computer system (a system output). For those who have experienced working with this sort of interfaces, one readily appreciates that it requires the user to take several steps to input user command to the system (e.g., to pop-up volume bar and select volume). Moreover, the user may be required to take additional step or steps to remove the pop-up message, before being able to take further steps to pop-up additional windows for user input (e.g., to remove a voice mail waiting message and then to pop- up a new window to work the voice mail functions.) Needless to say, the display monitor must be on in order for the on-screen user interfaces to be useful. Power saving features such as screen saver or system suspend mode would hide the system message. When a user returns to her PC after leaving it unattended for a period of time, she
would have to at least resume normal operation of the system, including the monitor, at full power before she can even tell if there is a voice mail message waiting.
It is therefore desirable to be able to add additional I/O peripherals to the PC system without taking additional ports, and to do so in an efficient manner and without modifications to existing hardware.
Recently, the control of computers, through wireless keyboards, wireless mice, and other wireless remote controls has become popular. It is likely that other types of wireless peripherals will similarly become widely used. Despite the proliferation of wireless peripherals, it is still desirable to have peripherals that are coupled to an electronic device by a wire. Wires provide a relatively error-free and reliable communication path between a peripheral and an electronic device, whereas wireless communications are subject to various conditions, such as a barrier blocking the path between the transmitting peripheral and its associated receiver, that corrupt or otherwise interfere with data transmission. For this reason, rather than replacing wired peripherals with wireless peripherals, it is becoming increasingly common to provide both wireless and wired peripherals with an electronic device.
The current mechanisms for coupling both wireless and wired peripherals to an electronic device are inefficient. According to these mechanisms, each peripheral is coupled to the electronic device through a separate input/output port. Since the number of such ports on an electronic device is limited, the use of an additional port is a significant drawback in the prior art.
Further, many computers currently being used by consumers have only one spare port. To add a wireless peripheral to these systems requires the use of this port, thereby eliminating the ability to interface other peripherals, such as modems or scanners, through this port. The present invention overcomes the limitations of the prior art by efficiently coupling a wireless and a wired peripheral to a computer or other electronic device through the same input/output port. In addition, the present invention provides backward compatibility by allowing computers currently being used by consumers to be easily modified to interface two peripherals through the same port.
Summary of the Invention The present invention overcomes the limitations of the prior art by efficiently coupling two peripherals to an electronic device (e.g., a computer) through the same port. This allows additional input and output features to be implemented without taking up a valuable port. In addition, the present invention provides backward compatibility by allowing existing devices currently being used by consumers to interface two peripherals through the same port without requiring any hardware modifications to the host electronic device.
In one embodiment of the present invention, a first I/O peripheral (e.g., a mouse) is coupled to share its existing port with a second peripheral which has defined
I/O functions (e.g., multimedia function controls) and a built-in port sharing feature. The priority of data transmission from these peripherals to the host computer is set to avoid data collision. The characteristics of the data stream of one of these peripherals are efficiently made used of to set a priority scheme priority of data transmission along a common data line to a common port. In this way, an additional peripheral may be used to control the function of the electronic device without the need to connect such peripheral to its own separate port on the electronic device.
In another aspect of the present invention, the hardware connection to facilitate the port sharing function is external of the host electronic device and the first peripheral. In this way, no hardware modification to the host electronic device and the first peripheral would be required.
In another embodiment of the present invention, a wireless peripheral, such as a wireless mouse, transmits data to a wireless receiver inside a wired peripheral, such as a wired mouse. The receiver in the wired peripheral receives data transmitted from the wireless peripheral. A microcontroller inside the wired peripheral receives data from both the wired peripheral and the data from the wireless peripheral. The microcontroller is coupled to the wired I/O port of the electronic device and sends data from the wireless peripheral when the wireless peripheral is sending data and the wired peripheral is not. When the wired peripheral is also sending data, the microcontroller sends data from the wired peripheral to the electronic device. Thus, the microcontroller in the wired peripheral arbitrates between sending data from the wired peripheral and the wireless peripheral and then sends the appropriate data to the electronic device through the wired port to which the wired peripheral is connected. In this way, a wireless peripheral may
be used to control the electronic device without the need to connect the wireless receiver to its own separate port on the electronic device.
These and other features of the present invention will be apparent from the following description.
Brief Description of the Drawings Fig. 1 is a schematic diagram illustrating a prior art multimedia PC system. Fig. 2 is a block diagram of the prior art system in Fig. 1. Fig. 3 is a block diagram of a multimedia PC system in which an I/O device shares the same mouse port in accordance with one embodiment of the present invention.
Fig. 4 is a perspective view of one embodiment of the I/O device in accordance with one embodiment of the present invention.
Fig. 5 is a schematic diagram of the system of Fig. 3 in which the device of Fig. 5 is implemented. Fig. 6 is a side view of the I/O device as installed in the system of Fig. 5.
Fig. 7 is a front view of the control panel of the I/O device of Fig. 4. Fig. 8 is a circuit diagram of the I/O device of Fig. 4.
Fig. 9 is a block diagram illustrating the interactions of various components of the PC system for key control of a peripheral using the I/O device of the present invention.
Fig. 10 is a block diagram showing the initialization of the I/O device using the I/O application software.
Fig. 11 is a block diagram showing the process of transmitting key data and its priority over mouse data transmission. Fig. 12 is a block diagram showing the process of mouse data transmission.
Fig. 13 is a block diagram showing the process of sending data from the PC workstation to the I/O device.
Fig. 14 is a block diagram showing the process of sending data from the PC workstation to the mouse. Fig. 15 is a block diagram illustrating the implementation of an internal I/O device in accordance with another embodiment of the present invention.
Fig. 16 is a perspective view illustrating the implementation of the function keys of the I/O device in the embodiment of Fig. 15.
Fig. 17 is a perspective view illustrating the implementation of an I/O device in a keyboard in accordance with yet another embodiment of the present invention.
Fig. 18 is a perspective view illustrating the implementation of an I/O device in a keyboard and sharing the keyboard port for both I/O device and keyboard functions.
Fig. 19 is a schematic diagram showing the pin assignments and connections for the keyboard and I/O device.
Fig. 20 is a perspective view illustrating the implementation of an I/O device in a monitor in accordance with a further embodiment of the present invention.
Fig. 21 is an illustration of a computer system that receives input from a wireless peripheral and a wired peripheral in accordance with another embodiment of the present invention.
Fig. 22 is a circuit diagram of the wired peripheral operating in accordance with the present invention;
Fig. 23a-23c are flowcharts of the operation of the microcontroller in the wired peripheral; Fig. 23d-23e are partial flowcharts showing the extra steps performed by the microcontroller in the wired peripheral in an extended mode; and
Fig. 24a-24b are flowcharts of the operation of a device driver in the electronic device to allow use of an extended mode with the wireless peripheral.
Detailed Description of the Preferred Embodiment The present invention discloses a system for efficiently coupling peripherals to an electronic device. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without these specific details. For example, the present invention is described in the context of a personal computer system but it will be apparent that the teachings of the present invention may be employed in conjunction with any type of electronic device. In other instances, well-known circuits, structures, and the like are not described in detail so as not to obscure the present invention unnecessarily.
The present invention overcomes the limitations of the prior art by efficiently coupling two peripherals to a PC computer or other electronic device through the same port. This allows additional input and output features to be implemented without taking up a valuable port in the system. In addition, the present invention provides backward compatibility by allowing computers currently being used by consumers to interface two peripherals through the same port without requiring any internal modifications. Figs. 3 to 8 illustrate a system configured in accordance with one embodiment of the present invention. A multimedia PC system 40 comprises similar peripherals which are similarly configured as those in the prior art PC system 10 shown in Fig. 1, with the exception of an I/O device 42 and its connection to the mouse 18. The I/O device is
designed for specific I/O functions and is coupled to the PC workstation 44 through a standard mouse port. As will become apparent below, the I/O device 42 incorporates a port sharing function in accordance with the present invention. A mouse 18 (or other cursor positioning device, such as a trackball, pen, etc.) is coupled to the I/O device 42. In accordance with the embodiment discussed herein in reference to Figs. 21 to 24, a second mouse may be coupled to the mouse 18 by wireless means. Further, while the figures show the mouse 18 coupled to the I/O device 42 by means of a wire connection, it is to be understood that this coupling may be implemented by other means, such as an infrared wireless connection. The I/O device 42 is configured to be placed between the PC workstation 44 and the monitor 18 (see Fig. 3). The height of the I/O device 42 may be designed for it to function as a monitor stand of a certain height. Referring to Fig. 4 and 7, at the front of the I/O device 42 is a control panel 46 having an input means comprising a row of keys 48 for input of control data and an output means comprising several LEDs 50 or other indicating means (such as an LCD display) for displaying output. The sets of keys 48 are for purpose of input control of the functions of various devices in the PC system 40, peripheral and/or user application software functions, and the LEDs 50 are for status output of some of these software and hardware functions.
By way of example but in no way intended to limit the present invention, the I/O functions of the keys and LEDs of the I/O device 42 in the illustrated embodiment are for the following functions of the PC system 40 (see Fig. 7):
Key 48a: Change TV channel (up), CD track (up) or review next message/fax Key 48b: Change TV Channel (down), CD track (down) or review previous message/fax
Key 48c: Listen to voice messages
Key 48d: View fax(es)
Key 48e: Answer phone or make a phone call
Key 48f: Play/stop audio CD Key 48g: Access internet/e-mail
Key 48h: Turn TV On/Off (optional)
Key 48i: Turn Radio On/Off (optional)
Key 48j: Scan and print/copy document (scanner optional)
Key 48k: Scan and fax document (scanner optional)
Key 481: Enable/disable sound effects or mute/restore audio
Key 48m: Increase volume
Key 48n: Decrease volume
LED 50a: Message waiting LED 50b: Fax waiting
Referring now to Fig. 8, the port sharing feature of the present invention is explained with reference to the circuit for the I/O device 42. The mouse (a PS/2 type) is plugged into a Mini-DIN socket 51 provided on the I/O device 42. The output plug 52 from the I/O device 42 is compatible with a PS/2 type mouse and is to be plugged into a Mini-DIN mouse port provided on the chassis of the host PC workstation 44. A microcontroller 52 receives data input from the keys 48, and from the controller processor 38 in the PC. In the preferred embodiment, the microcontroller 52 is a 89C1051 microcontroller chip made by ATMEL. The microcontroller 52 also receives input from an oscillator circuit 54, which provides the desired clock frequency for the microcontroller 52. The LEDs 50 are controlled by the microcontroller 52, with input from the host PC workstation 44 through the DATA line 60 and CLK line 61. An optional reset circuit 56 including a MAX810 chip may provide a reset function. It has been found that the I/O device 42 can, however, properly function even without this reset circuit 56. The common DATA line 60 connects both the mouse socket 51 and the I/O device output plug 53 to the PC workstation 44, and connects to the microcontroller
52. The mouse 18 communicates mouse data bi-directionally with the PC workstation 44 by way of the I/O device 42 using this DATA line 60. The microcontroller 52 also communicates key data bi-directionally with the PC workstation 44 through this data line 60. The I/O device 42 requires an I/O program and device driver (collectively referred to as "I/O application software" 70) to be loaded in the PC workstation 44, and in conjunction with existing or new device drivers of the other peripherals 73, controls the above functions of the peripherals 73 (see Fig. 9). If the I/O device 42 finds that its device driver is missing, it automatically disables itself. In such event, the mouse 18 would continue to function with its own device driver. The I/O application software 70 may be based on the "Fast Media" application software (Version 2.08) that is currently available from Packard Bell Electronic, Inc. This is basically an interface program which couples the user inputs/outputs 72 with the appropriate peripherals 73 and their device drivers 74 and assigned ports. This program, which by itself does not form a
part of the invention, can be readily written, adapted or modified to include an additional software module 76 for coupling the other peripherals with the key inputs and LED outputs of the I/O device 42, its device driver 77 and assigned mouse port, using the state of the art programming skills given the disclosure of the present invention herein as well as publicly available product information including the functionality of the program.
The particular type of I/O application software and the specific key control functions may be programmed by one skilled in the art without undue experimentation, given the particular requirements of the I/O device 42. Some of the keys 48 serve optional hardware peripherals which may not have been installed in the PC system 40. It would be desirable to provide some of the keys 48 and LEDs 50 or provide additional keys and
LEDs with I/O functions that are user selectable or definable using the I/O application software 70. The I/O device and its accompanying I/O application software could be designed to be "plug-and-play" compatible in the PC system 40. the microcontroller 52 and controller/processor 38 works in conjunction with the I/O application software 70 in the PC workstation 44.
Fig. 10 schematically outlines the initiation routine of the I/O device 42 upon powering up of the PC workstation 44 (block 80). The I/O application software interrogates the device ports including the mouse port (block 82), and specifically determines if the I/O device 42 is present (block 84). If it is installed, its device driver is initialized (block 86). If mouse 18 is connected to the I/O device 42 (block 88), the mouse 18 is initialized (block 90) and the required inter-relationship with the other peripherals are built (block 92). If the I/O device 42 is not present at block 84, then the I/O application software proceed to a standard mouse initializing routine at 92 (including first checking to see if the mouse is present, etc.). Upon initiation, the I/O application software will direct data or command between the controller /processor and the I/O device 42.
As the mouse 18 and the microcontroller 52 of the I/O device 42 share a common DATA line 60, to avoid collision of data from the microcontroller and mouse, the key data has priority over mouse data. More particularly, when the I/O device 42 is transmitting key data, the mouse 18 is inhibited from transmitting data. It is useful at this point to review the relevant specifications of a standard PS/2 type mouse so as to better understand the approach taken in accordance with the present invention.
For a standard PS/2 type mouse, when it transmit mouse data from the mouse, its CLK signal will be used to clock serial data to and from the mouse. The mouse
11
generates the clocking CLK signal when sending data to and receiving data from the host PC. The mouse transmission can be inhibited by forcing the CLK to a low (logical "0") level. DATA may go high (logical " 1 ") or low during the inhibit state. Each of the CLK and DATA lines should allow either the mouse of the host PC to force a line to the low level. During the non-transmission state, CLK and DATA should be pulled
(passive) to a high level.
Mouse data transmission will each consist of 11 bits transmitted serially on the data line. A logical " 1 " is transmitted as a high level. The 11-bit data stream is defined as follows: 1st bit: Start bit (always "0")
2nd bit: Data b t 0 (least significant bit)
3rd bit: Data b t 1
4th bit: Data b t 2
5th bit: Data b t 3 6 6tthh bbiitt:: D Daattaa bbit 4
7th bit: Data b t 5
8th bit: Data b t 6
9th bit: Data b t 7 (most significant bit)
10th bit: Parity ?it (odd parity) 1 111tthh bbiitt:: S Sttoopp bbit (always " 1 ")
(The parity bit will be " 1 " or "0" such that the eight data bits plus parity bit will always contain an odd number of " l "s.)
Further, there are a total of 16 available commands which can be sent by the host PC to a standard PS/2 type mouse. In particular, the Set Sampling Rate ("F3h") command has only seven legal operand values and they are all even numbers. Other details of the specification of a PS/2 type mouse are readily available to the public.
Referring to Fig. 11 , in accordance with the present invention, when the microcontroller 52 of the I/O device 42 is ready to send key data to the PC workstation 44 (block 100), such transmission is subject to override by transmission from the PC workstation (block 102). If the PC workstation is sending data, the I/O device 42 is inhibited from sending key data (block 103). The key data from the I/O device 42 may be retained in a buffer or register to be resent (block 105), or the user have to re-enter the key data. When the I/O device is otherwise sending data, it will override mouse data by forcing CLK 62 to a low state (block 104) before key data transmission at block 106.
At the low CLK state, the key data from the microcontroller 52 cannot be received by the mouse 18 and data transmission from the mouse 18 is inhibited. Data from the I/O device 42 is formatted in a 3-byte mouse packet but which does not fall within any valid mouse data. This packet differs from a normal mouse packet in that the overflow bits for data relating to X and Y-motion coordinates of the mouse are on and the X and Y sign bits are opposite to those of the actual operands, a condition that never happens with a normal 'legal' mouse packet. Using this scheme, I/O device data would not be recognizable by the mouse 18, but would only be recognizable by the PC workstation 44. The device driver of the I/O device 42 can understand the illegal mouse packets as coming from the I/O device 42 and not the mouse 18.
Referring to Fig. 12, when the mouse 18 is ready to send mouse data to the PC workstation 44, either by request from the PC workstation 44 or when there is a change in status of the mouse buttons (block 110), its onboard microcontroller will check to see if the mouse CLK 62 is at low state (block 1 12) before data transmission (block 114), as it would normally do with or without the I/O device 42 in place. If the microcontroller
52 or the PC workstation 44 is overriding the mouse 18. the mouse 18 will check for the ready state in block 112 periodically.
Referring to Fig. 13, when the PC workstation 44 is sending data to the microcontroller 52 of the I/O device 42 (block 130), the CLK 61 is set low to inhibit data transmission from the microcontroller 52 to the PC workstation (block 132). (With this setting, the microcontroller in turn sets the mouse CLK to low; see Fig. 14). It is noted that the PC workstation 44 no longer directly controls the CLK 62 of the mouse. As such, when key control data or command is sent by the PC workstation 44, it will be sent to both the microcontroller 52 in the I/O device 44 (block 134). The mouse 18 may read this data if its CLK 62 is set high. To avoid misreading by the mouse 18 of data intended for the I/O device 42, the data string from the PC workstation 44 that is intended for the I/O device functions are configured in the format of a "Set Sampling Rate" command (F3h), but with an odd-number operand. Because valid Set Sampling Rate commands recognizable by the mouse 18 have even-number operands, an odd- number operand would render the command an invalid command for the mouse 18 which will be ignored by the mouse 18 (block 136). The available seven-bit commands of this nature are sufficient for use by the PC workstation 44 in controlling the functions of the I/O device 42. The latter procedure is desirable to ensure that the integrity of the
I/O device 42 sharing function is fully compatible with motherboard designs of different manufacturers.
Referring to Fig. 14, when the PC workstation 44 is ready to send data to the mouse 18 (block 140), it instructs the I/O device 42 (a function of the I/O application software 70) to set CLK 62 low so the PC workstation data transmission takes priority
(block 142). The data intended for the mouse 18 (block 144) would not be recognizable by the I/O device 42 and would be ignored by the I/O device 42 (block 146).
For the LEDs 50, the commands to turn these on and off are transmitted from the host PC via CLK 61 and DATA 60 to the I/O device 42. The operation of the mouse is not affect by these host commands. The LEDs 50 will stay on as long as there is power supplied from the PC workstation 44. Thus, even if the PC workstation 44 is in an energy saving state (a reduced function "sleep" state; not completely power off), the LEDs 50 remain on.
Given the foregoing description of the various functional components of the present invention, it would involve only ordinary level of programming skills to develop the I/O application software and program the microcontrollers 52 to accomplish the required functions.
The present invention as described above allows one to make use of an existing port to efficiently handle more than one peripheral device. In the particular embodiment disclosed above, the port sharing feature of the present invention is incoφorated in an
I/O device which is configured to share the mouse port with a standard mouse. It is to be understood that the concept of the present invention is not limited to this implementation, but is also applicable to other device ports, such as the serial and parallel ports. However, there are several advantages to choosing the mouse port. As was shown by the discussions above, the data specification for the mouse allows a relatively easy scheme to be adopted to ensure data traffic integrity. Further, the mouse port's interrupt IRQ and port address are protected system resources which are unlikely to be disturbed by most application programs (as compared to a serial or parallel port, for example). The key input of the I/O device can be active (as can cursor control by a mouse) even after the host PC is waiting for a response from another device. Moreover, from a user perspective, it is more likely than not that when a user decides to press one of the function keys on the I/O device, she is at that moment not actively using the mouse. Thus sharing the mouse port is more desirable than other ports as it is more logical, practical and efficient.
The above described embodiment discloses the I/O device 42 as an electronic unit which is physically separated from the PC workstation 44. This embodiment affords backward compatibility without requiring modifications to existing hardware (e.g., motherboard, processors, etc). For certain applications, it may be desirable to specifically design the I/O device as an integral part of a PC workstation 157, as schematically illustrated in Figs 15 and 16. The I/O device 150 can be coupled between the controller/processor 38 and the mouse socket 151 by connecting the pins of the output of the device 150 (equivalent to the plug 53 in Fig. 8) to the wires normally connected to the mouse socket 151, and connecting the mouse input lines 153 (similar to those connected to socket 51 in Fig. 8) to the mouse socket 151. Fig.16 schematically illustrates the positioning of the set of keys 48 of the I/O device on the casing 156 of the PC workstation 157.
Fig. 17 illustrates another implementation of a similar I/O device 160 of the present invention in a keyboard 162. In addition to the keyboard data cable 163, a cable 164 couples the electronics of the I/O device 160 to the mouse port of the PC workstation 44 with no hardware modification made to the PC workstation 44 or the mouse 18. The mouse 18 may be connected to a standard mouse socket provided on the keyboard 162.
Instead of using separate keyboard data cable 163 and I/O device cable 164, a single cable may be implemented for both keyboard and I/O device functions (shared with the mouse). Referring to Fig. 18 and 19, a standard keyboard 6-pin Mini-DIN plug 180 and cable 182 may be utilized to accomplish this by sharing the ground and VCC pins between the keyboard and the I/O funtions at a single keyboard port 184, and assigning the unused pins to the I/O device functions. More specifically, standard Mini- Din sockets at the mouse port 186 and the keyboard port 184 use only four out of six pins for the standard keyboard and mouse functions, respectively. For a standard mouse port 186, it has the following pin configuration: pin Pl - mouse DATA pin P2 - unused pin P3 - GND pin P4 - VCC pin P5 - mouse CLK pin P6 - unused
For a standard keyboard port 184, it has the following pin configuration: pin Pl - keyboard DATA pin P2 - unused pin P3 - GND pin P4 - VCC pin P5 - keyboard CLK pin P6 - unused
Therefore, by assigning pin P2 for mouse DATA and pin P6 for mouse CLK at the keyboard port 184, and sharing the VCC and GND pins P3 and P4, a single port may be used to accommodate both keyboard and I/O (and mouse) functions. Fig. 19 shows more clearly the pin assignments. It is noted that the mouse DATA and mouse CLK lines should be connect to the keyboard port as shown. This is a simple modification to existing hardware (by bridging mouse pins Pl and P5 to keyboard pins P2 and P6, respectively, at 188 and 200) or the pin reassignment may be implemented in new motherboards (the mouse port will then be optional). The mouse driver (software or firmware) does not need to be modified, as it will automatically look to the keyboard port when the regular mouse DATA and CLK lines are accessed.
Fig. 20 illustrates yet another embodiment of the present invention. A similar I/O device 170 is implemented in a monitor 172. In addition to the normal monitor connection to the PC workstation 44 via cable 174, a cable 173 connects the I/O device
170 to the PC workstation 44. The mouse 18 is connector to the monitor 172 via a standard mouse socket. Also in this embodiment, no hardware modification is required to be made to the PC workstation 44 and the mouse 18.
It is noted that in Figs. 15 to 20, details of the other peripherals and components shown in Figs. 3 and 5 are also present in these embodiments. They have been omitted, however, in Figs. 15 to 20 for simplicity of explanation of the distinguishing features in these additional embodiments.
The foregoing additional embodiments affords full compatibility with existing control processor hardware and/or motherboard design. Except for the differences in the physical packagings of the I/O device for the convenience of the users and ergonomics reasons, the different embodiments are functionally the same. It is much easier to modify the casing designs of the monitor, keyboard and PC without having to require a redesigned motherboard. Besides, users of existing PC systems can take advantage of
this invention at the time when they are considering replacing a keyboard, a monitor or the PC casing.
In accordance with another embodiment of the present invention, instead of an I/O device having predefined user input function keys, a mouse-type I/O device is designed to share the same I/O port with a wireless mouse. Fig. 21 is an illustration of a system configured in accordance with the present invention. A personal computer 210 receives input from a wired mouse 212 through an I/O port 214. A wireless mouse 216 transmits electromagnetic waves, preferably infrared (hereinafter "IR"), to a receiver 218 located inside the body of the wired mouse 212. Both the wired mouse 212 and the wireless mouse 216 send data (such as buttons pressed, horizontal and vertical movement, etc.). The wired mouse 212 sends data from both the wired mouse 212 and the wireless mouse 216.
Fig. 22 is a diagram of the circuit in the wired mouse 212 which contains modifications from a typical circuit in a standard wired mouse. A microcontroller 220 receives data inputs from the wired mouse 212 from a primary mouse button 222, a secondary mouse button 224, a horizontal encoder 226, and a vertical encoder 228. In the preferred embodiment, the microcontroller 220 is a PIC16C57 microcontroller chip made by Microchip of Chandler, Arizona. The microcontroller 220 also receives data input from an IR receiver 218, which is a standard IR receiver and is configured to receive data (e.g., buttons pressed, horizontal and vertical data) transmitted by the wireless mouse 216. The microcontroller 220 also receives input from an oscillator circuit 232, which provides the desired clock frequency for the microcontroller 220. The microcontroller 220 provides mouse data (i.e., buttons pressed, horizontal and vertical data) from either the wired mouse 212 or the wireless mouse 216 to the computer 210 through a plug 230 connected to the I/O port of the of the computer 210.
Since the microcontroller 220 receives inputs from two devices and provides an output through one port, it necessarily arbitrates between the input received from the wired mouse 212 and the wireless mouse 216.
The microcontroller 220 is configured to operate according to the flowcharts shown in Fig. 23a-23c. This programmed configuration for the microcontroller 220 is similar to the configuration in a typical mouse. However, the program is modified in the present invention to achieve the ability to receive data from a wireless mouse and transmit it to the computer 210.
At block 300 in Fig. 23a, the status of the mouse buttons of the wired mouse 212 is obtained. At block 310, if the button status has changed, the program branches to block 320, where the button status byte is updated and a Send Mouse Data Flag is set, indicating that data from wired mouse 212 is to be sent. If the button status has not changed, the program branches from block 310 to block 330. Blocks 330 and 350 determine whether horizontal or vertical movement, respectively, is detected in the wired mouse 212. If so, the corresponding horizontal and vertical counts are updated in blocks 340 and 360, respectively, and the Send Mouse Data Flag is set.
At block 370, if a command from the host computer 210 is received, the program determines at block 380 whether a reply is required. If so, the Reply_Type is updated at block 390. Processing continues at block 400, where the microcontroller 220 determines whether a mode switch sequence is received, meaning that the host computer 210 has instructed the microcontroller 220 to enter an "Extended Mode. " Extended mode is discussed below with reference to FIGs. 23d-e. If a mode switch sequence is received, control branches to Extended Mode.
If there is no switch commanded to Extended Mode, control branches from block 400 to block 410, where the microcontroller 420 checks for a transmission from the infrared receiver 218. If an infrared transmission has been received, control is passed to block 420, where the microcontroller 220 determines whether an infrared mouse command (i.e., new data from the wireless mouse 216) has been received. If so, then mouse data (e.g., button status, horizontal and vertical data) is updated, and a Send lR Data Flag is set to indicate the need to send new data from the wireless mouse 216 to the computer 210, and control then passes to block 440. If no infrared mouse command has been received, the IR transmission is ignored and control passes to block 240. (As discussed below, in Extended Mode, non-mouse IR commands are processed and not ignored).
At block 440 in Fig. 23c, the microcontroller 220 determines whether a command transmission to the host is already in progress, by checking whether a Flag is set indicating that a command transmission to the host computer 210 is in progress. If so, control passes to block 450, where the microcontroller 220 determines whether the bit timer has expired. If not, then the microcontroller 220 branches back to block 300 to restart the loop begun at A in FIG. 23a. Otherwise, control passes to block 460, where the next bit is shifted to the host and the command pointer is updated. At block 480, the microcontroller 420 determines whether the command transmission is complete. If so,
the Flag indicating that a command transmission the host computer 210 is in progress is cleared. The microcontroller 220 then branches back to the beginning of the loop at block 300 in Fig. 23a.
If a command transmission to the host is not in progress, control branches from block 440 to block 470, where the microcontroller 220 determines whether the
Send Reply Flag is set, and thus whether the host computer 210 has requested a reply. If so, control passes to block 500 where the reply is obtained, the Command Pointer is initialized to Command Reply and the Flag is set indicating that a command transmission to the host computer 210 is in progress. The microcontroller 220 then branches back to the beginning of the loop at block 300.
Answering the host has the highest priority, as is indicated by the location of block 470 before checks of other input to be transmitted to the host. Mouse data has the next highest priority, as illustrated by block 520, followed by infrared mouse data, as illustrated in block 530. However, it will be appreciated that the priorities may be switched. At blocks 510 and 540, the Command Pointer is initialized to the corresponding data, mouse data or infrared mouse data, and the Flag is set indicating that a command transmission to the host computer 210 is in progress. Control then branches back to block 300. Thus, the flow chart of Figs. 23a-23c illustrates how the microcontroller 220 processes and transmits data received from the wired mouse 212 and the wireless mouse 216.
In the embodiment of the present invention described above, using only a wireless mouse and a wireless receiver, no special software or modifications are required in the host computer 210 because standard mouse data is sent through the mouse port 214. However, as mentioned above, the present invention is not limited to a wireless mouse and the transmission of only mouse data by wireless means. In an Extended
Mode, the microcontroller 220 can be configured to process wireless commands that are not mouse data and transmit them to the host computer 210 through the mouse port 214. Extended Mode is entered after block 400 if a command is received from the host computer 210 to switch modes. In such a case, the microcontroller 220 enters a loop similar to the one described in Figs. 23a-c, with two minor modifications that are illustrated in Figs. 23d-e. The Extended Mode is useful for using the port used by the wired mouse 212 to receive wireless transmissions from a peripheral other than a mouse, such as a wireless keyboard or a wireless remote control. In this way, key command data, similar or identical to scan codes generated by a wired keyboard, are received by
19
the IR receiver 218 and are processed and transmitted to the host computer 210 by the microcontroller 220.
The first modification of the loop, shown in Fig. 3d, is that if the determination is made at block 420 that the IR transmission received is not an IR mouse command, processing switches to block 600 where the IR Key Command byte is updated. Next, at block 602, a Send lR Key Cmd Flag is set. Processing then resumes at block 640.
The second modification of the loop to allow Extended Mode is shown in Fig. 23d. The transmission of an IR Key Command has preferably the lowest priority of the transmission to the host computer 210 of any other data to be sent. Thus, if it is determined at block 530 that there is no IR mouse data to send, processing continues to block 604 where a determination is made whether IR Key Command data is to be sent. If so, at block 606, Command Pointer is initialized to the IR Key Command, and the Flag is set indicating that a command transmission to the host computer 210 is in progress. Processing then continues at A in Fig. 23a. Figs. 24a-b are flowcharts of the operation of a device driver in the host computer 210 to allow use of Extended Mode with the wireless peripheral. A device driver in the host computer 210 is necessary to process a key command from the wireless peripheral, because the normal mouse device driver cannot process key commands. The port driver initialization routine begins at 620. At block 622, a test is performed for the presence of a wired mouse 212. At block 624, a determination is made as to whether the mouse is present. If not, the program exits with error at block 626 and the Extended Mode device driver is not installed. If the mouse is present, then at block 628, a command is issued to switch the mouse controller 220 to Extended Mode. Based on the response to that command, a determination is made at block 630 as to whether a combination mouse, or a mouse with the infrared receiver capabilities of the present invention, is installed. If not, at block 632, normal mode, and not Extended Mode, is maintained when the interrupt service routine for the mouse is installed at block 634. If a combination mouse is installed, at block 636 the Extended Mode is determined to be in effect for installing the interrupt service routine at block 634.
The interrupt service routine begins at block 660 in Fig. 24b. At block 662, if Extended Mode is not in effect, then the standard mouse interrupt service routine tasks of getting standard mouse packets (block 664), formatting the mouse packet (block 666) and passing the packet to the operating system (block 668) are performed. If Extended
Mode is in effect, processing continues at block 670 where an Extended Mode packet potentially containing non-mouse commands (i.e., key commands) is received. At block 672, a determination is made whether the Extended Mode packet contains non-mouse commands or data. If not, the packet contains standard mouse data that is processed at blocks 666 and 668. If the Extended Mode packet does contain non-mouse data, then the key code or key command is translated at block 674. Then, at block 676, the key code is sent to the operating system or to a high-level application.
In summary, the present invention overcomes the limitations of the prior art by efficiently coupling two peripherals to a computer or other electronic device through the same port by incorporating a port sharing function in one of the peripherals. This allows additional input and output features to be implemented without taking up a valuable port. No additional interrupt IRQ is required. In addition, the present invention provides backward compatibility by allowing computers currently being used by consumers to interface two peripherals through the same port without requiring any internal modifications or additions of add-on I/O cards. Additional or different functions may be implemented by one skilled in the art without departing from the scope and spirit of the present invention.
While the present invention has been described with respect to the illustrated embodiments in accordance therewith, it will be apparent to those skilled in the art that various modifications and improvements may be made without departing from the scope and spirit of the invention. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims.