Accessory power management

Methods, apparatus, and circuits for managing power among portable computing devices and one or more accessories. One example provides commands to improve power management between a portable computing device and one or more accessories. Other examples provide commands that may allow a portable computing device to charge at a maximum available current level while providing an accessory with sufficient current for its proper operation. Another may help prevent a portable computing device from drawing a high level of current that could be detrimental to an accessory, while others provide commands that may allow a battery pack to instruct a portable computing device to not charge its internal battery. Another example may allow a portable computing device to determine which power supply among multiple power supplies should be used to power an accessory, while others may allow an accessory to retrieve charging current parameters from a portable computing device.

BACKGROUND

The popularity of various portable electronic devices has exploded the past several years and the public's fascination and desire for new devices shows no signs of abating. Along with this increase in popularity, the number of types of these portable devices has grown considerably, and the functionality of these devices has diversified tremendously.

Interestingly, this diversification has become so thorough that it has begun to lead to a convergence. One such convergence is occurring with portable computing devices.

Smaller devices, such as phones, can now be used to perform functions that were previously limited to larger computing devices. These go beyond native functions, such as actually calling people, and include listening to music, watching movies, viewing documents, surfing the web, and reading email. Larger devices, such as netbooks, are slimming down to ultraportable size by jettisoning their optical drives and other functionality.

The evolution of these devices is thus converging towards a common destination: the portable computing device. These portable computing devices may handle various functions currently assigned to phones and netbooks. They may be used to listen to music, watch movies, view and edit documents, surf the web, read email and books, as well as myriad other functions.

Users of these portable computing devices often place them in a docking station. These docking stations may provide mechanical support for the portable computing devices, holding them in place in a roughly upright manner so that the screen can be viewed easily. Other accessories may be used with these portable computing devices as well. These accessories often provide power to the portable computing device, which is used to run circuitry on the portable computing device and to charge its internal battery.

These portable computing devices have comparatively large batteries and a correspondingly large current is required to charge them. But while the portable computing device's batteries are charging, the accessories require current for their operation. Also, some accessories may only be able to safely supply a certain amount of current.

Thus, what is needed are methods, apparatus, and circuits for managing power among these portable computing devices and one or more accessories.

SUMMARY

Accordingly, embodiments of the present invention provide methods, apparatus, and circuits for managing power among portable computing devices and one or more accessories. An illustrative embodiment of the present invention provides a set of commands and supporting circuitry that provides improved power management between a portable computing device and one or more accessories.

An illustrative embodiment of the present invention provides commands that may allow a portable computing device to charge at a maximum available current level while providing an accessory with sufficient current for its proper operation. Another illustrative embodiment of the present invention may help prevent a portable computing device from drawing a high level of current that could be detrimental to an accessory, such as a cable. Another illustrative embodiment of the present invention may allow a battery pack or other accessory to instruct a portable computing device to not charge its internal battery. Another illustrative embodiment of the present invention may allow a portable computing device to determine which power supply among multiple power supplies should be used to power an accessory. Yet another illustrative embodiment of the present invention may allow an accessory to get charging current parameters from a portable computing device.

One illustrative embodiment of the present invention provides a method of operating an accessory. In this method, the accessory may establish a connection with a portable computing device and receives power from an external power source. The accessory may determine a current capability of the external power source, and then may determine a net current capability by deducting a current requirement of the accessory from the current capability of the external power source. The accessory may then signal to the portable computing device that the portable computing device is to draw a current having a limit equal to the net current capability.

Another illustrative embodiment of the present invention provides a method of operating a portable computing device. In this method, the portable computing device may establish a connection with an accessory. The portable computing device may then receive an indication of a current capability of an external power source powering the accessory. The portable computing device may also receive a power instruction from the accessory, where the power instruction may indicate a current requirement of the accessory. The portable computing device may then determine a net current capability by deducting the current requirement of the accessory from the current capability of the external power source. A current having a limit equal to the net current capability may then be drawn by the portable computing device.

Another illustrative embodiment of the present invention provides another method of operating a portable computing device. This method may include establishing a connection with a power source via a cable, receiving an indication that the power source can supply current at first level, receiving an indication that the cable can supply current at a lower second level, and drawing a current having a limit equal to the lower second level.

Another illustrative embodiment of the present invention provides a method of operating a portable computing device. This method may include establishing a connection with a battery pack, receiving a command to operate circuitry using current from the battery pack without charging the internal battery, and drawing a current to operate the internal circuitry without charging the internal battery.

Another illustrative embodiment of the present invention provides a method of operating an accessory. In this method, the accessory may establish a connection with a portable computing device. The accessory may then provide a request to the portable computing device inquiring whether the accessory should use a first power source or a second power source to power the accessory. The accessory may then receive an instruction indicating which power source to use to power the accessory. The accessory may then use the indicated power source to power itself.

Yet another illustrative embodiment of the present invention provides a method of operating an accessory. This method may include establishing a connection with a portable computing device, providing a request for a charging parameter to the portable computing device, and receiving the charging parameter from the portable computing device.

