This application claims priority to German Patent Application Ser. No. 10 2004 031 278.8, filed Jun. 28, 2004, and which is incorporated herein by reference in its entirety.
The invention relates to an apparatus for detecting the connection of at least one peripheral unit to a host system via a data transmission interface, and a method for operating such an apparatus.
The problem of connecting peripheral units to a host system is solved particularly elegantly by the universal serial bus (USB). Very close coordination of the physical, electrical and logic elements of this connection system allows a multiplicity of different peripheral units to be connected to a host. One particular feature of the USB bus is that USB units can be connected to the host (“hot plugging”) or disconnected from the host (“sudden removal”) during operation. This property allows peripheral units to be connected to and disconnected from the host again in very simple fashion without the need for further action by the user. The simple handling is certainly a fundamental reason for the widespread use of the USB bus.
The connection of a peripheral unit 2 to the host 1 is signaled in the USB bus by the signal level of the data lines D+ and D−. If no peripheral unit 2 is connected, the data lines D+ and D− are pulled to the ground potential GND via the pull-down resistors Rpd in the host 1. If a peripheral unit 2 is now connected to the host system 1 via the data transmission interface 3, the data line D+ in
As soon as a peripheral unit 2 is connected to the host 1, a current Ibias flows to the ground potential GND from the supply potential Vbus via the pull-up resistor Rpu, the data line D+ and the pull-down resistor Rpd. This flow of current is shown in
The bias current is calculated from Ibias=Vbus/(Rpu+Rpd). When Rpu=1.5 kΩ and Rpd=15 kΩ, a supply potential of Vbus=3.3 V makes the bias current Ibias=200 μA, and Vbus=5 V makes Ibias=303 μA. This current Ibias continues to flow for as long as a peripheral unit 2 is connected to the host 1. If the flow of current in the case of fixed-location applications, such as a PC, is negligible, then the constant power requirement in the case of mobile, generally battery-operated applications, such as a mobile phone with a USB-SIM card, is a significant restriction.
The invention is therefore based on an object of specifying an apparatus which can be used to reduce the bias current and of specifying a method for operating such an apparatus.
The invention achieves this object by virtue of the host system containing at least one switching device for the purpose of setting up a connection between at least one of the data lines of the data transmission interface and a prescribed potential in the host system.
The invention is explained in more detail below using exemplary embodiments with reference to the drawings, in which:
a, b, and c show exemplary embodiments of the switching device;
An apparatus for detecting a connection of at least one peripheral unit to a host system via a data transmission interface in which the host system has at least one switching device for the purpose of setting up a connection between at least one of the data lines of the data transmission interface and a prescribed potential in the host system.
The fact that the data lines in the data transmission interface are now no longer permanently connected to a prescribed potential in the host but rather can be connected selectively results in a series of advantages. If the data lines of the data transmission interface are disconnected from the prescribed potential in the host system by the switching device, then a bias current cannot flow. This is of particular advantage in mobile, battery-operated applications, which are therefore given a longer operating time.
If no bias current is flowing, then it is no longer possible to identify whether or not a peripheral unit is connected to the host. This is not necessarily a significant drawback, however, since in some applications it is not actually possible to disconnect the peripheral unit from the host system without turning off the entire system beforehand. A USB-SIM card may be removed, by way of example, only if the mobile telephone is opened and the battery is taken out, which automatically turns off the entire system. “Sudden removal” or “hot plugging” of the peripheral unit is not possible in these cases and therefore also does not need to be detected.
If it is necessary to detect when a peripheral unit is connected to or disconnected from the host system, the switching device can be used to connect at least one of the data lines of the data transmission interface to a prescribed potential in the host system. The selective connection means that it is still possible to identify connection of a peripheral unit to the host without this always requiring the flow of a bias current.
In line with one development, the switching device comprises a resistor in series with a switch. In this arrangement, the resistor is used to pull the data line to a prescribed potential via the switch. In this case, the simplicity of the arrangement is advantageous.
Advantageously, the series circuit comprising the resistor and the switch has a further resistor connected in parallel with it. In this way, it is possible to prevent the data line from having an undefined potential when the switch is open and a peripheral unit is not connected.
In another embodiment, a resistor is connected not in parallel with the series circuit comprising the first resistor and the switch, but rather solely in parallel with the switch. This also allows the potential of the data line to be fixed at a particular value when the switch is open and a peripheral unit is not connected. In this case, it is advantageous that the resistor for this switching device is obtained essentially from the resistance of the first resistor when the switch is closed.
In one development, the prescribed potential in the host system to which the data lines are connected via a switching device is the ground potential. This means that a data transmission interface having just four lines is sufficient.
In one advantageous development, the switching device for connecting at least one of the data lines of the data transmission interface to a prescribed potential in the host system is connected to a cycle generator. The cycle generator can periodically close and open a switch in the switching device. In this way, a bias current flows only at the times at which the switch in the switching device is closed. In this case, the period of the cycle generator can be chosen to be short enough for it to be possible to detect when a peripheral unit is connected to or removed from the host system in timely fashion or else can be chosen to be long enough for the current drawn over a relatively long period to be minimal.
In one development, the data transmission interface has two data lines, a current supply line and a ground line. In this way, the invention can be applied to data transmission interfaces which comprise such lines, such as the USB bus.
Advantageously, the data lines are connected to the ground line in the host system via switching devices, and to the voltage supply line in the peripheral unit via further switches and via at least one resistor. In this way, the data transmission rate can be determined by the peripheral unit, and additionally the connection of a peripheral unit can be detected.
Advantageously, the data transmission interface corresponds to the universal serial bus USB 2.0 specifications when the connections of the switching devices in the host system are connected. The effect achieved by this is that full compatibility with this standard is ensured, and existing USB units can be connected to host units which have the invention.
When the switching device 4 is in the closed state, so that the data line D+ is connected to the ground potential GND, a current flows (driven by the supply potential Vbus) via the pull-up resistor Rpu in the peripheral unit 2, the data line D+ and the switching device 4 to the ground potential GND. The voltage level which then appears on the data line D+ makes it possible to detect when the peripheral unit 2 is connected to or removed from the host system 1 using an appropriate mechanism in the host system 1.
When the peripheral unit 2 is disconnected from the host system 1, the data line D+ is no longer pulled to the supply potential Vbus by the pull-up resistor Rpu in the peripheral unit 2, and this can be detected in the host system 1 and can be used to trigger appropriate actions. The closed state of the switching device 4 is therefore of particular interest when peripheral units 2 are connected to or disconnected from a host 1 afresh.
If it is not necessary to monitor constantly whether peripheral units 2 are connected to the host system 1, the switching device 4 can be switched to an open state. In this state, either no or just a very small current flows from the supply potential Vbus via the pull-up resistor Rpu in the peripheral unit 2, the data line D+ and the switching device 4 to ground potential GND. The very small current in comparison with the prior art is of particular interest for battery-operated applications or for applications in which it can be assumed that the peripheral unit 2 is not disconnected from the host system 1 for a relatively long period. This is the case, for example, with a USB keyboard, which, following successful connection and configuration, does not require “hot plugging” or “sudden removal” functionality, since it is disconnected from the PC only rarely.
Should such a situation nevertheless require a check to determine whether a peripheral unit 2 is connected to the host 1, this can be done at any time by closing the switching device 4. In this case, the switching device 4 may be designed such that in the closed state the full functionality of a USB bus is possible while observing all stipulations from the USB specification.
a to 5c show exemplary embodiments of the switching devices 4. In the simplest case, the switching device 4 is implemented as shown in
b shows a further embodiment of the switching device 4 in which the series circuit comprising the pull-down resistor Rpd and the switch S additionally has a resistor Rw connected in parallel with it. If the switching device 4 is implemented as shown in
To prevent this, the data lines D+ and D− in the embodiment of the switching device 4 which is described in
c shows a further embodiment of the switching device 4. The arrangement known from
The periodic changeover of the switching device 4 means that the potential of the data line D+ or D− will also fluctuate periodically. To avoid interference with the data transmission, it is possible to choose the times at which the cycle generator 5 actuates the switching device 4 such that they occur at times at which the data transmission is not disrupted, such as during a synchronization interval. Instead of a cycle generator 5, the switching device 4 could also be actuated by other signals, for example sensors or a manual switch.
For full-speed data transmission, the data line D+ is connected to the supply potential Vbus via the pull-up resistor Rpu. The switch S1 remains closed and connects the data line D− to the ground potential GND via the pull-down resistor Rpd. Since the switch S4 is open, a constant bias current does not flow via the data line D−. When the switch S2 is open, the data line D+ in the host system is likewise connected to the ground potential GND via the series circuit comprising the pull-down resistor Rpd and Rw. In this way, the data line D+ has a defined potential even when the peripheral unit 2 is disconnected. However, since Rw is again chosen to be large in relation to Rpd, only a small current flows. Rw could have values in the MΩ range and Rpd could have values in the kΩ range, for example.
To detect the presence of a peripheral unit 2, the switch S2 is closed. As a result, a current flows to the ground potential GND from the supply voltage Vbus via the pull-up resistor Rpu, the switch S3, the data line D+ and the pull-down resistor Rpd, which results in a change of level on the data line D+ if the peripheral unit 2 is connected, and this change of level can be evaluated in the host system 1.
For data transmission in the low-speed mode, the switch S4 is closed in the peripheral unit 2 and as a result the data line D− is pulled to the supply potential Vbus via the pull-up resistor Rpu. In the host system 1, the data line D+ is permanently connected to the ground potential GND via the pull-down resistor Rpd and the closed switch S2. A current cannot flow in this case, since the data line D+ is not connected to the supply potential Vbus via the pull-up resistor Rpu as a result of the switch S3 being open.
If a peripheral unit 2 is not connected to the host system 1, the data line D− is put at a defined potential, namely the ground potential GND, via the series circuit comprising the pull-down resistor Rpd and the resistor Rw when the switch S1 is open. The comparatively high resistance of Rw means that only a very small current flows again.
To detect whether a peripheral unit 2 is connected, the switch S1 is closed, so that if a peripheral unit 2 is connected a current flows from the supply potential Vbus to ground GND via the pull-up resistor Rpu, the switch S4, the data line D− and the pull-down resistor Rpd. The resultant level changes on the data line D− are detected and evaluated in the host system 1.
The exemplary embodiment shown in
In a second mode of operation, depending on the data transmission rate chosen, the switches S1 and S2 are closed only when it is necessary to check whether a peripheral unit 2 is connected to the host 1. This check can be performed periodically or else at times at which a peripheral unit 2 is expected to be connected to or disconnected from the host 1. If the switch S1 or S2 is open, a very small current, or no current in instances of application in which the resistors Rw can be omitted completely, flows via the pull-down resistors Rpd. If the switch S1 or S2 is closed, it is possible to detect when a peripheral unit 2 is connected to a host 1.
In a third mode, the switches S1 and S2 are always closed. In this way, compatibility with conventional USB systems is obtained with suitable values for the pull-down resistors Rpd and the pull-up resistors Rpu. The connection of a peripheral unit 2 to a host 1 can be detected at any time, but for this a bias current will flow constantly, exactly as in the case of the USB bus standard.
Number | Date | Country | Kind |
---|---|---|---|
10 2004 031 278.8 | Jun 2004 | DE | national |