Host apparatus, device, and method for controlling communication system

A host apparatus that adjusts consumption of a device in accordance with the power supply capability of the host apparatus. The host apparatus includes a plurality of communication ports and devices connected to each communication port. A host controller of the host apparatus communicates with the devices to acquire equipment information including the consumption current of each device. A current supply circuit supplies current to the devices connected to the communication ports. An MPU changes the current supplied from the current supply circuit to the plurality of devices when a total value of the consumption current of a device newly connected to the plurality of communication ports and the consumption current of each device for which connection with the plurality of ports has already been recognized exceeds the current that the current supply circuit is capable of supplying.

BACKGROUND OF THE ART

The present invention relates to a host apparatus, a device, and a method for controlling a communication system, in which the host apparatus is used in a communication system and the host apparatus and a plurality of devices are connected by way of a bus for performing serial communication and each device is operated by bus-supplied power of the host apparatus.

In the field of personal computers, peripheral devices (device) having a USB (Universal Serial Bus) interface complying with the USB 2.0/1.1 standard, which is a serial interface standard, is becoming a global standard. Further, this standard will continue to spread in the future. The USB standard specifies the capability of supplying current of up to a maximum of 500 mA via the USB cable for every port so that each device is operated by the cable supplied power. That is, in a communication system for performing data communication with the USB interface, power is supplied from the computer (host apparatus), which is provided with the host function, to a device via a USB cable so as to drive the device. Recently, due to the popularization of devices capable of communicating via a USB interface, many devices are connected to the host apparatus by way of the USB interface. In such a communication system, the devices connecting to the host apparatus have increased, and when inappropriate power consumption exceeding the capability (suppliable current) of the host apparatus side occurs in each device, the operation of the entire system becomes unstable. Thus, a technique for avoiding such situation is necessary.

In a communication system connecting a host apparatus and devices with USB interfaces, connection and disconnection of each device are enabled in a state in which the power of the host apparatus is turned on. When connected, a device is instantly recognized in order to enable use of that device. That is, in such a communication system, when a new device is connected to the host apparatus, negotiation is performed between the host apparatus and the device to recognize the newly connected device.

FIG. 40is a flowchart showing the process executed by the host apparatus in recognizing the newly connected device.

First, in step 1, the host apparatus issues a request command to the device to request equipment information for the device and acquires the equipment information sent from the device in response to the request command. At the point of time when a supply command is issued, current of 100 mA is supplied to the connected device via the USB cable, and a function block for carrying out the negotiation is activated in that device.

The equipment information acquired in step 1 includes information on maximum consumption current required to drive the device, and the host apparatus proceeds to step 2 to determine whether the maximum consumption current can be supplied or not. When determining that the current can be supplied, the host apparatus proceeds to step 3 and recognizes the connected device as a usable device and starts bus power supply (power supply with a bus) to the device. If, on the other, the maximum consumption current of the device is determined in step 2 to be current that cannot be supplied, the host apparatus does not recognize the connected device as a usable device.

In this way, when the maximum consumption current of the connected device exceeds the supply capability of the host apparatus, the device is not recognized by the host apparatus and thus cannot communicate with the host apparatus.

Further, in the communication system, the host apparatus controls all the devices connected to the network of the system. That is, each connected device carries out operations of data transfer and the like in response to instructions from the host apparatus and do not operate when there is no instruction from the host apparatus.

As shown inFIG. 41, the data transfer using the USB interface is carried out in units referred to as transactions, which are configured by a plurality of packets. That is, data transfer is in a communication format in which the data transfer is started by a token packet sent from the host apparatus, and a data packet and a hand shake packet are returned by the device in response to the token packet. Thus, the device cannot transmit any kind of information when ignoring the request from the host apparatus.

There are devices provided with a function for reducing the maximum consumption current and operating in such a state (function for low power consumption mode and the like). However, such devices cannot inform the host apparatus of the information of the reduced current consumption during connection (information that the device itself has a low power consumption mode function). A specific example of a low power consumption mode function includes, in a case of a disc apparatus and the like, a function for lowering power consumption of a motor by reducing the disc rotation speed. In a case of a printer or a scanner, the function of lowering the power consumption would be slowing the printing speed or the scanning speed.

SUMMARY OF THE INVENTION

As mentioned above, whether or not the bus power is suppliable or not with a USB cable is solely determined at the host apparatus side. Thus, when determined that bus power is not suppliable, even when the connected device reduces the current consumption so as to enable operation with the bus power supply, this information cannot be provided to the host apparatus. Thus, the device cannot be activated.

Further, in such a case, when there is a desire for use of a new device, the troublesome task of unplugging a cable and plugging a cable in another cable, in which the USB cable of another device is unplugged and then the USB cable is plugged into the new device, or the connection of a power cable to the device becomes necessary.

A communication system in which the host apparatus and the device are connected with a USB interface, and the device is operated by the bus power supply from the host apparatus is disclosed in Japanese Laid-Open Patent Publication No. 2001-242965 and etc. However, this patent publication and etc. does not propose a technique for avoiding the above problem.

The present invention provides, in a communication system for operating a plurality of devices through bus power supply from the host apparatus, a host apparatus in which the current consumption of the device is adjusted in accordance with the power supply ability of the host apparatus, a device, and a method of controlling the communication system.

One aspect of the present invention is a host apparatus for operating a plurality of devices by supplying power through a plurality of buses that perform serial communication. The host apparatus includes a plurality of communication ports for connection with the plurality of devices. A communication circuit, connected to the plurality of communications ports, acquires plural pieces of equipment information including consumption current of the plurality of devices from the plurality of devices through communication with the plurality of devices. A current supply circuit, connected to the plurality of communication ports, supplies current to the plurality of devices. A control circuit, connected to the communication circuit and the current supply circuit, changes the current supplied from the current supply circuit to the plurality of devices when the total value of the consumption current of a device newly connected to the plurality of communication ports and the consumption current of each device for which connection with the plurality of ports has already been recognized exceeds the current that the current supply circuit is capable of supplying.

Another aspect of the present invention is a host apparatus for operating a plurality of devices by supplying power through a plurality of buses that perform serial communication. The host apparatus includes a plurality of communication ports for connection with the plurality of devices. A communication circuit, connected to the plurality of communication ports, acquires plural pieces of equipment information including consumption current of the plurality of devices through communication with the plurality of devices. A display device, connected to the communication circuit, displays the plural pieces of equipment information and selection information enabling a user to select a used state or an unused state for the plurality of devices connected to the communication ports. A control circuit, connected to the communication circuit and the display device, controls current supplied to each device for each communication port in accordance with the consumption current of the plurality of devices and the selection result of the user based on the selection information.

A further aspect of the present invention is a device for receiving power from a host apparatus through a bus that performs serial communication. The device includes an internal circuit including a communication circuit for performing communication with the host apparatus through the bus and operating based on the communication data transmitted and received by the communication circuit. A control circuit, connected to the internal circuit, reduces the consumption current if the consumption current of the internal circuit exceeds the current that the host apparatus is capable of supplying when the device is connected to the host apparatus.

Another aspect of the present invention is a method for controlling a communication system for supplying power from a host apparatus to a plurality of devices through a plurality of buses that perform serial communication to operate the plurality of devices. The method includes the steps of acquiring equipment information with the host apparatus, including consumption current of each device, from the plurality of devices, and changing the distribution of current supplied from the current supply circuit to the plurality of devices in accordance with the current that the host apparatus is capable of supplying when the total value of the consumption current of a device newly connected to the host apparatus and the consumption current of each device for which connection with the host apparatus has already been recognized exceeds the current that the host apparatus is capable of supplying.

A further aspect of the present invention is a method for controlling a communication system for supplying power from a host apparatus to a device through a bus that performs serial communication to operate the device. The device includes an internal circuit, having a communication circuit for performing communication with the host apparatus, for operating based on communication data transmitted and received by the communication circuit. The method including the step of reducing the consumption current of the internal circuit in accordance with the current the host apparatus is capable of supplying when the consumption current consumed by the internal circuit exceeds the current the host apparatus is capable of supplying.

Another aspect of the present invention is a method for controlling a communication system for supplying power from a host apparatus to a plurality of devices through a plurality of buses that perform serial communication to operate the plurality of devices. The method includes the steps of acquiring equipment information with the host apparatus including consumption current of the plurality of devices from the plurality of devices, displaying on a display device of the host apparatus the equipment information of each device and selection information enabling a user to select a used state or an unused state for each device, and controlling current supplied to each device in accordance with the consumption current of each device that is included in the equipment information and the selection result of the user based on the selection information.

A further aspect of the present invention is a host apparatus for operating a plurality of devices by supplying power through a plurality of buses that perform serial communication. The host apparatus includes a plurality of communication ports for connection with the plurality of devices. A communication circuit, connected to the plurality of communication ports, acquires plural pieces of equipment information including consumption current of the plurality of devices through communication with the plurality of devices. A control circuit, connected to the communication circuit, changes the amount of current supplied from a current supply circuit to the plurality of connected devices when the consumption current amount increases by shifting a device that is in an unused state to a used state and exceeds the current the current supply circuit is capable of supplying.

Another aspect of the present invention is a method for controlling a communication system for supplying power from a host apparatus to a plurality of devices through a plurality of buses that perform serial communication to operate the plurality of devices. The method includes the steps of acquiring equipment information with the host apparatus, which includes consumption current of the plurality of devices, from the plurality of devices, determining with the host apparatus whether or not the supply of current that is in accordance with a requested value of a device that is in the unused state is possible, and changing the amount of current supplied to the plurality of connected devices from the current supply circuit when the supply of current is impossible.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