Still another illustrative embodiment of the present invention provides a method of operating a portable computing device. This method may include establishing a connection with an accessory, reading a resistor identification on the accessory, determining a set of one or more default values based on the resistor identification, receiving a command from the accessory to modify the set of one or more default values, and modifying the set of one or more default values.

Various embodiments of the present invention may incorporate one or more of these and the other features described herein. A better understanding of the nature and advantages of the present invention may be gained by reference to the following detailed description and the accompanying drawings.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIG. 1illustrates an electronic system that may be improved by the incorporation of embodiments of the present invention. This figure, as with the other included figures, is shown for illustrative purposes only, and does not limit either the possible embodiments of the present invention or the claims.

This figure includes portable computing device150and accessory130. In this example, accessory130is a docking station, though in other examples accessory130may be other types of devices, such as radios, monitors, interactive displays, and others. In this example, portable computing device150is a tablet computer, though in other systems it may be other types of devices, such as a portable media player, cell phone, monitor, or other electronic device.

Accessory130may include insert135having insert opening140. Portable computing device150may have one or more receptacles155and160. These receptacles155and160may include receptacle tongues165. When portable computing device150is mated with accessory130, insert135may fit in either receptacle155or160. The corresponding receptacle tongue165may fit into insert opening140. Contacts (not shown) on receptacle tongue165form electrical connections with contacts in insert opening140. These electrical connections form pathways for power and signals that may be shared between accessory130and portable computing device150.

Accessory130and portable computing device150may include various electronic circuitry for managing and sharing power and data signals. Examples of these circuits are shown in the following figure.

FIG. 2is a simplified block diagram of a system200including portable computing device250and accessory230according to an embodiment of the present invention. In this embodiment, portable computing device250(e.g., implementing portable computing device150ofFIG. 1) can provide computing, communication and/or media playback capability. Portable computing device250can include processor210, storage device212, user interface214, power control216, network interface218, and accessory input/output (I/O) interface220. Portable computing device250can also include other components (not explicitly shown) to provide various enhanced capabilities.

Storage device212can be implemented using disk, flash memory, or any other non-volatile storage medium. In some embodiments, storage device212can store media assets such as audio, video, still images, or the like, that can be played by portable computing device250. Storage device212can also store other information such as a user's contacts (names, addresses, phone numbers, etc.); scheduled appointments and events; notes; and/or other personal information. In some embodiments, storage device212can store one or more application programs to be executed by processor210(e.g., video game programs, personal information management programs, media playback programs, etc.).

User interface214can include input devices such as a touch pad, touch screen, scroll wheel, click wheel, dial, button, switch, keypad, microphone, or the like, as well as output devices such as a video screen, indicator lights, speakers, headphone jacks, or the like, together with supporting electronics (e.g., digital-to-analog or analog-to-digital converters, signal processors, or the like). A user can operate input devices of user interface214to invoke the functionality of portable computing device250and can view and/or hear output from portable computing device250via output devices of user interface214.

Processor210, which can be implemented as one or more integrated circuits (e.g., a conventional microprocessor or microcontroller), can control the operation of portable computing device250. In various embodiments of the present invention, processor210can execute a variety of programs in response to program code and can maintain multiple concurrently executing programs or processes. At any given time, some or all of the program code to be executed can be resident in processor210and/or in storage media, such as storage device212.

Through suitable programming, processor210can provide various functionality for portable computing device250. For example, in response to user input signals provided by user interface214, processor210can operate a database engine to navigate a database of media assets stored in storage device212in response to user input and display lists of selected assets. Processor210can respond to user selection of an asset (or assets) to be played by transferring asset information to a playback engine also operated by processor210, thus allowing media content to be played. Processor210can also operate other programs to control other functions of portable computing device250. In some embodiments, processor210implements a protocol daemon and other programs to manage communication with one or more connected accessories (e.g., accessory230), examples of which are described below.

Power manager216provides power management capability for portable computing device250. For example, power manager216can deliver power from a battery (not explicitly shown) to accessory I/O interface220via line217and to other components of portable computing device250(power connections not shown). Power manager216can also receive power via accessory I/O interface220and line219and deliver received power to various components of portable computing device250. Power received from accessory230can also be delivered to the battery, thereby allowing the battery to be recharged via accessory I/O interface220. In some embodiments, power manager216can be implemented using programmable or controllable circuits operating in response to control signals generated by program code executing on processor210or as a separate microprocessor or microcontroller.

In some embodiments, power manager216is responsive to signals from a sensor (not explicitly shown) in accessory I/O interface220. The sensor can generate a signal indicative of the type of accessory connected, and power manager216can use this information to determine, e.g., whether to distribute power from the battery or power received from accessory I/O interface220. Power manager216can also provide other power management capabilities, such as regulating power consumption of other components of portable computing device250based on the source and amount of available power, monitoring stored power in the battery and generating user alerts if the stored power drops below a minimum level, and so on.

