Using multiple serial bus devices with a driver program

A method for using a driver program to communicate with multiple serial bus devices includes selecting one of the serial bus devices and automatically coupling the selected serial bus device to a computer. The other serial bus devices are isolated from the computer, and the driver program is executed to communicate with the selected serial bus device.

BACKGROUND
 The invention relates to using multiple serial bus devices with a driver
 program.
 Referring to FIG. 1, for the purpose of electrically capturing an optical
 image 11, a typical digital camera 12 (of a digital imaging system 21) may
 include an array of photon sensing pixel sensors 20. During an integration
 interval, each pixel sensor 20 typically measures the intensity of a
 portion, or pixel, of a representation of the optical image that is
 focused (by optics of the camera 12) onto the pixel sensors 20. At the
 expiration of the integration interval, each sensor 20 typically indicates
 (via an analog voltage, for example) an intensity of light of the pixel.
 The camera 12 typically processes the indications from the pixel sensors 20
 to form a frame of data which digitally represents the captured image. The
 frame may be transferred via a serial bus 15 (a Universal Serial Bus
 (USB), for example) to a computer 14 for viewing or stored in a flash
 memory of the camera 12. During video operations, the camera 12 may
 capture several optical images in succession and furnish several frames of
 data to the computer 34, each of which indicates one of the captured
 images. The computer 14 may then use the frames to recreate the captured
 video on a display 9.
 The computer 14 typically executes driver programs to communicate with
 devices that are coupled to the serial bus 15. Quite often, the driver
 program may be designed for communication with only one bus device. For
 example, a camera driver program 17 may be designed to cause the computer
 14 to communicate with one camera that is coupled to the serial bus 15. A
 difficulty may arise when an additional camera 18 is coupled to the bus
 15, as more than one camera may exceed the driver program's capabilities.
 Thus, there is a continuing need for a system that accommodates the use of
 multiple serial bus devices with a single device-driver program.
 SUMMARY
 In one embodiment, a method for using a driver program to communicate with
 multiple serial bus devices includes selecting one of the serial bus
 devices and automatically coupling the selected serial bus device to a
 computer. The other serial bus devices are isolated from the computer, and
 the driver program is executed to communicate with the selected serial bus
 device.
 In another embodiment, an article includes a computer readable storage
 medium that includes instructions to cause a computer to select a serial
 bus device from a group of serial bus devices. The serial bus devices are
 capable of communicating with the computer when the computer executes a
 driver program. The selected serial bus device is automatically coupled to
 the computer, and the other serial bus devices are isolated from the
 computer. The driver program is executed to communicate with the selected
 serial bus device.