A first embodiment of the present invention will now be described with reference to the drawings.FIG. 1is a schematic block circuit diagram of a host apparatus11of the first embodiment.

The host apparatus (more specifically, a personal computer)11includes an MPU12, a memory13, a host controller14, a current supply circuit15, and a current monitoring circuit16. In the host apparatus11, the MPU12is connected to the memory13, the host controller14, and the current supply circuit15by an internal bus17so that data is transmitted and received between one another. In the host apparatus11, three communication ports P1to P3configure a USB interface, and first to third devices21to23are connected to the communication ports P1to P3by a USB cables C1. Each device21to23is a bus-powered device that operates with the power supplied via the USB cable C1from the host apparatus11.

The MPU12, which is a control circuit, executes various processes in accordance with programs stored in the memory13, and controls the host apparatus11in a centralized manner. The programs stored in the memory13include a communication program, and the host controller14and the current supply circuit15are controlled by the communication program.

The host controller14is a communication circuit complying with the USB standard and controls communication with each device21to23. The host controller14is connected to the first to the third devices21to23by way of each communication port P1to P3and the USB cables C1. A register14ais arranged in the host controller14, and the equipment information acquired from each device21to23is stored in the register14a. More specifically, the host apparatus11, when each device21to23is connected to the communication port P1to P3, performs the process (negotiation with the device21to23) of connection recognition, and stores the obtained equipment information (information including device name or maximum consumption current) in the register14aof the host controller14.

The current supply circuit15supplies current, which corresponds to the maximum consumption current contained in the equipment information of the register14a, to each device21to23via the communication ports P1to P3and the USB cable C1. In the first embodiment, a switch circuit25is arranged in the middle of the current path connecting the current supply circuit15and each communication port P1to P3.

The current monitoring circuit16detects the current flowing through the communication port P1to P3and performs monitoring so that over current (current exceeding the maximum consumption current of each device), which is greater than or equal to a predetermined value, does not flow to the device21to23via the communication port P1to P3. The current monitoring circuit16turns off the switch circuit25when over current is detected and electrically disconnects the current supply circuit15and the communication port P1to P3. Thus, when the device21malfunctions and over current flows, the current path to the device21is broken so as to prevent over current from continuously flowing. Consequently, the operation of the communication system configured by the host apparatus11and each device22,23is prevented from becoming unstable.

In the communication processes executed by the MPU12of the host apparatus11, a process for recognizing the connection of a new device of will now be explained with reference to the flowchart ofFIG. 2. The process ofFIG. 2starts when one of the devices21to23is connected to the host apparatus11. Here, a case in which the third device23is newly connected to the host apparatus11when the first and the second devices21and22are in a connection-recognized state, will be explained by way of example.

When the device23is connected to the communication port P3of the host apparatus11, the MPU12, after bus resetting in step100, first proceeds to the following step110and performs address setting of each device21to23including the connected devices21and22. After the completion of address setting, the MPU12proceeds to step120and acquires the equipment information of the device23. More specifically, the MPU12operates the host controller14, issues the request command (Get Descriptor) to the newly connected device23, and in response, stores the equipment information sent from the device23in the register14aof the host controller14. The equipment information contains information such as equipment name, manufacturer, maximum consumption current, etc.

The MPU12, in step130, reads the equipment information for the presently connected devices21and22and the device23from the register14aand determines whether the maximum consumption current of the device can be supplied or not based on the equipment information. The suppliable current of the current supply circuit15is set in advance in the memory13as program data, and such suppliable current and the maximum consumption current of the device23are compared. If a versatile power source IC is used as the current supply circuit15, a current measuring circuit for measuring the suppliable current of the current supply circuit15is used, and the supply current of the current supply circuit15actually measured with the current measuring circuit in the initialization process and etc. of the host apparatus11and may be compared with the maximum consumption current of the device23.

If determined to be suppliable in step130, the MPU12proceeds to step140and operates the host controller14. After issuing a command (Set Configuration) to provide notification to the device23that the connection has been recognized, the MPU12ends the present process.

If determined as not being suppliable in step130, the MPU12proceeds to step150and changes the distribution of the supply current. That is, the MPU12changes the distribution of the supply current to each device21to23including the connected devices21and22and the new device23within a suppliable current range of the current supply circuit15. However, in step150, the changing of distribution of the supply current is only planned, and the actual supply current to each device is maintained at the present current value.

In subsequent step160, the MPU12operates the host controller14to transmit the changed current value to the device subject to change in supply current. Thereafter, the MPU12checks whether or not the device acknowledges the current value (whether or not operation is enabled) in step170.

More specifically, the MPU12issues the set command (Set Descriptor) of the consumption current from the host controller14to provide notification of the changed current value. The device receiving the set command returns the ACK packet if the current value set in the set command is a current value that is applicable and returns the STALL packet if it is a current value that is not applicable. The MPU12determines whether the device is operable or not based on the returned ACK packet or the STALL packet.

If there is a plurality of devices subject to change, the set command of the consumption current is issued to all of the devices in step160. In step170, determination is made whether acknowledgement (ACK packet) has been obtained from all the devices.

When device acknowledgement is obtained in step170, the MPU12proceeds to step180and changes the current value supplied from the current supply circuit15to each device21to23. After issuing the command (Set configuration) notifying the device23of connection recognition in step140, the present process is ended.

When device acknowledgement is not obtained in step170, the MPU12proceeds to step190and determines whether or not re-changing (re-adjustment) of the distribution of the supply current to each device is possible. If determined that re-changing is possible, the MPU120returns to step150and re-executes the processes from step150. If it is determined that re-changing is not possible, the MPU12proceeds to step200and ends the present process without performing recognition (issue of Set Configuration) of the device or newly connected equipment.

A specific example of negotiation performed between the host apparatus11and the devices21to23during the recognition process of a new device will now be explained with reference toFIG. 3toFIG. 8. In the first embodiment, the maximum supply current that the host apparatus11can supply to each device21to23is 1 A. Further, the maximum consumption current of each device21to23is 500 mA for the first device21, 300 mA for the second device and 300 mA for the third device. Further, the first device21is provided with a function for reducing the maximum consumption current from 500 mA to 300 mA, and the third device23is provided with a function for reducing the maximum consumption current from 300 mA to 250 mA. The second device22does not have a function for reducing maximum consumption current and thus cannot change the maximum consumption current from 300 mA.

First, as shown inFIG. 3, the third device23is newly connected by plugging in the third device23in a state in which the first and the second devices21and22are already connection-recognized by the host apparatus11and each is being operated by the bus-supplied power. Then, as shown inFIG. 4, the host apparatus11issues a request command (Get Descriptor) to request a profile (equipment information) for the third device23. The third device23provides the equipment information containing its own parameter (Max Power=300 mA) of the maximum consumption current in response to the request command.

The host apparatus11determines whether the maximum consumption current of 300 mA at a specification that it can supply. The host apparatus11is already supplying a current of 800 mA in total for the first and the second devices21and22. Thus, the remaining suppliable capability (spec) is 200 mA (=1000−500−300), and it is determined that the maximum consumption current (=300 mA) cannot be supplied to the third device23.

In the prior art, if the suppliable specification of the host apparatus11is exceeded, the newly connected third device23cannot be recognized. In the first embodiment, however, the host apparatus11requests a specification downgrade for each device21to23so as not to exceed the suppliable current (=1 A), and checks whether each device21to23is operable at the consumption current that has undergone the specification downgrade. When each device21to23is operable, the distribution of supply current to each device21to23is changed, and the newly connected third device23is recognized.

The maximum consumption current field (Max Power Field) of a configuration descriptor is used as a request command (Set Descriptor) for specification downgrade issued from the host apparatus11to each device21to23. The host apparatus11assigns and issues a current value that is a target specification to the field of maximum consumption current. In the USB standard, the maximum consumption current of the device is defined as an eighth parameter of the configuration descriptor.

In the first embodiment, the total maximum consumption current of each device21to23is 1100 mA, and when newly connecting the third device23in addition to the first and the second devices21and22, 100 mA lacks from the capacity of the suppliable specification (1000 mA) of the host apparatus11. Thus, the host apparatus11starts negotiation to adjust the distribution of the supply current to each device21to23.

The host apparatus11, for example, reduces 50 mA, which corresponds to the insufficient amount, from the supply current to the first and second devices21and22to compensate for the lacking 100 mA.

More specifically, the host apparatus11checks the second device22for whether it can operate at 250 mA, which has undergone a specification downgrade of 50 mA from the maximum consumption current, as shown inFIG. 5. That is, the host apparatus11assigns the data of 250 mA to the maximum consumption current field in the command (Set Descriptor) and transmits the data to the second device22. However, the second device22requires the supply current of 300 mA, and thus responds with a STALL packet indicating this is inapplicable.

Next, the host apparatus11, as shown inFIG. 6, contacts the first device21to check whether it can operate at 450 mA after undergoing a specification downgrade of 50 mA from the maximum consumption current. Here, the host apparatus11assigns the data of 450 mA to the maximum consumption current field in the command (Set Descriptor) and transmits it to the first device21. This is applicable to the first device21even if the supply current is reduced to 300 mA. Thus, the first device21responds with an ACK packet indicating an applicable state and acknowledges the operation at the supply current of 450 mA.

Next, the host apparatus11, as shown inFIG. 7, contacts the third device23to check whether it can operate at 250 mA after undergoing a specification downgrade of 50 mA from the maximum consumption current. Here, the host apparatus11assigns the data of 250 mA to the maximum consumption current field in the command (Set Descriptor) and transmits it to the third device23. This is applicable to the third device23even if the supply current is reduced to 250 mA. Thus, the first device21responds with an ACK packet indicating an applicable state and acknowledges the operation at the supply current of 250 mA.