Network interface218can provide voice and/or data communication capability for portable computing device250. In some embodiments of the present invention, network interface218can include radio frequency (RF) transceiver components for accessing wireless voice and/or data networks (e.g., using cellular telephone technology, advanced data network technology such as 3G or EDGE, WiFi (IEEE 802.11 family standards), or other mobile communication technologies, or any combination thereof), GPS receiver components, and/or other components. In some embodiments network interface218can provide wired network connectivity (e.g., Ethernet) in addition to, or instead of, a wireless interface. Network interface218can be implemented using a combination of hardware (e.g., antennas, modulators/demodulators, encoders/decoders, and other analog and/or digital signal processing circuits) and software components.

Accessory I/O interface220can allow portable computing device250to communicate with various accessories. For example, accessory I/O interface220can support connections to a computer, an external speaker dock or media playback station, a digital camera, a radio tuner (e.g., FM, AM and/or satellite), an in-vehicle entertainment system, an external video device, card reader, disc reader, or the like. In accordance with some embodiments of the invention, accessory I/O interface220can support connection to multiple accessories in a daisy chain configuration, allowing portable computing device250to manage concurrent communication with multiple accessories. This can be done, for example, by associating multiple virtual ports with a physical communication port provided by accessory I/O interface220.

In some embodiments, accessory I/O interface220can include a connector, such as a 30-pin connector corresponding to the connector used on iPod® and iPhone® products, as well as supporting circuitry. The connector can provide connections for power and ground as well as for various wired communication interfaces, such as Universal Serial Bus (USB), FireWire (IEEE 1394 standard), and/or universal asynchronous receiver/transmitter (UART). The connector can also provide connections for audio and/or video signals, which may be transmitted to or from portable computing device250in analog and/or digital formats. Thus, accessory I/O interface220can support multiple communication channels, and a given accessory can use any or all of these channels.

Accessory230can include controller240, user input device242, audio/video output device244, power manager246, power supply248and PCD I/O interface236. Accessories can vary widely in capability, complexity, and form factor. Various accessories may include components that are not shown, and may include, but are not limited to, storage devices (disk, flash memory, etc.) with fixed or removable storage media; camera components such as lenses, image sensors, and controls for same (e.g., aperture, zoom, exposure time, frame rate, etc.); microphones for recording audio (either alone or in connection with video recording); and so on.

Controller240can include a microprocessor or microcontroller executing program code to perform various operations associated with accessory230. For example, where accessory230incorporates a sound and/or video system, program code executed by controller240can include programs for digital audio decoding, analog or digital audio processing, and the like. Where accessory230incorporates a digital camera, program code executed by controller240can include programs that allow a user to control the camera to adjust settings, capture images, display images, transfer image data to another electronic apparatus, etc.

User input device242may include user-operable controls such as a touch pad, touch screen, scroll wheel, click wheel, dial, button, switch, keyboard, keypad, microphone, or the like. A user can operate the various input controls of user interface234to invoke functionality of accessory230, and such functionality may include exchanging control signals, data, or other communications with portable computing device250, either directly or via an intermediary.

In some embodiments, accessory230can also provide output devices, such as audio/video output device244. In some embodiments, audio/video output device244can include speakers and/or connection ports for connecting external speakers or headphones; a video screen and/or a connection port for connecting an external video screen, indicator lights, or the like, together with supporting electronics (e.g., digital-to-analog or analog-to-digital converters, signal processors or the like). These components can be coupled to receive audio and/or video signals via PCD I/O interface250. Such components can allow the user to view and/or hear output from accessory230.

Power manager246can provide power management capability for accessory230. For example, power manager246can be configured to receive power from a power supply248. In some embodiments, power supply248can include a connection to an external power source (e.g., the standard electric grid); for example, power supply248can include an AC-DC converter that can be internal or external to accessory230. In other embodiments, power supply248can include a battery or other energy storage device. Power manager246can deliver power from power supply248to various components of accessory230. In addition, in some embodiments, power manager246can deliver power to upstream accessories via PCD I/O interface236.

PCD I/O interface236can allow accessory230to communicate with portable computing device250, either directly or through an intermediary. In accordance with some embodiments of the invention, PCD I/O interface236can incorporate a USB interface. For example, PCD I/O interface236can provide a standard, mini, or micro USB port. In other embodiments, PCD I/O interface236can include a connector that can mate directly with a connector included in a portable computing device, such as a 30-pin connector that mates with the connector used on various iPod® products. Such a connector can be used to supply power to or receive power from portable computing device250, to receive audio and/or video signals in analog and/or digital formats, and to communicate information via various interfaces, such as USB, UART, and/or FireWire.

Accessory230can be any electronic apparatus that interacts with portable computing device250. In some embodiments, accessory230can provide remote control over operations of portable computing device250, or a remote user interface that can include both input and output controls (e.g., a display screen). Accessory230can control various functions of portable computing device250and can also receive media content from portable computing device250and present such content to the user (e.g., through audio speakers and/or video display screen, depending on the type of media content). In other embodiments, portable computing device250can control operations of accessory230, such as retrieving stored data from a storage medium of accessory230, initiating an image capture operation by a camera incorporated into accessory230, etc. As noted above, communication between accessory230and portable computing device250can be direct or through an intermediary source, and the presence or absence of an intermediary can be transparent to accessory230.