DETAILED DESCRIPTION
 Referring to FIG. 2, an embodiment 33 of a digital imaging system in
 accordance with the invention includes a computer 34 that may execute a
 single device-driver program 41 to communicate with multiple serial bus
 devices 38 (serial bus device 38.sub.1, 38.sub.2 . . . 38.sub.N as
 examples) that have the same type (digital cameras that are associated
 with the same driver program may be one type, as an example). For example,
 in some embodiments, the bus devices 38 may be, as examples, digital
 cameras, and the device-driver program 41 may be a camera driver program
 that the computer 34 executes to communicate with the cameras in a manner
 described below.
 In conventional systems, a difficulty may arise in using a single
 device-driver program to communicate with several serial bus devices that
 have the same type, as the driver program expects to communicate with only
 one bus device. However, in the digital imaging system 33, the computer 34
 includes a serial bus interface 40 that (as described below) is
 constructed to multiplex the serial bus devices 38 through one serial bus
 port (and logical connection) in a high volume/high throughput manner so
 that the rest of the computer 34 (excluding the serial bus interface 40)
 perceives that there is only one serial bus device 38 connected at any one
 time. As a result, the capabilities of the driver program 41 are not
 exceeded.
 To accomplish the above-described features, each serial bus device 38 is
 coupled to a different associated serial bus 36 (a serial bus 36, 36.sub.2
 . . . or 36.sub.N, as an example) that is coupled to the serial bus
 interface 40 (via a plug-type connector assembly 37, for example). In a
 manner described below, the serial bus interface 40, under software
 control, selectively couples one of the serial buses 36 to the computer 34
 which permits the computer 34 to communicate with the associated serial
 bus device 38. In addition to coupling one of the serial bus devices 38 to
 the computer 34, the serial bus interface 40 isolates the remaining serial
 buses 36 (and the associated serial bus devices 38) from the rest of the
 computer 34 and thus, hides the remaining serial bus devices 38 from the
 driver program 41.
 The advantages of the above-described arrangement may include one or more
 of the following: multiple serial bus devices that are not typically
 supported by a single device-driver program may now be supported; reliable
 multiport serial port hubs may now be procured; the serial bus enumeration
 process may be eliminated; the driver load and unload process on the
 computer may be eliminated; the computer may be more stable and crashes of
 the computer may occur less frequently; and less time may be consumed in
 interacting with the serial bus devices.
 As an example of a scenario where multiple serial bus devices 38 that have
 the same type are used with a single device-driver program, the serial bus
 devices 38 may be cameras. In this manner, each camera typically is
 packaged for sale with an accompanying single camera driver program (i.e.,
 the driver program 41). Before the cameras are shipped from the
 manufacturing facility, the driver program 41 is typically executed to
 test each camera, and as is typical, the driver program 41 may be
 configured to communicate with only one camera. However, the serial bus
 interface 40 provides a mechanism for allowing several cameras to be
 concurrently plugged into the interface 40 and coupling the cameras to the
 computer 34 (one at a time) for testing in a high throughput manner. As a
 result, multiple cameras may be manually coupled (plugged in, for example)
 to the serial bus interface 40, and a test program 42 may interact with
 the driver program 41 to test one camera at a time without requiring any
 of the cameras to be 20 plugged or unplugged from the computer 34 during
 testing of the cameras. Therefore, as compared to conventional testing
 arrangements, significant testing time is saved and modification of the
 driver program 41 is not required.
 Another possible scenario where multiple serial bus devices 38 may be used
 with the driver program 41 may be a security system where the serial bus
 devices 38 are cameras. In the security system, several cameras are
 plugged into the computer 34, and the driver program 41 may cause the
 computer 34 to interact with one camera at a time to, for example, monitor
 a specified location. Because the computer 34 (excluding the bus interface
 40) perceives that only one camera is coupled to the computer 34 at any
 one time, the driver program 41 does not need to be modified.
 To accomplish the above-described functions, in some embodiments, the test
 program 42 (for the embodiments where the digital imaging system 33 is
 used for purposes of testing) may interact with the bus interface 40 to
 switch out a current bus device 38 after testing and switch in the next
 bus device 38 for purposes of testing. Thus, for example, the test program
 42 may cause the computer 34 to evaluate the performance of a current bus
 device 38.sub.1, to subsequently instruct the bus interface 40 to switch
 out the current bus device 38.sub.1 and to switch in the next bus device
 38.sub.2 for testing. Because the test program 42 (and not the driver
 program 41) causes the computer 34 to interact with the multiplexing
 functions of the bus interface 40 (as described below), the driver program
 41 does not need to be modified, as the computer 34, under execution of
 the driver program 41, perceives that one bus device 38 is coupled to the
 computer 34.
 Referring to FIG. 3, as an example, the test program 42 may cause the
 computer 34 to transmit (block 44) a command to the serial bus interface
 40 to switch out the current bus device 38. In response to this command,
 the serial bus interface 40 places (block 46) the current bus device 38 in
 a suspend mode. The serial bus interface 40 may accomplish this by
 transmitting the appropriate signals to the serial bus 36 that is
 associated with the current serial bus device 38. Alternatively, the
 serial bus interface 40 may periodically transmit a heartbeat signal (a
 Start of Frame (SOF) signal, for example) to the serial buses 36 that are
 associated with the nonselected bus devices 38 to keep the nonselected
 serial devices 38 inactive but yet maintain the appearance (from the
 nonselected serial bus devices' perspective) that the nonselected serial
 bus devices 38 are coupled to the computer 34.
 Next, the test program 42 may cause the computer 34 to transmit (block 48)
 a command to the bus interface 40 to switch in the next bus device 38. In
 response, the serial bus interface 40 may then decouple (block 50) the
 serial bus 36 that is associated with the current serial bus device 38
 from the rest of the computer 34 and couple (block 52) the serial bus
 device 36 that is associated with the next serial bus device 38 to the
 rest of the computer 34. Next, the computer 34 takes (block 54) the next
 serial bus device 38 out of the suspend mode and subsequently, tests
 (block 56) the next serial bus device 38 which at this point transitions
 in name to become the current serial bus device 38. After the test of the
 serial bus device 38 is complete, the computer 34 determines (diamond 57)
 if the testing is complete. If not, the computer 34 returns to block 44 to
 repeat the above-described process for another serial bus device 38.
 Referring to FIG. 4, besides the serial bus interface 40, the computer 34
 may also include a microprocessor 80 which, in some embodiments, may
 execute a copy of the driver program 41 and may execute a copy of the test
 program 42. The execution of the test program 42 may cause the computer to
 select one of the serial bus devices 38 and automatically couple the
 selected serial bus device 38 to the computer 34; isolate the other serial
 bus devices 38 from the computer 34; and execute the driver program 41 to
 communicate with the selected serial bus device 38 (see FIG. 2).
 The memory 88, the microprocessor 80 and bridge system controller circuitry
 84 may be coupled to a host bus 82. The circuitry 84 may also interface
 the host bus 82 to a downstream bus 99 which is coupled to an input/output
 (I/O) controller 90 and a network interface card 92, as examples. The
 computer 34 may also have, as examples, a mouse 91, a floppy disk drive 94
 and/or a keyboard 9that are coupled to the I/O controller 90. An
 Intelligent Device Electronics (IDE) interface 101 may also be coupled to
 the bus 99 and interface a hard disk drive 96 and a CD-ROM drive 100 to
 the bus 99. A video controller 89 may be coupled to the bus 99 and control
 a display 83.
 Referring to FIG. 5, the serial bus interface 40 may include a downstream
 bus interface circuit 104 that is coupled to the bus 99. The downstream
 bus interface circuit 104 receives data and commands from the bus 99,
 which may include, as examples, a command to place a selected serial bus
 device 38 in a suspend mode, a command to take a selected serial bus
 device 38 out of the suspend mode, a command to switch in the next serial
 bus device 38 and a command to switch out the current serial bus device
 38. In response to these commands, a control unit 106 may interact with a
 bi-directional multiplexer 110 to select one of the serial bus devices 38.
 Thus, the multiplexer 110 selects one of the serial buses 36 to couple the
 associated, selected serial bus device 38 to a serial bus interface
 circuit 108. The selected serial bus device 38 may then communicate via
 the serial bus interface circuit 108 and the downstream bus interface
 circuit 104 to the rest of the computer system 34. Besides selecting and
 deselecting the serial bus devices 38, the downstream bus interface
 circuit 104, the control unit 106 and the serial bus interface circuit 108
 perform typical functions of a serial bus interface.
 While the invention has been disclosed with a respect to a limited number
 of embodiments, those skilled in the art, having the benefit of this
 disclosure, will appreciate numerous modifications and variations
 therefrom. It is intended that the appended claims cover all such
 modifications and variations as fall within the true spirit and scope of
 the invention.