The host apparatus, as shown inFIG. 8, reduces the supply current to the first device21to 450 mA and the supply current to the third device23to 250 mA. Thus, the first device21switches the operation to a low current consumption mode and the third device23starts the operation in the low current consumption mode.

In this way, the host apparatus11connection-recognizes the third device23, and the devices21to23all enter a communicable state.

In the above, a case in which the supply current to the connection-recognized devices21,22is changed when connection recognition of the new device23is possible has been explained. In comparison, in a case in which the supply current at which the newly connected device23is operable cannot be ensured even if the supply current to the devices21,22is changed, the device23cannot be recognized as in the prior art. In this case, the same supply current as before connection of the device23continues to be supplied to the first and the second devices21,22so that communication between the host apparatus11and the devices21and22is maintained.

The order of negotiation with each device21to23explained usingFIG. 5toFIG. 8can be changed when necessary. That is, in the specific example described above, a change of supply current inquiry is made to the connected device22, but a reduction of supply current inquiry may first be made to the new device23, and then a reduction of supply current inquiry may be made to the connected devices21and22when supply current to the device23cannot be adjusted.

Obviously, the reduction current value of 50 mA calculated by the host apparatus11is merely an example and negotiation can be performed based on any calculated result. InFIG. 6, a check may be made with the first device21on whether or not it can operate at 400 mA after undergoing a specification downgrade of 100 mA from the maximum consumption current. This is applicable to the first device21even if the supply current is reduced to 300 mA. Thus, the first device21responds with an ACK packet and acknowledges the operation at the supply current of 400 mA. With the reduction of supply current to the first device21, the supply current of 300 mA to the new device23is ensured. Thus, the negotiation (refer toFIG. 7) to reduce the supply current of the new device23becomes unnecessary.

The host apparatus11of the first embodiment of the present invention has the advantages described below.

(1) In the host apparatus, when the consumption current at the connection-recognized devices21,22and the new device23exceeds the supply capability of the current supply circuit15, the distribution of the supply current to each device21to23is changed in accordance with the capability. In the first embodiment, in addition to the device23newly connected to the host apparatus11, the supply current to the connection-recognized device21is changed. Through the change in distribution of the supply current, the supply current to operate the new device23is ensured. When compared to prior art, the number of devices that the host apparatus connection-recognize is thus increased.

(2) Notification of the suppliable current value is provided to the devices21to23using the command (Set Descriptor) complying with the USB standard. When receiving either the ACK packet or the STALL packet from the devices21to23, determination is made as to whether or not the device can operate. In this way, when performing negotiation to change the supply current to the devices21to23using the existing command, the program for executing such negotiation is easily formed. This is preferable from a practical standpoint.

(3) The host apparatus11includes a current monitoring circuit16for detecting the current flowing through the communication ports P1to P3and performing monitoring so that over current of a predetermined value or greater does not flow to each device21to23through the communication ports P1to P3. When over current is detected in the current monitoring circuit16, the supply of current to the device is stopped. This prevents the entire communication system from being affected in an adverse manner.

A second embodiment of the present invention will now be described.FIG. 9is a schematic block circuit diagram of a device31of the second embodiment.

The device31is a data recording and reproducing device having an optical disc32, which functions as a recording medium, and includes an MPU33, a memory34, an USB controller35, a power controller36, a device controller37, and a disc rotation motor38. The MPU33is connected to the memory34, the USB controller35, the power controller36, and the device controller37by an internal bus39so that data is transmitted and received between one another. A USB communication port P0is arranged in the device31. The device is connected to a host apparatus41by a USB cable C1that is inserted to the communication port P0. The device31of the second embodiment is a bus-powered device that operates with the bus-supplied power from the host apparatus41.

The MPU33, which serves as a control circuit, executes various processes in accordance with programs stored in the memory34and controls the entire device31. The programs stored in the memory34includes a communication program for controlling the USB controller35and the power controller36and a data processing program for controlling the device controller37.

The communication port P0is connected to the USB controller35by a switch unit42, and the communication data from the host apparatus41is conveyed to the USB controller35through signal lines D+, D− and the switch unit42. As shown inFIG. 10, the switch unit42includes two switch circuits42aand42b. The switch circuits42aand42b, which are each controlled based on the control signal Sa, Sb from the MPU33, connect or disconnect the signal lines D+ and D− that connect the communication port P0and the USB controller35. The switch unit42(each of the switch circuits42aand42b) is turned off by the control signals Sa and Sb from the MPU33so as to disconnect the device31from the host apparatus41.

The USB controller35is a communication circuit complying with the USB standard and controls the communication with the host apparatus41. More specifically, the USB controller35transfers the data (write data) contained in the packet received from the host apparatus41to the device controller37. Further, the USB controller35generates a transmission packet based on the transferred data (read data) from the device controller37and transmits the data to the host apparatus41.

The device controller37drives the motor38and rotates the optical disc32to read data from the optical disc32or write data to the optical disc32.

The power controller36is connected to the communication port P0(cable terminal referred to as VBUS), and current is supplied from the host apparatus41via the USB cable C1and the communication port P0. The power controller36manages the supply current that is supplied to the internal circuits including the MPU33, the memory34, the USB controller35, and the device controller37.

More specifically, the power controller36includes a register36afor storing information such as consumption current value of the device31, a switch circuit36bfor breaking the current path to the internal circuits, and a control section36cfor controlling the supply current to the internal circuits. The control section36cadjusts the current supplied to the MPU33, the memory34, the USB controller35, and the device controller37based on the consumption current value of the register36a. Further, the switch circuit36bis turned on or off based on the control signal from the MPU33. The switch circuit36bis normally turned on. However, when the device31is not connection-recognized by the host apparatus41, the switch circuit36bis turned off to shut off the power of the device31.

Of the processes executed by the MPU33of the device31, the process for connection-recognizing the host apparatus41will now be described with reference to the flowchart ofFIG. 11. The process ofFIG. 11starts when the device31is connected to the host apparatus41.

First, in step210, the MPU33waits until receiving a request command (Get Descriptor) requesting equipment information from the host apparatus41. The MPU33, upon receipt of the request command, proceeds to step220and transmits the transmitting packet containing the equipment information of the device31from the USB controller35to the host apparatus41.

Subsequently, the MPU33proceeds to step230and determines whether or not the request command (Set Configuration) from the host apparatus41is received. When the request command is received, the MPU33proceeds to step240and ends the present process after performing an activation process on the device32. If the host apparatus has the capability for supplying the maximum consumption current contained in the equipment information transmitted in step220, the host apparatus41issues the activation request command and supplies the maximum consumption current to the device31via the USB cable C1. Therefore, after performing the activation process of the device31in step240, write or read operation of the data is enabled at the requested maximum consumption current.

If the host apparatus41does not have the capability of supplying the maximum consumption current of the device31, the host apparatus41does not issue the activation request command. In this case, with the conventional device, connection-recognition is not achieved by the host apparatus41. Thus, the supply current necessary for operation cannot be acquired. The device31of the second embodiment, however, reduces its own consumption current so as to perform the process (process after step250) for being connection-recognized by the host apparatus41when the current supplying capability of the host apparatus41is insufficient.

More specifically, in step250, the MPU33determines whether a predetermined time has elapsed from the time the equipment information was transmitted. When the predetermined time has not elapsed, the MPU33returns to step230. When the predetermined time has elapsed, the MPU33determines that the host apparatus41cannot supply the requested maximum consumption current and proceeds to step260. The MPU33determines whether the maximum consumption current value can be changed or not. When determining that the consumption current value cannot be changed in step260, the MPU33proceeds to step270, turns off the switch circuit36bof the power controller36to shut off the power for the device31, and ends the present process.

If determined that the consumption current can be changed in step260, the MPU33proceeds to step280and changes the equipment information of the device31stored in the register36aof the power controller36. The consumption current value contained in the equipment information is reduced to a predetermined value, and the device controller37is set to the operation mode (low consumption current mode) corresponding to the reduced current value.

Subsequently, the MPU33, after turning off each of the switch circuits42aand42bof the switch unit42for a predetermined time, turns the switch circuits42aand42bon in step290. After having the device31in a temporarily disconnected state from the host apparatus41through the switching operation of the switch unit42, the MPU33returns to step210.

When the device31is in a temporarily disconnected state due to the process of step290, the host apparatus41determines that the device31has been reconnected. The host apparatus41then issues a request command requesting the equipment information. The device31that has received the request command in step210proceeds to step220and re-transmits the equipment information. The consumption current value reduced to a smaller current value is re-transmitted in step280.

The host apparatus41does not issue the activation request command when it cannot supply the reduced consumption current. Thus, the processes after step250are again performed. The host apparatus41issues the activation request command when it can supply the reduced consumption current value. Thus, the MPU33proceeds from step230to step240and ends the present process after performing the activation process for the device31. The activation process for the device31enables the device31to perform the write or read operation of the data at the reduced consumption current.

The device31of the second embodiment of the present invention has the following advantages.

(1) When the device31is connected to the host apparatus41and the consumption current of the internal circuits of the device31exceeds the supply capability of the host apparatus41, the host apparatus41does not issue the request command requesting activation of the device31. Thus, the MPU33makes a determination to reduce the consumption current of the device31. When the host apparatus41can supply the reduced consumption current, the device31is recognized by the host apparatus41, and the device31is operated by the bus-supplied power from the host apparatus41.