It will be appreciated that the system configurations and components described herein are illustrative and that variations and modifications are possible. The portable computing devices and accessories may have other capabilities not specifically described herein. For example, they may incorporate mobile phone, global positioning system (GPS), broadband data communication, Internet connectivity, and the like.

Connectors at the various interfaces can be complementary or not as desired. Where two connectors are not complementary, an adapter can be provided to connect the two devices. While connectors may be described herein as having pins, a term generally associated with conventional electronic devices having wires to connect components, it is to be understood that other signal paths (e.g., optical signaling) can be substituted. Further, in some embodiments, some of the connections can be wireless, and connectors can be omitted where wireless interfaces are provided.

FIG. 3illustrates an electronic system that is improved by the incorporation of an embodiment of the present invention. This figure includes power supply310, accessory330, and portable computing device350. Power source310may couple to a wall outlet or other power supply, such as a car outlet. Power supply310may provide power to accessory330. Portable computing device350may connect to accessory330either directly or via a cable or other electronic pathway.

Power provided by power supply310can be used to power accessory330and portable computing device350. A battery (not shown) internal to portable computing device350may be charged using power from power source310. It is desirable that the power provided by power source310be managed efficiently. Accordingly, embodiments of the present invention provide commands and supporting circuitry whereby portable computing device350may communicate with accessory330or other electronic device regarding the electronic system's power management.

In some embodiments, a portable computing device and an accessory can communicate while connected by exchanging commands and data according to a portable-computing-device-to-accessory-protocol, also referred to herein as an “accessory protocol.” The commands and data can be communicated using any wired or wireless transport medium provided by the relevant interfaces.

The accessory protocol defines a format for messages to be exchanged between a portable computing device and any accessories connected thereto. For instance, the accessory protocol may specify that each message (also referred to herein as a command) is sent in a packet with a header and an optional payload. The header provides basic information (e.g., a start indicator, length of the packet, and a command code identifying a command to be processed by the recipient), while the payload provides any data associated with the command; the amount of associated data can be different for different commands, and some commands may provide for variable-length payloads. In some embodiments, the commands may be defined such that any particular command code is valid in only one direction. The packet can also include error-detection or error-correction codes as known in the art.

The accessory protocol can define a number of “lingoes,” where a “lingo” is a group of related commands that can be supported (or unsupported) by various classes of accessories. In one embodiment, a command code can include a first byte identifying the lingo to which the command belongs and a second byte identifying the particular command within the lingo. Other command structures may also be used. It is not required that all accessories, or all portable computing devices to which an accessory can be connected, support every lingo defined within the accessory protocol.

In some embodiments, every accessory and every portable computing device that use the accessory protocol support at least a “general” lingo that includes commands common to the portable computing device and all accessories. The general lingo can include commands enabling the portable computing device and the accessory to identify and authenticate themselves to each other and to provide general information about their respective capabilities, including which (if any) other lingoes each supports. The general lingo can also include authentication commands that the portable computing device can use to verify the purported identity and capabilities of the accessory (or vice versa), and the accessory (or portable computing device) may be blocked from invoking certain (or all) commands or lingoes if the authentication is unsuccessful.

An accessory protocol can also include various other lingoes, such as a simple remote lingo that allows an accessory to send a command indicating a function of the portable computing device to be invoked; a remote user interface lingo that can be used to communicate commands and data related to replicating all or part of a user interface of a portable computing device on an accessory (thereby supporting a more advanced remote control), a tuner lingo that allows a user to control a tuner accessory by operating the portable computing device and/or to control a tuner in the portable computing device by operating an accessory, a storage lingo that allows an accessory to store data on the portable computing device, and so on. Any lingo or combination of lingoes or other commands or groups of commands can be used in connection with an accessory protocol.

In various embodiments of the present invention, these commands may be sent as packets. These packets may include information regarding power management activities. An example of such a packet is shown in the following figure.

FIG. 4illustrates a packet format for conveying commands that may be employed by an embodiment of the present invention. This packet includes preamble or synchronizing information410, which is followed by packet start field420. A load length for the packet is identified in field430. The lingo to which the command belongs is identified in field440. The command itself is identified in field450. The command data follows in field460. A checksum or CRC may be performed using field470.

The commands included in embodiments of the present invention are of two types, specifically, set and get commands. Set commands instruct a receiving device to set an internal value. Get commands request information from the receiving device. An example of activities in a system employing set commands is shown in the following figure.

FIG. 5illustrates the flow of commands and information between an accessory and portable computing device when utilizing set commands. In this example, acknowledgment signals that indicate that a command has been received are employed. Also in this example, set commands may travel from the accessory to a portable computing device, or from the portable computing device to an accessory.

In act510, a set command and corresponding data may be sent by an accessory. In act515, the set command and data may be received by a portable computing device. In act525, an acknowledgement may be sent by the portable computing device, and received by the accessory in act530. In act535, a portable computing device may act on the set command and data.