(2) The switch unit42for temporarily breaking the connection between the communication port P0(USB cable C1) and the USB controller35is arranged in the device31. Further, a register36afor storing the consumption current of the device31is arranged in the power controller36. When the supply capability of the host apparatus41is not sufficient, the consumption current of the device31in the register36ais reduced. Then, the switch unit42is turned off for a predetermined time. The connection between the communication port P0and the USB controller35is thereby temporarily broken by the switching operation of the switch unit42to have the host apparatus41recognize that the device has been reconnected. The host apparatus41issues a command requesting the equipment information. In response, the device31transmits the changed consumption current. In this way, change of consumption current of the device31is achieved not by an instruction from the host apparatus41but by the operation on the device31side.

(3) When the MPU33determines that the consumption current of the internal circuits in the device31is impossible (during non-recognition of device31), the power of the device31is shut off by the switch circuit36bof the power controller36. This prevents the device31, which is not recognized by the host apparatus41, from consuming current in an unnecessary manner.

A third embodiment of the present invention will now be described with reference to the drawings.FIG. 12is a schematic block circuit diagram showing a device43of the third embodiment. In the device43, the same reference characters are used for elements that are like those in the device31of the second embodiment. The following description centers on the difference from the second embodiment.

In the device43of the third embodiment, unlike the second embodiment, the device44controls a speaker45. Further, a level switch46serving as a setting unit is arranged in the device43, and a consumption current value calculated from the operation amount (set value) of the level switch46is stored in the register36aof the power controller36. The device43is connected to the host apparatus41by a USB cable C1. When the host apparatus41requests the equipment information from the device43, the device43requests the consumption current value corresponding to the set value of the level switch46from the host apparatus41.

The process executed by the MPU33of the device43for connection recognition will now be described with reference to the flowchart ofFIG. 13. The process ofFIG. 13is started when the device43is connected to the host apparatus41.

First, in step310, the MPU33calculates the consumption current value corresponding to the set value of the level switch46and stores the calculated value as the consumption current value of the equipment information in the register36aof the power controller36. Then, the MPU33proceeds to step320and waits until receiving a request command (Get Descriptor) requesting equipment information from the host apparatus41. The MPU33, upon receipt of the request command, proceeds to step330, and transmits the equipment information for the device43to the host apparatus41.

When the host apparatus41can supply the consumption current value contained in the equipment information to the device43, the activation request command is issued from the host apparatus41. In this case, the MPU33proceeds from step340to step350. After performing the activation process for the device43, the MPU33ends the present process. Thus, the audio output from the speaker45is enabled at the consumption current requested by the host apparatus41.

If the host apparatus41cannot supply the consumption current for the device43, the host apparatus41does not issue the activation request command. In this case, the MPU33repeatedly executes the processes of step340and step360until a predetermined time has elapsed from the time the equipment information is transmitted. After a predetermined time has elapsed, the MPU33proceeds to step370.

The MPU33determines whether the level switch46has been operated and the set value has changed in step370. If the set value of the level switch46has been changed, the MPU33proceeds to step380to re-calculate the consumption current value corresponding to the set value of the level switch46and stores the calculated value in the register36aof the power controller36.

Subsequently, the MPU33turns off the switch unit42for a predetermined time and then turns it on to have the device43in a state temporarily disconnected from the host apparatus41in step390and then returns to step320.

When the device43is in a temporarily disconnected state due to the process of step390, the host apparatus41determines that the device31has been reconnected. The host apparatus41then issues the request command requesting for the equipment information. The device43that has received the request command in step320re-transmits the equipment information in step330. The consumption current value corresponding to the changed set value of the level switch46is re-transmitted.

The host apparatus41does not issue the activation request command when it cannot supply the changed consumption current value. Thus, the processes after step360are again performed. The host apparatus41issues the activation request command when it can supply the changed consumption current. Thus, the MPU33proceeds from step340to step350and ends the present process after performing the activation process. The device43is then able to perform the audio output from the speaker45at the changed consumption current through the activation process of the device43.

The device43of the third embodiment of the present invention has the advantages described below.

(1) When the consumption current of the device43exceeds the supply capability of the host apparatus41and the host apparatus41does not recognize the device43, if the set value of the level switch46is changed, the consumption current that is in accordance with such set value is calculated and stored in the register36aof the power controller36. Then, the device43is recognized as being reconnected by the host apparatus41through the switching operation of the switch unit42. In response to the request command issued from the host apparatus41, the device43notifies the changed consumption current to the host apparatus41. When the host apparatus41is able to supply the changed consumption current, the device43is recognized by the host apparatus41, and the device43is operated by the bus-supplied power from the host apparatus41.

(2) When notification of the consumption current corresponding to the set value of the level switch46is provided to the host apparatus41and the consumption current is supplied from the host apparatus41, the device43is operated with an appropriate supply current corresponding to the set value of the level switch46.

A fourth embodiment of the present invention will now be described.

In the fourth embodiment, the configuration of the device31is similar to the second embodiment shown inFIG. 9. Further, when determining that the consumption current of the device cannot be supplied during connection recognition, the host apparatus41of the fourth embodiment notifies the device31of the suppliable current. The device31reduces the consumption current in accordance with the supply current of the host apparatus41to have the host apparatus recognize the device31.

FIG. 14is a flowchart describing the process of connection recognition of the device31in the fourth embodiment. InFIG. 14, steps410to440, and470to490are identical to steps210to240and270to290of the second embodiment, and steps450and460differ from the second embodiment. The following description centers on the difference from the second embodiment.

That is, when the consumption current value of the device31transmitted in step420exceeds the capability (suppliable current value) of the host apparatus41, the host apparatus41notifies the device31of the suppliable current amount without issuing the request command for requesting activation of the device31. In this case, the MPU33of the device31receives the suppliable current value of the host apparatus41in step450. The MPU33proceeds to step460, and determines whether the device31is operable at the suppliable current value of the host apparatus41.

When determining that the device31is inoperable in step460, the MPU33proceeds to step470and turns off the switch circuit36bof the power controller36. This shuts off the power of the device31and ends the present process.

When determining that the device31is operable in step460, the MPU33proceeds to step480and changes the equipment information of the device31stored in the register36aof the power controller36. The consumption current value contained in the equipment information is changed to a value that is the same as the suppliable current value of the host apparatus41. Further, the MPU33sets the operation mode of the device controller37to the low consumption current mode that corresponds to the changed current value.

Subsequently, the MPU33turns off the switch unit42for a predetermined time and then turns it on in step490to temporarily disconnect the device31from the host apparatus41. Then, the MPU33returns to step410.

When the device31is in a temporarily disconnected state due to the process of step490, the host apparatus41determines that the device31has been reconnected and thus issues the request command for requesting the equipment information. When receiving the request command in step410, the MPU33moves to step420to re-transmit the equipment information (consumption current value) which has been changed in step480. Since the suppliable current value of the host apparatus41is transmitted, the host apparatus41determines that it can supply the consumption current of the device31and issues the activation request command. Therefore, the MPU33proceeds to step440and ends the present process after performing the activation process on the device31. This enables the device31to perform the write or the read operation of data at the reduced consumption current (current available by the host apparatus41) by the activation process of the device31.

The device31of the fourth embodiment of the present invention has the advantages described below.

(1) When the consumption current of the device31exceeds the suppliable capability of the host apparatus41, the consumption current of the device31is reduced in accordance with the capability of the host apparatus41. In this way, the performance (write or read speed) of the device is maximized at the suppliable current of the host apparatus41.

A fifth embodiment of the present invention will now be described with reference to the drawings.FIG. 15is a schematic block circuit diagram showing a host apparatus51of the fifth embodiment.

The host apparatus (more specifically, personal computer)51includes an MPU52, a memory53, a host controller54, a current supply circuit55, and a display56. In the host apparatus51, the MPU52, the memory53, the host controller54, the current supply circuit55, and the display56are connected by an internal bus57to transmit and receive data with one another. First to tenth communication ports P1to P10, to which the USB devices are connected, are arranged in the host apparatus51.

The MPU52serving as a control circuit executes various processes in accordance with programs stored in the memory53and controls the entire host apparatus51. The programs stored in the memory53include a communication program, which controls the host controller54and the current supply circuit55, and a display program, which displays the equipment information of each device connected to each communication port P1to P10on the display56in a GUI (Graphic User Interface) format.

The host controller54is a communication circuit complying with the USB standard and controls communication with devices connected to each communication port P1to P10. A register54ais arranged in the host controller54and the equipment information of devices connected to the communication ports P1to P10are stored in the register54a. More specifically, when a device is connected to any one of the communication port P1to P10, the host apparatus51performs negotiation with the device to recognize the connection and stores the equipment information obtained therefrom in the register54a.

The current supply circuit55supplies the maximum consumption current contained in the equipment information of the register54ato the device connected to the communication port. Further, a limiter58is arranged in a current path connecting the current supply circuit55and each communication port P1to P10. The limiter58is a current monitoring circuit including a switch circuit that is inactivated to break the current path when over current that is greater than or equal to a predetermined current flows.

The MPU52executes an application program (program for display) to read the equipment information stored in the register54aof the host controller54and show a status window on the display56, which serves as the display device.

More specifically, as shown inFIG. 16, when a plurality of devices61to67are connected to the host apparatus51, the status window W1ofFIG. 17is shown on the display56. A keyboard61with a mouse is connected to the first communication port P1in the host apparatus51, a printer62is connected to the second communication port P2, and a hard disk63is connected to the third communication port P3. Further, an optical disc64is connected to the fourth communication port P4, and a scanner65is connected to the fifth communication port P5. Moreover, digital still cameras (DSC)66and67are connected to the eighth communication port P8and the ninth communication port P9. The keyboard61, the printer62, the hard disk63, the optical disc64, the scanner65, and the DSCs66and67are USB devices incorporating a USB function (USB communication function) and are each connected to a communication port of the host apparatus51by a USB cable C1.

In the fifth embodiment, the printer62is a device that is operated not by the bus-supplied power of the USB but by the power supplied from a separate power cable (not shown). Other devices are bus-powered devices operated by the bus-supplied power of the USB.

Referring toFIG. 17, the status window W1displayed on the display56has columns for items including the selector, the port number (Port No.), the device name, the manufacturer, the consumption current (mA), and the state. The device name, the manufacturer, and the consumption current are displayed for every communication port based on the equipment information stored in the register54aof the host controller54. Further, the column of the consumption current indicates the consumption current value (requested value) of the device requested from the host apparatus51and the current value (present value) presently supplied from the host apparatus51via the USB cable C1.

The requested values of the device at each port are, 100 mA for the keyboard61, 100 mA for the printer62, 500 mA for the hard disk63, 500 mA for the optical disc64, 300 mA for the scanner65, 200 mA for the DSC66, and 250 mA for the DSC67.

In the selector column, a selection button for switching the device connected to each communication port to either the ON state or the OFF state (used state or unused state) is arranged. In the communication port P1to P5, P8, and P9to which the devices61to67are connected, the button of either ON or OFF is selected. The ON button is selected for the first to the fourth communication ports P1to P4and the ninth communication port P9, and the OFF button is selected for the fifth communication port P5and the eighth port P8.

When the ON buttons of the communication ports P1to P4, P9are selected, the consumption current requested by the devices61to67is supplied from the current supply circuit55, and the USB function in the relevant devices is activated. Thus, the state column is “active”. However, since the printer62is operated not by the bus-supplied power but by its own power source, the “active” state is indicated in blue, whereas the “active” state is indicated in red for the other devices since they are operated by the bus-supplied power. The consumption current column indicates the present value, which is the current value that is the same as the requested value.

If the OFF buttons of the communication ports P5and P8are selected, the consumption current requested by the devices65and66is not supplied from the current supply circuit55. Thus, the USB function of the devices65and66is suspended (inactivated). In this state, “suspend” is shown in the state column, and 2.5 mA is shown as the present value of the consumption current.

Further, for the communication ports P6, P7, and P10, which are not used, 0 mA is indicated as the requested value and the present value of the consumption current, and “Not use” is indicated in the state column.

Moreover, a display column indicating the requested consumption current, the used current, the tolerable current, and the margin current for all the ports is located below the status window W1. The requested consumption current is the current of the sum of the requested value of all the communication ports, and the used current is the sum of the present current values of all the ports. Further, the tolerable current is the maximum current that can be output by the current supply circuit55, and the margin current is the current obtained by subtracting the used current from the tolerable current.

In the above specific examples, the requested consumption current is 1950 mA, and the used current is 1455 mA. Further, the tolerable current is 2500 mA and the margin current is 1045 mA. Therefore, if the ON buttons of the fifth communication port P5and the eighth communication P8are selected and the current of the requested value is supplied to the scanner65and the DSC66connected to the respective communication port P5and P8, the tolerable current of 2500 mA is not exceeded since the used current is 1950 mA. In this case, the scanner65and the DSC66are properly operated.

If a device having the maximum consumption current of 500 mA is connected to the unused communication ports P6, P7, P10of the host apparatus51, the tolerable current of the host apparatus51is exceeded. In this case, in addition to the operation of the newly connected device, the operation of the connected devices becomes unstable.

Thus, in the fifth embodiment, as shown inFIG. 18, when new devices (hard disk71,72, hub73) are connected to the communication ports P6, P7, and P10of the host apparatus, each device will not immediately be in the operable state and the bus-supplied power of 100 mA is first permitted to flow so as to enable only the transfer of information. The host apparatus51shows the status window W2ofFIG. 19based on the equipment information obtained by the transfer of information.

That is, with respect to the communication ports P6, P7, P10, the device name, the manufacturer, the consumption current, and the state are displayed. The requested values of the hard disks71,72, and the hub73, which are newly connected to the communication ports P6, P7, and P10, are 500 mA, and the present values are 100 mA. In the selector column of each communication port P6, P7, and P10, neither the ON button nor the OFF button is selected, and the USB function is in a waiting state. Thus, “Wait” is indicated in the state column.

Further, in the status window W2, the requested consumption current is 3450 mA, the used current is 1755 mA, the tolerable current is 2500 mA, and the margin current is 745 mA.

The user operating the host apparatus51is required to determine whether or not each device will be used with the status window W2shown on the display56. The user operates the mouse of the keyboard61while paying attention to the tolerable current displayed on the status window W2. After selecting the OFF buttons for the optical disc64and the DSC67that will not be immediately used, the user selects the ON buttons for the newly connected hard disks71,72and the hub73.

As a result, the status window W3is displayed on the display56, as shown inFIG. 20. In the status window W3, compared to the status window W2ofFIG. 19, for the fourth communication port P4(optical disc64) and the ninth communication port P9(DSC67), the present values are changed to 2.5 mA and the indicated states are “suspend”. Further, for the seventh communication port P7(hard disk72), the present values of the sixth communication port P6(hard disk71) and the tenth communication port P10(Hub73) are changed to 500 mA and the indicated states are changed to “active”. Since the hub73is equipment that is operated not by the bus-supplied power but by its own power source, the “active” state is indicated in blue.

In this case, the used current becomes 2210 mA and a margin current of 290 mA is obtained with respect to the tolerable current of 2500 mA. Thus, the host apparatus51is able to connection-recognize the new devices (hard disk71,72, and hub73) and properly operate each device71to73.

Of the processes executed by the MPU52of the fifth embodiment, the process for displaying the status windows W1to W3will now be described with reference to the flowchart ofFIG. 21. The process ofFIG. 21starts after an initialization process performed when the host apparatus51is activated.

First, in step510, the MPU52, after acquiring the equipment information of each device from the register54aof the host controller54, proceeds to step520and displays the status window W1(refer toFIG. 17), which corresponds to the equipment information, on the display56. In step530, the MPU52determines whether there is a change in the equipment connection state, such as a new device being connected to an unused communication port and a connected device being disconnected from a connection port. When determining that there is change, the MPU52proceeds to step540and updates the equipment information of the register54ain the host controller54. For example, when a new device is connected to a predetermined communication port, a request command is issued from the host controller54to the new device. The equipment information returned from the device in response to the request command is stored in the register54a. When a connected device is disconnected from a predetermined communication port, the equipment information relating to that device is deleted from the register54a.

In step550, the MPU52shows the status window based on the updated equipment information. In the following step560, the MPU52determines whether or not a button in the select column shown in the status window has been selected by the user through a mouse operation. If a button has not been selected, the MPU52returns to the process of step530. Further, when determining that there is no change in the equipment connection state in step530, the MPU52proceeds to step560without performing the processes of step540and550.

Therefore, when the user does not connect a new device to the host apparatus51and does not select a button in the selector column of the status window W1, the processes of step530and step560are repeated. Thus, the status window W1shown in step520is continuously shown on the display56.

Further, as shown inFIG. 18, when the user sequentially connects the hard disks71,72, and the hub73to the respective communication port P6, P7and P10, the process of steps530to560are repeated three times. As a result, the status window W2ofFIG. 19is shown on the display56.

When the user selects a button in the select column of the status window W2, the MPU52proceeds to step570from step560to change the current supplied from the current supply circuit55for the selected communication port. Subsequently, the MPU52proceeds to step580and, after displaying the status window corresponding to the button selection of the user on the display56, returns to the process of step530. In step580, the state column is changed in accordance with the button selection and the consumption current is calculated (calculation of used current and margin current).

More specifically, in the status window W2, after the OFF buttons for the fourth communication port P4and the ninth communication port P9are selected, the ON buttons for the sixth communication port P6, the seventh communication port P7, and the tenth communication port P10are sequentially selected. In this case, the processes of step560to step580are repeated for every button selection. As a result, the status window W3ofFIG. 20is shown on the display56.

Although not shown in the drawings, when over current greater than the maximum consumption current of each device flows causing the flow limiter58to function, a message indicating the flow of over current is shown on the status window W1to W3to warn the user. More specifically, “Warning” is shown in the state column of the status windows W1to W3so as to give off an alarm. Alternatively, the present value of the over current is indicated with a color differing from that of a normal value.

When the USB device is connected to the hub73, which is connected to the tenth communication port P10of the host apparatus51, the status window of the hub73may be shown.

More specifically, as shown inFIG. 22, when a plurality of devices81to83are connected to the hub73, which serves as a relay device, the status window W11ofFIG. 23is shown on the display56of the host apparatus51. That is, the hub73has first to tenth communication ports P11to P20for connection to USB devices. The optical disc81is connected to the first communication port P11, the hard disk82to the second communication port P12, and the DSC83to the fourth communication port P4.

Further, in the status window W11ofFIG. 23, the ON button is selected for the first and the second communication ports P11and P12, and the OFF button is selected for the fourth communication port. Therefore, the respective requested current value (=100 mA) is supplied from the current supply circuit (a power IC that is not shown in the drawings) to the optical disc81and the hard disk82.

The hub73is equipment that operates with its own power source (self-powered hub), and the current (tolerable current) that can be output from the current supply circuit is 5000 mA. That is, the hub73is able to supply current of a maximum of 500 mA as specified by the USB standard to each of the communication ports P11to P20. Thus, the supply current to each device does not need to be controlled in the hub73, and the status window W11notifies the user of the used or unused state of each device connected to the hub73.

Further, as shown inFIG. 24, the hub84may be connected to the communication port P13of the hub73. In this case, in addition to the status window W12of the hub73shown inFIG. 25, the status window (not shown) of the hub84is shown on the display56of the host apparatus51. When displaying a plurality of status windows, each window is displayed in a pop-up style or in a scroll style.