In various embodiments of the present invention, an acknowledgement may be structured such that it identifies the received command that it is acknowledging. For example, the portable computing device may send an acknowledgment identifying that a specific command and data was received. In other embodiments of the present invention, the set command and data sent by the accessory in act510may have an identification number associated with it. In this case, the acknowledgment sent by the portable computing device in act525may include that identification number. The identification number may be tracked using a counter or other mechanism.

Again, in general, set commands may be initiated by either an accessory or a portable computing device. Accordingly, in act540, a set command and data may be sent by the portable computing device. The set command and data may be received by an accessory in act545. In act555an acknowledgement may be sent by the accessory and received by the portable computing device in act560. In act565, the accessory can act on the set command and data.

In various embodiments of the present invention, notifications may be used. A notification differs from the acknowledgment in that an acknowledgment indicates that a command and data has been received, whereas a notification indicates that the command and data have been acted on. In typical systems that are consistent with embodiments of the present invention, a portable computing device generates a large number of notifications. Accordingly, to reduce traffic between an accessory and the portable computing device, an accessory may register for notifications. That is, the accessory may request that it receives notifications of certain types of activities performed by a portable computing device. On the other hand, in typical systems, portable computing devices do not register for notifications from an accessory, since an accessory typically does not generate a large number of notifications. Accordingly, it is common for an accessory to provide all notifications to the portable computing device. Examples of this are shown on the following figure.

FIG. 6illustrates command and data communication between an accessory and a portable computing device where both acknowledgments and notifications are employed. In act610, an accessory may register for notifications. This registration may be received in act615by a portable computing device. This registration may inform the portable computing device that the accessory would like notifications when the portable computing device performs certain classes or types of functions. In act620, a set command and data may be sent from the accessory to the portable computing device. In act625, the set command and data may be received by the portable computing device. An acknowledgement may be sent in act630by the portable computing device and received by the accessory in act635. In act640, the portable computing device acts on the set command and data. Once this activity is complete, a notification may be sent by the portable computing device in act645. The notification may be received in act650. At this time, the accessory may learn that the portable computing device has updated itself and will act in a manner consistent with the command and data sent in act620.

Again, a portable computing device typically does not register for notifications with an accessory, though this may be performed in some embodiments of the present invention. In this example, the accessory may send notifications for each of the activities. In act660, a set command and data may be sent from the portable computing device and received by the accessory in act665. In act670, an acknowledgment may be sent from the accessory and received by the portable computing device in act675. In act680, the accessory may act on the set command and data. Once this activity is complete, a notification may be sent in act685from the accessory and received in act690by the portable computing device.

In various situations, one device may ensure that another device is operating in a specific manner by instructing it to do so using a set command and data. On occasion, one device may need to retrieve information regarding a function parameter from the other device. In such a situation, the get command may be used. As with set commands, a get command may be initiated by either an accessory or a portable computing device. With these commands, acknowledgements or notifications are not needed, since the return of the requested information implies both the acknowledgement and notification functions. An example is shown in the following figure.

FIG. 7illustrates the flow of get and return commands in an electronic system including an accessory and a portable computing device. In act710, an accessory may send a get command to a portable computing device, which receives it in act715. In act730, the portable computing device may retrieve the requested data. Often, this may be as simple as reading a value from a register. In act740, the portable computing device may return the requested data, which may be received by the accessory in act745.

Again, either the accessory or portable computing device may initiate a get command. Accordingly, in act750, a get command may be provided by portable computing device to an accessory. In act755, the accessory may receive the get command and data and retrieve the requested data in act760. After the data has been retrieved, the requested data may be returned by the accessory in act770, and received by the portable computing device in act775.

In various embodiments of the present invention, various commands may be used for specific functions, and these commands may be used in a specific direction. Some commands employed by various embodiments of the present invention, their typical direction, and their payloads, are listed in the following figure.

FIG. 8is a table listing commands employed by various embodiments of the present invention to manage power between an accessory and a portable computing device. The typical direction of flow is also shown, as it is the command's typical payload. Each of these commands is further elaborated upon in the following figures.

FIG. 9illustrates an electronic system according to an embodiment of the present invention. This figure includes power source910, accessory930, and portable computing device950. Power source910may provide power for both accessory930and portable computing device950. In such a system, portable computing device950may wish to charge its internal battery at a high a rate as possible. Accordingly, portable computing device950would like to use any current not needed for operation of accessory930.

Accessory930may determine the current capability of power source910. In various embodiments of the present invention, this may be achieved by reading either voltage levels or resistor values on one or more pins or signal lines provided by power supply910. In a specific embodiment of the present invention, power source910may provide power over a USB type connection, where voltage levels or values of resistors on the USB data lines indicate the current capability of power source910. In other embodiments of the present invention, other types of identification, such as an identification resistor, may be used. For example, power source910may provide a signal or other indication as to its current capability. Accessory930can deduct the operating current that it requires from this available current. The net available current may be sent to portable computing device950using the SetAvailableCurrent command. This command may include the current limit that portable computing device950should use. That is, 1. Accessory930determines current capability of power source910. 2. Accessory930deducts its operating current. 3. Accessory930sends SetAvailableCurrent command to portable computing device950to draw current having a limit of current capability of power source910less accessory operating current. The operations performed by accessory930and portable computing device950are shown in the following figure.