The hub that is operated by bus-supplied power may be connected to any one of the communication ports of the host apparatus51.FIG. 26shows a hub (bus-powered hub) that is operated by bus-supplied power. In the hub85, the optical disc81is connected to the first communication port P11, the hard disk82to the second communication port P12, and the DSC83to the fourth communication port P4. As shown inFIG. 27, the status window W13of the hub85is shown on the display56of the host apparatus51. In this case, the tolerable current of the hub85is 400 mA and small. Thus, the window W13enables the user to select the necessary devices without exceeding the tolerable current.

The host apparatus51of the fifth embodiment of the present invention has the advantages described below.

(1) The status windows W1to W3indicating the equipment information for devices61to67and71to73connected to each communication port P1to P10are shown on the display56of the host apparatus51. In addition to the equipment information (device name, manufacturer, consumption current) acquired from each device61to67and71to73, the selection buttons (ON button and OFF button) enabling the user to select a used state or unused state for each device is shown in the status window W1to W3. When the user checks the status window W1to W3and selects a button, the supply current to each device is controlled based on the selected result. In this way, the used state of each device at that point of time may be checked with the status window W1to W3.

In the prior art, when increasing the number of ports of the communication port in the host apparatus, the current supply capability of the current supply circuit must be raised as the communication ports increase. This enlarges the circuit scale. In the fifth embodiment, however, management of the supply current to each of the devices61to63and71to73is enabled in accordance with the current supply capability of the current supply circuit55. Thus, more ports may be installed without enlarging the circuit scale.

(2) The display screen (screen of status windows W1to W3and W11to W13) of the display56is shown in the GUI format. This enables easy selection of selection buttons shown in each of the status windows W1to W3and W1to W13through a mouse operation.

(3) The tolerable current of which the host apparatus51is capable of supplying, the used current supplied from the host apparatus51to the devices61to63and71to73, and the margin current obtained by subtracting the used current from the tolerable current are shown in the status windows W1to W3. In this case, the user selects the OFF buttons of unnecessary devices and selects the ON buttons of the necessary devices while checking the margin current so as not to exceed the capability of the host apparatus51.

(4) The status windows W11to W13of the hubs73and85connected to the communication port P10of the host apparatus51are displayed separately from the status windows W1to W3of the host apparatus51. In this case, the status windows W11to W13of the hubs73and85are checked by the user, and the management of the supply current of each device81to84connected to the hubs73,85is appropriately performed.

(5) In the host apparatus51, the limiter58is arranged in the current path connecting the current supply circuit55and each communication port P1to P10. Thus, the system operation is prevented from being unstable.

A sixth embodiment of the present invention will now be described.

FIG. 29is a schematic block circuit diagram showing a host apparatus51aof the sixth embodiment.

In the sixth embodiment, the configuration of the host apparatus51ais the same as the host apparatus51of the fifth embodiment shown inFIG. 15. As shown inFIG. 29, the host apparatus51aincludes a plurality of communication ports P1to P10, and USB devices D1to D10are respectively connected to the communication ports P1to P10.

The devices D1to D9are substantially the same devices as those of devices61to65,71,72,66, and67of the fifth embodiment and have the same electrical properties (USB function, requested value). The device D10is an optical disc and the requested value is 500 mA. The device (e.g., device D1) or the device name (e.g., keyboard D1) will be used in the following description.

The MPU52serving as the control circuit executes various processes in accordance with programs stored in the memory53and controls the entire host apparatus51a. The program stored in the memory53includes a communication program, a display program, a current control program, and an application program. The communication program is a program for controlling the host controller54and the current supply circuit55. The display program is a program for displaying the equipment information of each device D1to D10connected to each communication port P1to P10in a GUI (Graphic User Interface) format. The current control program is a program for controlling the current supplied to the devices D1to D10connected to each communication port P1to P10.

The application program is a program for performing spreadsheet calculations, word processing, image processing, or the like. The MPU53may use the above devices when executing the application program. For instance, when executing a spreadsheet application program, the MPU53reads data for calculation from the hard disk D3(D6, D7) and prints out the data with a printer D2.

When using one of the USB devices D1to D10connected to the communication port P1to P10during execution of an application program and the like, the MPU52changes the operation state of that device. The MPU52changes the operation state of the device that is to be used if it is in an inactive state.

Devices provided with the USB function may be a bus-powered device or a self-powered device. In a bus-powered device, the USB function and the device main body are activated by current supplied via the USB cable C1. In the self-powered device, the device main body is operated by an external power source and the USB function is activated by current supplied via the USB cable or by the current supplied via the USB cable and the external power source. Further, a device in an inactive state is supplied with current (2.5 mA in the fifth embodiment) that allows minimum communication (device re-set or reception of data signal) with the host apparatus51awith respect to the USB function. A device in an active state is supplied with current (requested current) that allows all the operations of the device in accordance with the communication speed. Therefore, the MPU52activates the USB function of the device that is to be used, that is, changes the state of the status window to “active” and supplies the requested current.

When the total consumption current value of all the connected devices exceeds the tolerable current value of the host apparatus51aby the activation of the devices, the MPU52must inactivate some of the active devices so that the total consumption current value does not exceed the tolerable current value.

Thus, the MPU52shows the status window on the display56to have the user operating the host apparatus51adecide whether or not to use each device. The user operates the mouse of the keyboard61while paying attention to the tolerable current indicated in the status window and selects the OFF button of the device that is not presently being used.

The MPU52, after suspending (inactivating) the USB function of the device for which the OFF button has been selected by the user, operates (activate) the USB function of the device that is to be used. The MPU52then shows the status window including the changed operation state on the display56.

As a result, when using an inactive device through a program, such as an application, it is only necessary to select the device that is to be inactivated. In other words, if the inactive device is not selected, the inactive device is activated as a device that is to be used. Thus, the user does not have to check whether the device that is to be used in the program is active or inactive and does not have to change an inactive device to an active state. Thus, there is no burden for activating the device.

When changing the operation states of the connected devices D1to D10, the MPU52saves the status window from the display56. The status window includes columns for the items of the selector, the port number (Port No.), the device name, the manufacturer, the consumption current (mA), and the state. The display information (equipment information, state of equipment and the like) for each column is stored in a first region53aof the memory53. The MPU52shows the display information (equipment information, state of equipment etc.) stored in the first region53ain each column of the status window. Therefore, saving the status window refers to saving the display information corresponding to each column, and the MPU52has the information (i.e., various information stored in the first region53a) of the status window transferred to a second region53bof the memory53.

The saving of the status window is performed to prevent setting defects. With a plurality of devices connected to the host apparatus51, when the total requested value of the devices exceeds the tolerable current value of the host apparatus51a, some of the selected devices are activated and the other devices are inactivated. Thus, when a device used to execute the application program is inactive, that device must be activated. However, if a used device remains active, the present setting of that device may differ from the user's desirable setting and thus may cause a deficiency. For instance, when activating the device that is to be used, if the total current consumption value of the devices exceeds the tolerable current value of the host apparatus51a, an active device must be inactivated to reduce the used current. Thus, when such a device is inactivated although it is to be used next, the device cannot be used since its setting may have been changed. Further, the user must display the status window to change the operation state. This is troublesome.

FIG. 30is a flowchart showing a device controlling process during execution of a program such as an application.

The MPU52first has the status window saved in step610. In the following step620, the MPU52compares the margin current value and the requested value of the device that is to be used to determine whether or not the supply of current to that device is possible.

As for the information stored in the first region53aof the memory53, when determining that the supply of current is possible (margin current value≧requested value), the MPU52changes the state of the used device to “active” in step630.

Next, the MPU52supplies the current of the requested value to the device that is to be used in step640, and executes the processing of the device in step650. After the termination of the processing, the supply of current is suspended in step660, and the status window is returned in step670.

When determining that the supply of current is not possible (margin current value<requested value) in step620, the MPU52shows the status window in step680. Then, the MPU52waits for the user to change the state in step690. When the state is changed, the MPU52proceeds to step640. That is, the state of the device that will not be used is changed to “suspend” by the user to obtain margin current.

When the state is changed by the user, it may be determined whether such a change would enable the supply of current. That is, the MPU52proceeds from690to step620. In this case, even if the device that is to be suspended is incorrect due an operation error or the like, steps620,680,690are repeatedly executed until the margin current is obtained. This ensures the margin current.

An example in which a printing process is executed by the host apparatus51aon the printer62will now be described.

The host apparatus51ahas tolerable current of 2500 mA and a margin current of 140 mA as indicated in the status window W11ofFIG. 31. The MPU52has the status window W11transferred to the second region53bof the memory53, which is shown inFIG. 29.

The MPU52then determines whether or not the supply of current is possible. The requested value of the printer D2is 100 mA. Therefore, even if the current of the requested value is supplied to the printer62, the usable current will be 2460 mA and does not exceed the tolerable current of 2500 mA. Thus, the MPU52activates the printer D2, and executes the printing process in which a command or the like is transmitted to the printer D2. After the termination of the printing process, the MPU52returns the status window W11.

The host apparatus51ahas a tolerable current of 2500 mA and a margin current of 90 mA as indicated in the status window W12shown inFIG. 32. The MPU52has the status window W12transferred to the second region53bof the memory53, which is shown inFIG. 29.

The MPU52then determines whether or not the supply of current is possible. The requested value of the printer D2is 100 mA. Therefore, when the current of the requested value is supplied to the printer D2, the tolerable current of the host apparatus51ais exceeded. Thus, the operation of the device is unstable.

Therefore, the MPU52shows the status window W12on the display56to have the user, who operates the host apparatus51, decide whether or not to use each device. The user operates the mouse of the keyboard D1while paying attention to the tolerable current indicated on the status window W12and selects the OFF button for the scanner D5that is not used in this process.

Consequently, as shown inFIG. 33, status window W13is shown on the display56. In the status window W13, compared to the status window W12ofFIG. 32, the present value of the fifth communication port P5(scanner D5) is changed to 2.5 mA, and the display of state is changed to “suspend”. Further, the present value of the second communication port P2(printer D2) is changed to 100 mA, and the indication of the state is changed to “active”. The printer D2is equipment that is not operated by the bus-supplied power but by its own power source. Thus, the state of “active” is indicated in blue.

The used current is 2210 mA, and thus there is a margin current of 290 mA with respect to the tolerable current of 2500 mA. The host apparatus51aexecutes the printing process by transmitting a command or the like to the printer D2. After the termination of the printing process, the MPU52returns the status window W12.

The host apparatus51aof the sixth embodiment of the present invention has the advantages described below.

(1) The host apparatus51a, when using a plurality of connected devices D1to D10during the execution of an application program, supplies the current amount requested by the device that is to be used when that device is in the suspended state. At this point of time, it is determined whether or not the total value of the current amount supplied to the plurality of devices exceeds the tolerable current amount when supplying current of the requested amount. When the total value does not exceed the tolerable current amount, the host apparatus51asupplies the current of the requested amount to the device and activates that device. In this case, the user does not need to activate the device and thus can easily use the device without any problem. Further, since the device is activated by executing the program, the time until the device is activated is shorter compared to when the user activates the device. Further, the time until termination of the process is shorter compared to when the user activates the device.

(2) When the total value of the current amount that is to be supplied to a plurality of devices exceeds the tolerable current value, the host apparatus51ashows the status window on the display56when using the devices. When the user who has checked the status window selects a button, the supply current to the selected device is reduced and the current of the requested amount is supplied to the device that is to be used. In this case, the user only selects the device that will not be used. Thus, that device is easily activated.

(3) The host apparatus51ahas the status window saved prior to changing the amount of current to be supplied to a plurality of connected devices and returns the status window after terminating the process (termination of use of device). In this case, a device in a suspended state can be used while maintaining the state of other devices as the user intends to so that a device does not have to be activated.

A seventh embodiment of the present invention will now be described.

FIG. 34is a schematic block circuit diagram of a host apparatus51bof the seventh embodiment.

In the seventh embodiment, the configuration of the host apparatus51bis the same as the host apparatus51aof the sixth embodiment shown inFIG. 29. Further, USB devices D1to D10are each connected to a plurality of communication ports P1to P10of the host apparatus51b, which is shown inFIG. 34.

A function execution flag53cis stored in the memory53. As shown inFIG. 36, the function execution flag53cindicates the state of operation of each device connected to the communication ports P1to P10of the host apparatus51b. In this diagram, the devices indicated as “active” are operating, and the devices indicated as “Wait” are is a state in which operation is suspended.

An operating device has the current of the requested value supplied from the host apparatus51bsince the USB function is active. Devices in a state in which operation is suspended include a device of which USB function is in operation (active) and a device of which USB function is in suspension (Suspend). That is, devices in a suspended state includes a device in which the current of the requested value is supplied and a device in which a smaller current (e.g., 2.5 mA) corresponding to the operation mode (suspend mode) is supplied.

Like the sixth embodiment, when using an inactive device during execution of an application program or the like, the MPU52activates that device. When activation of the device causes the total current consumption value of all the connected devices to exceed the tolerable current value of the host apparatus51a, the MPU52inactivates some of the active devices so that the total current consumption value does not exceed the tolerable current value. The MPU52determines the device that is to be inactivated based on the information (state of device) shown in the status window and the function execution flag53c.

More specifically, the MPU52searches for a device in a suspended state (Wait) from the function execution flag53c. Next, the MPU52searches from the devices in a suspended state for the device in which the USB function is active. That is, the MPU52supplies the current of the requested value based on the status window. The MPU52inactivates the USB function of the device supplying the current of the requested value and reduces the current amount that is to be supplied.

The device that is to be used through the execution of a program, such as an application, is automatically activated. When the current supplied from the host apparatus51to that device by such activation exceeds the tolerable current, a device that is not presently being used is automatically changed to a suspended state so as to obtain margin current. Therefore, there is no need to perform the troublesome operation of activating a device and the operation of the entire system is prevented from becoming unstable.

When there is more than one device that is in the suspended state and has an active USB function, the MPU52changes all of the existing devices to “suspend”. Thus, a margin current is obtained and a process is executed on a device within a short period of time. The reasons for changing all the devices in the suspended state to “suspend” is in that when only some of the devices are changed to “suspend”, the margin current value may not exceed the requested current consumption value of the devices that are to be used. This would require further devices to be changed to “suspend” and delay the initiation of a process.

When the operations that were expected end, the MPU52changes the used device to the suspended state. The termination of the device operation is performed by the inquiry from the host apparatus51to the device. More specifically, the MPU52issues a request command to check the operation state of a device via the host controller54at predetermined intervals, and the device transmits a response command in response. The MPU52checks the operation state of the device based on the received response command. In the seventh embodiment, the operation states include an auto power down state, a command terminated state, and a functioning state. When necessary, other operation states may also be included.

The request command issued to a device and the response command transmitted by that device differ depending on the type of the device. For instance, in the case of a removable disc device, “TEST UNIT READY COMMAND” is used as the request command. The host apparatus51bissues this command, and the device replies to the command to indicate whether or not it is in a “READY state”. The removable disc device generates the reply of “READY state” when the recording medium is set and generates the reply of “NOT READY state” when the recording medium is not set. Based on the received state, the host apparatus51bsets a function execution flag in a suspended state when the removable disc device is in the “NOT READY state” since it is not in a usable state. A command for accessing the recording medium may be a request command such as a “READ SECTOR command” or “a WRITE SECTOR command”. The host apparatus51breads the contents of the status register after termination of the data transfer. When no problem is found, the host apparatus51bsets the function execution flag to a suspended state. When using an access command, the current of the requested value is supplied only when an access is performed. This reduces the consumption current.

The MPU52sets the function operation flag to a state indicating operation (active) when the device is in operation and sets the function operation flag to a state indicating a suspended state (Wait) in other cases (auto power down state or command terminated state).

When changing the state of a device, the MPU52performs saves the status window from the display and returns the status window in the same manner as in the sixth embodiment. Thus, after the termination of a process, a device is prevented from remaining inactive when the user does not intend to do so. Thus, the user does not have to activate the device in such a case.

FIG. 35is a flowchart of a device controlling process during execution of program such as an application. In the flowchart, steps710to770are substantially the same as steps610to670shown inFIG. 30.

When it is determined that the supply of current is not possible (margin current value<requested value) in step720, based on the function execution flag, the MPU52searches for a device that is not executing the program in step780. Next, the MPU52inactivates the device that is not executing the program in step790. That is, the state of the device that is not used is changed to “suspend” by the host apparatus51bso as to obtain margin current. The MPU52changes the state of the device to be used to “active” in step800and proceeds to step740.

The host apparatus51bof the seventh embodiment of the present invention has the advantages described below.

(1) The host apparatus51bincludes the function execution flag53c, which indicates the operation state of the device connected to the communication ports P1to P10. When activation of all the inactive devices causes the total consumption current value of all the connected devices to exceed the tolerable current value of the host apparatus51aduring execution of an application program or the like, the host apparatus51binactivates some of the active devices based on the function execution flag53cso that the total consumption current value does not exceed the tolerable current value. In this case, the device that is to be used is automatically activated during execution of a program such as an application. When the activation causes the current supplied by the host apparatus51to the device to exceed the tolerable current, the device that is not presently used is automatically changed to the suspended state to obtain the margin current. Therefore, the device does not have to be activated. This prevents the operation of the entire system from becoming unstable.

An eighth embodiment of the present invention will now be described.

In the eighth embodiment, the configuration of the host apparatus is similar to that of the seventh embodiment shown inFIG. 34. The host apparatus51bof the eighth embodiment is provided with a function for changing the function execution flag of a device that is in suspension to OFF to inactivate the USB function of that device. That is, the host apparatus51bchanges the state of a device to “suspend” when the function execution flag is OFF.

Therefore, the function execution flag is OFF for a device of which operation has been terminated. Further, the USB function of the device is inactivated. This reduces the current supplied from the host apparatus51b.

Further, in the same manner as in the seventh embodiment, when using an inactive device during execution of an application program or the like, the host apparatus51bof the eighth embodiment activates that device. When doing so, the device of which operation has been terminated is inactivated and supplied with current (e.g., 2.5 mA) that enables minimum communication (device reset or reception of data signal). Thus, unnecessary current is not supplied to a device that is not in use. The presently used current amount is small compared to the tolerable current amount, and the host apparatus51bthus has a sufficient requested current amount. Therefore, the host apparatus51bactivates the USB function of the device that is to be used, that is, changes the state of the status window to “active” and supplies the requested current.

When the activation of the device causes the total consumption current value of all the connected devices to exceed the tolerable current value, some of the devices must be inactivated to obtain the current amount that is to be supplied. However, the device for which operation has been terminated is inactivated and supplied with current enabling only minimum communication. Thus, as in the seventh embodiment, the host apparatus51bcannot obtain the supply current amount by inactivating the device.

Therefore, the host apparatus51bshows a status window on the display56serving as the display device to notify the user of the supply state of the current. Further, the host apparatus51bshows a warning window on the display56to have the user, who is operating the host apparatus51, decide whether or not to continue the process.

As shown inFIG. 39, a warning message and a plurality of (three inFIG. 39) items are displayed on the warning window W21. In the present embodiment, the first item is for suspending the present operation, the second item is for suspending an operation other than that of the first item, and the third item is for waiting until there is enough power.