FIG. 10illustrates the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act1010, the accessory may determine a current capability of a power source. In act1020, the accessory may deduct its own current requirements from the current capability of the power source to determine a net current. In act1030, this net current may be sent as part of a SetAvailableCurrent command to the portable computing device, which receives the set command in act1040. In act1050, an acknowledgment may be sent by the portable computing device and received by the accessory in act1060. In act1070, the portable computing device may set the available current level to the net current. After this, the portable computing device may draw a current not exceeding the net current provided by the accessory in act1030. The portable computing device may provide a notification of this change to the accessory at this time.

FIG. 11illustrates a method of controlling a level of current drawn by a portable computing device according to an embodiment of the present invention. In act1110, a connection may be established between an accessory and a portable computing device. In act1120, the accessory may receive power from an external power source. The accessory may determine a current capability of the external power source in act1130. In act1140, the accessory may determine a net current capability by deducting the required operating current from the current capability of the external power source. Again, this may ensure that the accessory has enough power to operate properly. In act1150, the accessory may signal via the connection to the portable computing device that the portable computing device should draw a current having a limit equal to the net current capability.

In the above example, the accessory may determine the current capability of the power source. In other embodiments of the present invention, the portable computing device may determine the current capability of the power source. The portable computing device may achieve this by reading resistor values or voltage levels on lines provided by the power source. In a specific embodiment of the present invention, the accessory acts as a passthrough for these pins. This allows the portable computing device to read resistor values or voltage levels on these lines directly. In other embodiments of the present invention, the accessory may read these resistor values or voltage levels and pass the resistor values or voltage levels on to the portable computing device. An example is shown on the following figures.

FIG. 12illustrates an electronic system according to an embodiment of the present invention. In this system, portable computing device1250may determine the current capability of power source1210. Accessory1230may communicate the operating current that it requires to portable computing device1250using the SetReserveCurrent command. This command may include in its payload the current that accessory1230requires for its operation. Portable computing device1250may then draw a current having a limit that is the current capability of power source1210less the operating current needed by accessory1230. Again, this ensures that accessory1230has sufficient operating current and is not current-starved by portable computing device1250. That is, 1. Portable computing device1250determines current capability of power source1210. 2. Accessory1230communicates its operating current to portable computing device1250using SetReserveCurrent command. 3. Portable computing device draws current having a limit of current capability of power source1210less operating current of accessory1230.

FIG. 13illustrates the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act1310, an accessory may determine its current requirements. In act1320, the portable computing device may determine the current capability of a power source. In act1330, the accessory may send its current requirements to the portable computing device, which receives them in act1340. An acknowledgment can be sent in act1350, and received by the accessory in act1360. In act1370, the portable computing device may deduct current requirements of the accessory from the current capability of the power source to determine a net current. In act1380, the portable computing device may set an available current to the net current. Following this, the portable computing device may draw a current having a limit equal to the net current determined in act1370. A notification may be sent by the portable computing device to the accessory at this time.

FIG. 14is a flowchart illustrating the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act1410, a connection may be established between the portable computing device and the accessory. In act1420, the portable computing device may receive an indication of a current capability of an external power source power from an accessory. The portable computing device may receive an instruction from the accessory indicating a current requirement for the accessory in act1430. In act1440, the portable computing device may determine a net current capability by deducting the current requirement of the accessory from the current capability of the external power source. In act1450, the portable computing device may draw a current having a limit equal to the net current capability determined in act1440.

In some systems, a power source may indicate that it can provide current at a first level. However, a cable used to connect a power source to an accessory or portable computing device may not be able to supply current at this first level, and may only be able to provide a current at a lower, second level. In such a situation, it is desirable that the cable be able to indicate that a portable computing device should only draw current at the lower, second level. Examples of how this is done are shown in the following figures.

FIG. 15illustrates an electronic system according to an embodiment of the present invention. In this example, power source1510may provide power to portable computing device1550via cable1560and cable insert1565. Cable insert1565mates with a connector receptacle (not shown) on the portable device1550.

Power source1510may provide an indication that it can supply current at a first level. Portable computing device1550may then read this indication that it can draw current at the first level. Cable1560then informs portable computing device1550that cable1560can provide current only at a lower second level. Cable1560may do this using the SetMaxCurrent command. Accordingly, portable computing device1550may draw current at the second, lower level, thereby protecting cable1560. That is, 1. Power source1510provides indication that it can supply current at a first level. 2. Portable computing1550device reads indication that it can draw current at first level. 3. Cable1560informs portable computing device1530that cable1560can provide current only at a lower second level using SetMaxCurrent command. 4. Portable computing device1550draws current at the lower second level. A diagram illustrating these activities is shown in the following figure.

FIG. 16illustrates the activities of a cable and a portable computing device according to an embodiment of the present invention. In act1610, the cable may determine its current limit. This current limit may be sent in act1620to the portable computing device. In act1615, the portable computing device may determine a current limit for the power source. The portable computing device may set this as a current limit in act1625. In act1630, the portable computing device may receive the current limit for the cable. In act1640the portable computing device may send an acknowledgment, which is received by the cable in act1650. In act1660, the current limit for the portable computing device may be set to the lower current limit of the cable, thereby protecting the cable.

FIG. 17is a flowchart illustrating the activities of a cable and a portable computing device according to an embodiment of the present invention. In act1710, a connection may be established between the portable computing device and a power source via the cable. In act1720, the portable computing device may receive an indication that the power source can supply current at a first level. The portable computing device may receive an indication that the cable can only supply current at a lower, second level in act1730. Accordingly, in act1740, the portable computing device may draw a current having a limit equal to the lower second level.

In some embodiments of the present invention, a battery pack may be used to supply power to a portable computing device. In such a situation, it may be desirable that the power from the battery pack not be used to charge an internal battery of the portable computing device. By not having the portable computing device charge its internal battery, but merely operate using the current from a battery pack, the resulting power losses due to charge transfer from the battery pack to the internal battery are eliminated. An example is shown in the following figures.

FIG. 18illustrates an electronic system according to an embodiment of the present invention. In this example, battery pack1870may provide power to portable computing device1850via cable1860and cable insert1865. In this example, battery pack1870may send a command to portable computing device1850to not charge the internal battery. Similarly, battery pack1870may send a command instructing the portable computing device1850to charge its internal battery. The battery pack may do this using the SetBatteryCharging command. The payload for this command may include a bit indicating whether portable computing device1850should charge its internal battery. After receiving a command to not charge its internal battery, portable computing device1850may draw a current sufficient to operate its circuitry, but portable computing device1850does not charge its internal battery. That is, 1. Battery pack1870sends command to portable computing device1850to not charge internal battery using SetBatteryCharging command. 2. Portable computing device1850draws current to operate circuitry, does not charge battery. Examples of the activities performed by the elements of this system are shown in the following figure.

FIG. 19illustrates the activities of a battery pack and a portable computing device according to an embodiment of the present invention. In act1910, a command to not charge an internal battery may be sent from the battery pack and received by the portable computing device in act1920. An acknowledgement may be sent in act1930, and may be received by the battery pack in act1940. In act1950, the portable computing device may operate its circuitry using power from the battery pack, but does not charge its internal battery. A notification of this change may be sent from the portable computing device to the battery pack.

FIG. 20illustrates a flowchart of the activities of a battery pack and a portable computing device according to an embodiment of the present invention. In act2010, a connection may be established between the portable computing device and the battery pack. In act2020, the portable computing device may receive a command to operate its circuitry using current from the battery pack without charging its internal battery. Accordingly, the portable computing device may draw a current to operate its internal circuitry but does not charge its internal battery in act2030.

In various embodiments of the present invention, an accessory and a portable computing device may share more than one power line. In a specific embodiment of the present invention, a USB power supply and an accessory power supply may be shared between an accessory and a portable computing device. In such a situation, an accessory may draw current from either supply. In this arrangement, power may be supplied by a power source over the USB lines. The portable computing device may prefer that the accessory take its power requirements from the USB power supply, thereby leaving the remaining USB power for the portable computing device. Alternately, the portable computing device may prefer to receive all the available power from the USB line and return power to the accessory using the accessory power supply.

Reasons for this include improved flexibility regarding the amount of current that the portable computing device can draw. For example, in a specific embodiment of the present invention, a power source may provide, for example, 2.0 amps of current. An accessory may require 0.2 amps of current for its operation. In a particular embodiment of the present invention, the accessory can instruct the portable computing device to draw either 1.0 or 2.0 amps of current. Since 1.8 amps is available to the portable computing device, the accessory instructs the portable computing device to draw 1.0 amps. Accordingly, an internal battery of the portable computing device cannot charge as fast as it would if it could receive the entire 1.8 amps. Thus, the portable computing device may wish to draw the draw 2.0 amps available on the USB supply, and return 0.2 amps to the accessory using the accessory supply line. This arrangement leaves a net 1.8 amps for the operation of the portable computing device and for charging its internal battery. Examples of this are shown in the following figures.

FIG. 21illustrates an electronic system according to embodiment of the present invention. Power source2110may provide current to accessory2130and portable computing device2150. Portable computing device2150and accessory2130may share first and second power lines2142and2144. Accessory2130may send a command to portable computing device2150asking which power line it should use. Accessory2130may do this using the GetPrefPower command. This command may include in its payload a current needed if the first power line is used and a current that may be needed if a second power line is used. Portable computing device1250may then instruct accessory1230to use the first or the second power line2142and2144, using the RetPerfPower command. This command identifies the power source to use in its payload.