The user operates the mouse of the keyboard61and selects one of the three items. When the user selects the first item, the host apparatus51bsuspends the operation that is to be presently executed. For instance, when performing printing using the printer62by executing a program such as an application, the operation, or printing process, of the printer62is suspended.

When selecting the second item, the user operates the mouse of the keyboard61and selects the selector (ON/OFF) of the communication port to which the device that is to be suspended is connected while paying attention to the tolerable current indicated on the status window. The host apparatus51breduces the current amount supplied to the selected communication port and inactivates the USB function of the device connected to that communication port. This obtains sufficient margin current amount for the supply of the current requested by the operating device, and the host apparatus51bsupplies the current of the requesting amount to the device that is to be used and activates the USB function of that device.

When the user selects the third item, the host apparatus51bwaits until there is enough power, that is, until the other devices are suspended. The device in which the function execution flag is presently in ON sets the function execution flag to OFF when operation is terminated and the USB function is inactivated. The inactivation reduces the current amount supplied from the host apparatus51bto the device and increases the margin current amount. Therefore, the host apparatus51bsuspends and inactivates devices other than the device that is to be activated and waits until the margin current amount becomes larger than the requested value of the device that is to be activated.

The host apparatus51bcompares the margin current amount and the requested value of the device that is to be activated for every predetermined time and waits until the margin current amount becomes larger than the requested value. When the margin current amount becomes larger than the requested value, the host apparatus51bsupplies the current of the requested amount to the device that is to be used and activates the USB function of that device.

FIGS. 37 and 38are flowcharts of a device controlling process for use during execution of a program such as an application.

The MPU52first compares the margin current value and the requested value of the device that is to be used and determines whether the current can be supplied to the device.

When the current can be supplied (margin current value≧requested value), the MPU52changes the state of the used device to “active” in the information stored in the first region53aof the memory53in step820. Next, the MPU52changes the function execution flag to ON in step830. The MPU52supplies the current of the requested value to the used device in step840.

Then, the MPU52executes a process on the device. The current of the requested value is supplied from the host apparatus51b, and the USB function of the device is activated and operated in response to the data transmitted from the host apparatus51bin accordance with the process. When the operation is terminated, the function execution flag of the device in suspension is changed to OFF, and the function of the USB function of the device which function execution flag is turned OFF is inactivated. The process of inactivating the device is performed independent of the execution of the program of application or the like executed by the host apparatus51b. Thus, the host apparatus51bdoes not have to wait until the process executed by the device is terminated and may execute the next process.

When it is determined that the current cannot be supplied in step810, the MPU52shows the warning window W21in step850and shows the status window in step860. The MPU52then waits for the user to input at least one of either the warning window W21or the status window in step870.

This is because the warning window W21in the eighth embodiment includes an item (second item) that requires an input to the status window. Accordingly, the processes and the order of steps850to870may be changed if necessary. For instance, the warning window may be displayed, operation may be suspended until there is an input to the window, and the status window may be shown as required.

In step880, the MPU52determines whether or not the input in step870is “suspend operation”. When the input is “suspend operation”, the MPU52terminates the process of that device. For instance, when performing printing during the execution of the application, the printer (refer toFIG. 29) is used. If there is not enough margin current to use the printer62and operation suspension is selected in step870, the MPU52interrupts the process that uses the printer62and resumes the execution of the application.

When determining that the input is not “suspend operation” in step880, the MPU52determines whether or not the operation in the status window is suspended in step890. Suspension is determined by switching of the selector. That is, the MPU52determines whether the button of the selector column displayed in the status window is switched or not. When switched, the MPU52proceeds to step820as shown inFIG. 37and executes the subsequent processes. When a button of the selector column has been switched, it may be determined whether or not the supply of power is possible, that is, the MPU52may proceed to step810.

When the input does not suspend the operation in the status window, that is, “wait until enough power” is selected in the eighth embodiment in step890, the MPU52waits until power can be supplied. That is, the MPU52waits for a predetermined time to elapse in step900and determines whether or not the supply of power is possible based on the margin current amount in step910. When the supply of power is not possible, the MPU52proceeds to step900. That is, step900and step910are repeatedly executed to wait until the supply of power becomes possible.

In step910, when determining that the supply of power is possible, the MPU52proceeds to step820shown inFIG. 37and executes the subsequent processes.

The host apparatus51bof the eighth embodiment of the present invention has the following advantages.

(1) The host apparatus51bchanges the function execution flag of the device in suspension to OFF and inactivates the function of the USB function of the device of which function execution flag is OFF. In this case, the device of which operation is terminated has the function execution flag set to OFF. Further, since the USB function of the device is inactivated, the current supplied from the host apparatus51bis reduced, and the consumption current is reduced.

(2) The host apparatus51bshows the status window on the display56serving as the display device and notifies the supply state of the current to the user. Further, the host apparatus51bshows the warning window on the display56to have the user who is operating the host apparatus51decide whether or not to continue the process etc. When the user selects to continue the process, the host apparatus51bwaits until the supply of current becomes possible. Thus, the process may easily be continued. When the user selects to stop the process, the process that uses the device is interrupted, and other processes are executed.

The above embodiments may be modified in the following manner.

In the first embodiment, the maximum consumption current field of the configuration descriptor is used for the host apparatus11to inquire the change in supply current to each device21to23. However, the present invention is not limited in such a manner. The field of a descriptor other than the configuration descriptor may be used, a new descriptor or field may be set, and negotiation may be performed to change the supply current using the new field and the like.

In the first embodiment, the MPU12executes the processes ofFIG. 2. However, a control section for executing the processes ofFIG. 2may be arranged in the host controller14. Further, in the second to the fourth embodiments, the MPU33executes the processes ofFIG. 11,FIG. 13andFIG. 14. However, a control section arranged in the USB controller35may execute such processes. In this way, the processing load of the MPUs12and33is reduced. This is preferable from a practical standpoint.

In the device31ofFIG. 9, a level switch (switch for setting the read or write speed of data) for switching the consumption current of the internal circuits may be used. In this case, in the same manner as in the third embodiment, the consumption current stored in the register36ais changed in accordance with the set value of the level switch. After the change, the device temporarily enters a disconnected state due to the switching operation of the switch unit42. In this way, the device31may be operated at an appropriate supply current corresponding to the set value of the level switch.

The switch units42(refer toFIG. 10) in the second to fourth embodiments may be replaced by a switch unit42A shown inFIG. 28. That is, the switch unit42A ofFIG. 28includes a plurality of switching elements (MOS transistors) Tr1, Tr2, and Tr3and controls each switching element Tr1to Tr3to have the host apparatus41recognize the disconnection of the device31. More specifically, in the device31operating at full speed, the switching element Tr1is turned OFF by the control signal S1from the MPU33and the pull-up resistance R1of the signal line D+, which conveys the communication data, is broken. Thus, the signal lines D+ and D− are in a state referred to as “SE0”, and the host apparatus41is able to recognize that the device31has been disconnected. Further, in the device31operating at high speed, the switching elements Tr2and Tr3are turned PFF by the control signals S2and S3from the MPU33, and the signal lines D+ and D− for conveying the communication data are in the high impedance state. Thus, the voltage level of the signal lines D+ and D− exceeds the disconnection voltage value (e.g., 625 mV) of the USB standard, and the host apparatus41recognizes that the device31has been disconnected.

The current monitoring current16and the switch circuit25in the host apparatus11of the first embodiment may be omitted. Further, the limiter58in the host apparatus51of the fifth embodiment may be omitted. The omission of the circuit16,25, and28lowers the cost of the host apparatuses11and51.

In the device31of the second and the fourth embodiments, a switch circuit36bfor disconnecting the current path is arranged in the power controller36, and the switch circuit36bis turned OFF when the device31is not recognized (step270ofFIG. 11) so as to disconnect the power source of the device31. In a device in which the switch circuit36bfor disconnecting the current path is not arranged, in step270ofFIG. 11, the operation mode is set to the waiting mode with the minimum consumption current of the internal circuits. In this way as well, the unnecessary current consumption of the device is prevented.

In each embodiment, the communication system connects the host apparatus11,41, and51to the devices21to23,31,43,61to67,71to73with the USB interface. However, a communication system for connection with communication interfaces other than the USB interface may be employed.

In the sixth and seventh embodiments, saving of a status window does not have to be performed.

In the seventh embodiment, the order of the devices for reducing the supply current based on the function execution flag may be set in advance. That is, there may be a list on which the order of reducing the supply current is recorded. The order may be set as required. For example, the order may be set by a user, the order may be set to reduce the supply current from the devices that are used less frequently, or the order may be set to reduce the supply current from devices having lower priority.

In the seventh embodiment, in addition to when inactivating a device that is temporarily used during execution of a program, while a device is connected to a host apparatus, it may be determined whether that device is operating to inactivate the USB function if that device is not operating. In such a case, the current supply of the device that is not operated is automatically stopped. This reduces the consumed power of the entire system.

In the seventh and the eighth embodiments, a device may provide notification of the operation state (auto power down state, command terminated state, function in operation) at every predetermined time interval. In this case, the host apparatus does not have to issue a request command to the device. This reduces the overhead with respect to the normal process in the host apparatus and high speed processing is achieved.

In the eighth embodiment, the content of the warning window W21and the process may be changed if necessary. For instance, when there is no margin current that can be supplied to the used device, operation is suspended until current supply becomes possible, and a display indicating an inquiry for a decision to wait or interrupt the process may be shown on the window.

It should be apparent to those skilled in the art that the present invention may be embodied in many other specific forms without departing from the spirit or scope of the invention. Therefore, the present examples and embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalence of the appended claims.