Specifically, first power line2142may convey a USB power supply. This power supply may be derived from power source2110by power manager2134in accessory2130. Power manager2134may provide this power on power line2142to power control2154in portable computing device2150. Power control2154may charge battery2152in portable computing device2150over line2153using this power and provide current for the operation of other circuitry. Battery2152may return power on line2155to power control2154. Power control2154may provide this battery power as an accessory power on second power line2144to power manager2134. With this configuration, accessory2130may be powered directly from the USB power on first power line2142, or it may receive power via battery2152on second power line2144. That is, 1. Portable computing device2150and accessory2130share first and second power lines2142and2144. 2. Accessory2130sends get command to portable computing device2150asking which power line it should use using GetPrefPower command. 3. Command may include current needed if first power line2142used, and current needed if second power line2144used. 4. Portable computing device2150instructs accessory2130as to which power line it should use using RetPrefPower command. The activities performed by the devices in this figure are shown in the following figure.

FIG. 22illustrates the activities performed by an accessory and portable computing device according to an embodiment of the present invention. In act2210, an accessory may send a command to get preferred power, that is, whether the accessory should operate by drawing current from a first or second power source. This command may be received by the portable computing device in act2220. In act2230, the portable computing device may determine the preferred power source and send this information to the accessory in act2240. In act2250, the accessory may receive the preferred power source and draws current from that source in act2260.

FIG. 23is a flowchart illustrating the activities performed by an accessory and portable computing device according to an embodiment of the present invention. In act2310, a connection may be established between the accessory and the portable computing device. In act2320, the accessory may provide a request to the portable computing device inquiring whether they accessory should use a first power source or a second power source to power the accessory. In act2330, the accessory may receive an instruction indicating which power source to use to power the accessory. In act2340, the accessory may use the indicated power source to power the accessory.

In various embodiments of the present invention, it is desirable for an accessory to read information regarding charging and power management from a portable computing device. One such parameter may include the maximum charging current that the portable computing device can provide. This information may be requested and returned using the GetUltraHighPower and RetUltraHighPower commands. Examples of this are shown in the following figures.

FIG. 24illustrates an electronic system according to an embodiment of the present invention. This figure includes power source2410, accessory2430, and portable computing device2450. Accessory2430may send a command to portable computing device2450to retrieve charging information using the GetCharginglnfo command. Portable computing device2450may return charging information to accessory2430using the RetChargingInfo command. That is, 1. Accessory2430sends get command to portable computing device2450to retrieve charging information using GetChargingInfo or GetUltraHighPower commands. 2. Portable computing device2450returns charging information to accessory2430using RetChargingInfo or RetUltraHighPower commands. These activities are shown in the following figure.

FIG. 25illustrates activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act2510, an accessory may send a command to get charging information. The command to get information may be received by the portable computing device in act2520. This information may then be read, for example from a register, in act2530. In act2540, the charging information may be returned and received by the accessory in act2550. This charging information may include charging information discussed above, such as available current limits, maximum current limits, the status of internal battery charging, and other parameters.

FIG. 26illustrates a flowchart of the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act2610, a connection may be established between the accessory and the portable computing device. A request for charging information may be sent to the portable computing device in act2620. In act2630, the charging information may be received from the portable computing device.

In some embodiments of the present invention, a portable computing device may identify an accessory by using a resistor value on the accessory. For example, the accessory may include a resistor having a specified value between two or more of its pins that may be used to communicate with the portable computing device. From this identification, one or more default values may be set in the portable computing device. On occasion, it may be desirable to override or supplement these values with specified values. Examples of this are shown in the following figures.

FIG. 27illustrates an electronic system according to an embodiment of the present invention. This figure includes power source2710, accessory2730, and portable computing device2750. Portable computing device2750may detect a resistor identification on accessory2730. Portable computing device2750may determine default values for a number of parameters from this resistor identification. Accessory2730may send one or more commands to portable computing device2750to override or supplement these default values. That is, 1. Portable computing device2750detects resistor identification from accessory2730. 2. Portable computing device2750determines default values from resistor identification. 3. Accessory2730sends commands to portable computing device2750to override or supplement default values. The activities performed by these devices are shown in the following figure.

FIG. 28illustrates the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act2810, a portable computing device may read an identification resistor on the accessory. In act2820, the portable computing device may determine default values for various parameters based on this identification resistor. In act2830, the accessory may send one or more commands to supplement or override the default values. This command may be received by the portable computing device in act2840. An acknowledgement may be sent to the accessory in act2850and received by the accessory in act2860. In act2870, the portable computing device may supplement or override the default values. Notification of these changes may be provided from the portable computing device to the accessory.

FIG. 29is a flow chart illustrating the activities performed by an accessory and a portable computing device according to an embodiment of the present invention. In act2910, a connection may be established between the portable computing device and the accessory. In act2920, a resistor identification may be read on the accessory. In act2930, the portable computing device may determine one or more default values based on the resistor identification. In act2940, the portable computing device may receive a command from accessory to modify the set of one more default values. In act2950, the portable computing device may modify the set of one of more default values.