KR100659515B1 - Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same - Google Patents

Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same Download PDF

Info

Publication number
KR100659515B1
KR100659515B1 KR1020040004744A KR20040004744A KR100659515B1 KR 100659515 B1 KR100659515 B1 KR 100659515B1 KR 1020040004744 A KR1020040004744 A KR 1020040004744A KR 20040004744 A KR20040004744 A KR 20040004744A KR 100659515 B1 KR100659515 B1 KR 100659515B1
Authority
KR
South Korea
Prior art keywords
usb
mode
line
host
vbus line
Prior art date
Application number
KR1020040004744A
Other languages
Korean (ko)
Other versions
KR20050077106A (en
Inventor
이준철
Original Assignee
주식회사 텔레칩스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 텔레칩스 filed Critical 주식회사 텔레칩스
Priority to KR1020040004744A priority Critical patent/KR100659515B1/en
Publication of KR20050077106A publication Critical patent/KR20050077106A/en
Application granted granted Critical
Publication of KR100659515B1 publication Critical patent/KR100659515B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Power Sources (AREA)
  • Information Transfer Systems (AREA)

Abstract

본 발명은 USB 장치가 접속되었을 때 USB 신호라인의 전기적 상태를 센싱함으로써 그 접속된 USB 장치가 호스트 장치인지 아니면 디바이스 장치인지를 판단하여 이에 따라 USB 동작모드를 자동으로 스위칭하는 방법, 및 자동스위칭 방법을 사용함으로써 단일형식의 USB 포트를 통해 호스트 장치와 디바이스 장치 모두 접속하여 사용할 수 있는 USB 장치에 관한 것이다. 본 발명에 따르면 단일형식의 USB 포트를 사용하여 호스트 장치와 디바이스 장치를 선택적으로 모두 접속하여 사용할 수 있고, 이를 통하여 휴대용 USB 장치를 보다 소형, 저가격으로 설계할 수 있다는 장점이 있다.According to the present invention, a method of automatically switching a USB operation mode according to whether a connected USB device is a host device or a device device by sensing an electrical state of a USB signal line when the USB device is connected, and an automatic switching method accordingly The present invention relates to a USB device that can be used by connecting both a host device and a device device through a single USB port. According to the present invention, both a host device and a device device can be selectively connected and used by using a single type of USB port, thereby making it possible to design a portable USB device more compactly and at a lower cost.

USB, 호스트, 디바이스, 자동검출, 스위칭USB, host, device, autodetect, switching

Description

USB 동작모드의 자동스위칭 방법, 및 이를 이용한 단일포트 USB 장치 {Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same} Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same}             

도 1은 USB 플러그와 USB 리셉터클의 기구 사양을 도시하는 도면.BRIEF DESCRIPTION OF THE DRAWINGS The figure which shows the mechanism specifications of a USB plug and a USB receptacle.

도 2a와 도 2b는 USB 케이블의 라인 사양, 및 호스트 장치와 디바이스 장치 간의 USB 케이블 라인접속 사양을 도시하는 도면.2A and 2B show a line specification of a USB cable and a USB cable line connection specification between a host device and a device device.

도 3은 본 발명의 일 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면.3 is a diagram illustrating an automatic switching method of the USB operation mode according to an embodiment of the present invention.

도 4a 내지 도 4e는 본 발명의 실시예에 따른 전압강하 검출회로, USB 스위칭회로, VBUS 전위 생성회로, 동작전원 추출회로, 스위칭신호 생성회로의 상세구성을 도시하는 도면.4A to 4E are diagrams showing detailed configurations of a voltage drop detection circuit, a USB switching circuit, a VBUS potential generation circuit, an operating power extraction circuit, and a switching signal generation circuit according to an embodiment of the present invention.

도 5는 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면.5 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention.

도 6은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면.6 is a diagram illustrating an automatic switching method of a USB operation mode according to another embodiment of the present invention.

도 7은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도 시하는 도면.7 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention.

도 8은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면.8 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention.

본 발명은 USB 장치가 접속되었을 때 USB 신호라인의 전기적 상태를 센싱함으로써 그 접속된 USB 장치가 호스트 장치(USD Host)인지 아니면 디바이스 장치(USB Device)인지를 판단하여 이에 따라 동작모드를 자동으로 스위칭하는 방법, 및 이러한 자동스위칭 방법을 사용함으로써 단일형식의 USB 포트를 통해 호스트 장치와 디바이스 장치 모두 접속하여 사용할 수 있는 USB 장치에 관한 것이다.The present invention determines whether the connected USB device is a host device (USD Host) or a device device (USB Device) by sensing the electrical state of the USB signal line when the USB device is connected, and automatically switches the operation mode accordingly. And a USB device that can be used by connecting both a host device and a device device through a single type of USB port by using the automatic switching method.

종래로 컴퓨터 시스템과 주변장치 간의 데이터 접속을 위해서 범용 시리얼 버스(USB)가 널리 사용되어 왔는데, 이러한 USB 접속은 통신기법상 소위 일대일 접속으로서 USB 접속된 두 단말은 각각 USB 호스트 장치와 USB 디바이스 장치로 구분된다. 이 중, USB 호스트 장치는 USB 버스의 토폴로지 관리, USB 디바이스 장치의 상태 모니터링 및 기기제어, USB 버스를 통한 데이터 전송관리를 책임지며, 나아가 자신에게 접속된 USB 디바이스 장치에 대해서 필요한 경우 소정의 동작전원을 공급하는 책임도 부담한다.Conventionally, a universal serial bus (USB) has been widely used for data connection between a computer system and a peripheral device. This USB connection is a so-called one-to-one connection in communication technology, and two USB-connected terminals are classified into a USB host device and a USB device device, respectively. do. Among them, the USB host device is responsible for topology management of the USB bus, status monitoring and device control of the USB device device, and data transfer management through the USB bus. It also bears the responsibility of supplying it.

통상적으로는 컴퓨터 시스템이 USB 호스트 장치로서 동작하며, 컴퓨터 시스 템에 연결되는 각종의 USB 장치, 예컨대 마우스, 프린터, 키보드, 카메라, 스캐너 등은 USB 디바이스 장치로서 동작한다. 이러한 USB 디바이스 장치 중에서 마우스, 키보드, 카메라 등은 자체적으로 동작전원을 갖고있지 않아 컴퓨터 시스템으로부터 동작전원을 공급받아 동작하므로 버스파워형(bus-powered) 장치라 하고, 프린터나 스캐너 등의 USB 디바이스 장치는 그 동작전원을 자체적으로 구비하고 있으므로 셀프파워형(self-powered) 장치라고 한다.Typically, a computer system operates as a USB host device, and various USB devices connected to the computer system, such as a mouse, printer, keyboard, camera, scanner, etc., operate as a USB device device. Of these USB device devices, mice, keyboards, cameras, etc. do not have their own operating power, so they operate by receiving operating power from a computer system, so they are called bus-powered devices, and USB device devices such as printers and scanners. Is called a self-powered device because it has its own operating power.

USB 규격집인 Universal Serial Bus Specification, Rev 1.1, September 23, 1998에서는 USB 호스트 장치와 USB 디바이스 장치에서 사용하는 USB 콘넥터 기구 사양을 규정하는데, 도 1은 이러한 USB 플러그(Plug)와 USB 리셉터클(Receptacle)의 기구 사양을 도시하는 도면이다. 도면에서, 플러그/리셉터클(120, 110)은 USB 호스트 장치에서 사용하는 콘넥터 사양이고 플러그/리셉터클(140, 130)은 USB 디바이스 장치에서 사용하는 콘넥터 사양이며, 이에 USB 케이블은 일방은 호스트용 플러그(120)를 구비하고 다른 일방은 디바이스용 플러그(140)을 구비하여 이를 통해 USB 호스트 장치와 USB 디바이스 장치가 접속되도록 한다.The Universal Serial Bus Specification, Rev 1.1, September 23, 1998, the USB specification, specifies the USB connector mechanism specifications used in USB host devices and USB device devices. FIG. 1 shows the USB plug and USB receptacle. It is a figure which shows a mechanism specification. In the figure, the plug / receptacle 120, 110 is the connector specification used in the USB host device and the plug / receptacle 140, 130 is the connector specification used in the USB device device, so that the USB cable is one of the host plug ( 120 and the other side has a plug 140 for a device so that the USB host device and the USB device device are connected.

USB 규격에서는 이와 같이 콘넥터의 기구적인 사양을 달리함으로써 USB 장치가 스스로의 동작모드를 규정하고, 또한 자신과 USB 접속될 상대방의 동작모드를 명시적으로 제한하도록 하였다. 즉, 호스트용 리셉터클(110)을 구비한 USB 장치는 항상 USB 호스트 장치로서 동작하며, 동시에 자신과 접속될 상대방은 항상 USB 디바이스 장치라고 가정하면 되었으며, 소프트웨어 측면에서도 호스트 동작모드에 대한 프로그램만 구비하면 되었다.By changing the mechanical specifications of the connector in this way, the USB standard defines the operation mode of the USB device and also explicitly limits the operation mode of the other party to be connected to the USB device. In other words, the USB device having the host receptacle 110 always operates as a USB host device, and at the same time, it is assumed that the other party to be connected to the host is a USB device device. It became.

그러나, 최근에는 하나의 USB 장치가 경우에 따라서 선택적으로 USB 호스트 장치로서 기능하고 또한 USB 디바이스 장치로서 기능하도록 동작환경이 변화되고 있다. 예컨대, 2대의 MP3 플레이어 사이에서 MP3 파일을 교환하는 기능이 사용자들로부터 강하게 요구되는데, 이를 위해서는 이들 중에서 1대는 USB 호스트 장치로서 기능하여야 한다. 종래의 기술에 따르면, 이를 구현하기 위해서 하나의 USB 장치에 호스트용 리셉터클(110)과 디바이스용 리셉터클(130)을 모두 구비하여야 하는데, 이러한 점은 소형/저가격화에 장애가 되며, 특히 휴대용 장치에는 기구적인 제약에 의해 채용하기가 극히 곤란하다.However, in recent years, the operating environment has been changed so that one USB device may optionally function as a USB host device and also as a USB device device. For example, the ability to exchange MP3 files between two MP3 players is strongly demanded from users, of which one must function as a USB host device. According to the prior art, in order to implement this, both a host receptacle 110 and a device receptacle 130 must be provided in a single USB device, which is an obstacle to miniaturization / low cost, especially in a portable device. It is extremely difficult to employ due to general constraints.

이에, 본 발명은 단일형식의 USB 포트를 사용하여 호스트 장치와 디바이스 장치 모두 접속하여 사용할 수 있도록 USB 장치가 접속되었을 때 USB 신호라인의 전기적 상태를 센싱함으로써 그 접속된 USB 장치가 호스트 장치인지 아니면 디바이스 장치인지를 판단하고 이에 따라 자신의 USB 동작모드를 자동으로 스위칭하는 방법, 및 이러한 자동스위칭 방법을 이용하여 단일형식의 USB 포트를 통해 호스트 장치와 디바이스 장치 모두에 접속하여 사용할 수 있는 USB 장치를 제공하는 데에 그 목적이 있다.Accordingly, the present invention senses the electrical state of the USB signal line when the USB device is connected so that both the host device and the device device can be connected and used by using a single type of USB port. Provides a method of determining whether the device is a device and automatically switching its own USB operation mode, and a USB device that can be connected to and used by both the host device and the device device through a single type of USB port using this automatic switching method. Its purpose is to.

이하, 첨부된 도면을 참조하여 본 발명을 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail the present invention.

본 발명에서는 USB 포트를 통하여 외부 USB 장치가 접속되었을 때 USB 신호라인의 상태를 센싱함으로써 그 접속된 USB 장치가 호스트 장치인지 아니면 디바이스 장치인지를 판단하고 그 판단결과에 따라 자신의 USB 동작모드를 자동으로 스위칭한다. 이를 위해서는 먼저 USB 인터페이스의 라인접속 사양을 이해하여야 하는 바, 도 2a와 도 2b를 참조하여 이를 기술한다.According to the present invention, when an external USB device is connected through a USB port, the state of the USB signal line is sensed to determine whether the connected USB device is a host device or a device device. Switch to To this end, it is necessary to first understand the line connection specification of the USB interface, which will be described with reference to FIGS. 2A and 2B.

도 2a와 도 2b는 USB 케이블을 통한 호스트 장치(250)와 디바이스 장치(260) 간의 라인접속 사양을 도시하는 도면이다. 도 2a에 도시된 바와 같이, USB 케이블은 4개의 신호라인(210~240)으로 구성되어 있는데, 전원라인인 VBUS 라인(210)과 GND 라인(240)은 접속된 디바이스 장치(260)가 버스파워형 장치인 경우에 호스트 장치(250)로부터 전원을 공급받는 데에 사용하기 위한 라인이고, 데이터 라인인 D+ 라인(220)과 D- 라인(230)은 호스트 장치(250)와 디바이스 장치(260) 간에 직렬 데이터 통신을 제공하기 위한 라인이다.2A and 2B are diagrams showing the line connection specification between the host device 250 and the device device 260 via a USB cable. As shown in FIG. 2A, the USB cable is composed of four signal lines 210 to 240. The VBUS line 210 and the GND line 240, which are power lines, are connected to a bus device connected to a device device 260. In the case of a device type, a line for use to receive power from the host device 250, and the data lines D + line 220 and D-line 230 are the host device 250 and the device device 260. Line to provide serial data communication between.

USB 규격에 따르면, 호스트 장치(250)는 버스파워형 디바이스 장치(260)에 대해서 동작전원을 공급하여야 하므로 VBUS 라인(210)에 전원단자인 +5 V 단자를 접속시키는 반면, 디바이스 장치(260)는 VBUS 라인(210)에 전원을 공급하지 않는다. VBUS 라인(210)에 공급된 전원에 대해서, 버스파워형 디바이스 장치는 VBUS 라인(210)으로부터 전원을 공급받아 장치 내부에서 사용하는 반면, 셀프파워형 디바이스 장치는 자체전원을 가지고 있으므로 VBUS 라인(210)으로부터 전원을 공급받을 필요가 없다.According to the USB standard, since the host device 250 must supply operating power to the bus-powered device device 260, the host device 250 connects a +5 V terminal, which is a power terminal, to the VBUS line 210, while the device device 260 is connected. Does not supply power to the VBUS line 210. With respect to the power supplied to the VBUS line 210, the bus powered device device receives power from the VBUS line 210 and uses it inside the device, while the self-powered device device has its own power supply, so the VBUS line 210 No need to get power from

따라서, USB 장치가 접속되었을 때 그 접속된 장치가 호스트 장치나 자체전원을 사용하는 셀프파워형 디바이스 장치인지 아니면 USB로부터 전원을 공급받아야 하는 버스파워형 디바이스 장치인지를 판단하기 위해서는 VBUS 라인(210)에 전원을 공급한 상태에서 VBUS 라인(210)의 전위를 센싱하면 알 수 있다. 즉, 자체전원을 사용하는 장치인 경우에는 사실상 무한 임피던스이므로 VBUS 라인(210)의 전위에 별달리 변화가 없는 반면, 자체전원을 사용하지 않는 장치인 경우에는 VBUS 라인(210)으로부터 전류를 끌어서 사용하므로 VBUS 라인(210)의 전위가 일정 부분 저하되는 현상, 즉 전압강하가 발생하게 된다.Accordingly, when the USB device is connected, the VBUS line 210 is used to determine whether the connected device is a host device or a self-powered device device using its own power source or a bus power device device to be powered from the USB device. This can be seen by sensing the potential of the VBUS line 210 while power is supplied to it. That is, in the case of a device using its own power supply, since it is virtually infinite impedance, there is no change in the potential of the VBUS line 210, whereas in the case of a device not using its own power supply, it draws current from the VBUS line 210. A phenomenon in which the potential of the VBUS line 210 is lowered to some extent, that is, a voltage drop occurs.

한편, 호스트 장치(250)는 D+ 라인(220)과 D- 라인(230)을 예컨대 15 ㏀ 저항소자를 통해 풀-다운(pull-down)시키는 반면, 디바이스 장치(260)는 예컨대 1.5 ㏀ 저항소자를 통해 고속형인 경우에는 D+ 라인(220)을, 저속형인 경우에는 D- 라인(230)을 풀-업(pull-up)시킨다. 도 2b에는 고속형의 디바이스 장치(260)를 예시적으로 도시하였다. 따라서, 접속된 USB 장치가 호스트 장치(250)인지 디바이스 장치(260)인지를 판단하기 위해서는 D+/D- 라인(220, 230)을 센싱하여 모두 LOW 레벨인지 아니면 어느 한 라인이 HIGH 레벨인지를 검사하면 알 수 있다. 본 명세서에서는 이들을 데이터 라인(220, 230)이라 기술한다.On the other hand, the host device 250 pulls down the D + line 220 and the D- line 230 through, for example, a 15 kV resistor, while the device device 260 is a 1.5 kV resistor, for example. In the high speed type, the D + line 220 is pulled up, and in the low speed type, the D-line 230 is pulled up. 2B exemplarily illustrates a high speed device device 260. Accordingly, in order to determine whether the connected USB device is the host device 250 or the device device 260, the D + / D- lines 220 and 230 are sensed to check whether all the devices are at the LOW level or which one is the HIGH level. You can see. In this specification, these are referred to as data lines 220 and 230.

도 3은 본 발명의 일 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면이다. 먼저, USB 인터페이스의 VBUS 라인(210)에 +5 V 전위를 인가한 상태로 특정 시간(T1)를 유지(ST301)하고, 호스트 신호라인을 USB 인터페이스에 연결 하면서(ST302) USB 인터페이스의 데이터 라인, 즉 D+/D- 라인(220, 230)의 레벨을 검사(ST303)한다. 이 때, VBUS 라인(210)에 +5 V 전위를 인가한 상태로 T1 시간을 유지(ST301)하는 것은 상대 USB 기기가 버스파워형 디바이스 기기인 경우에 시스템 부팅을 하고, 셀프파워형 디바이스 기기인 경우에는 혹시라도 전원스위칭을 할 수 있으므로 이를 위한 시간적 여유를 제공하기 위한 것이다. 또한, 호스트 신호라인을 USB 인터페이스에 연결(ST302)하는 것은 D+/D- 라인(220, 230)을 일단 풀다운시켜 상대 USB 기기의 접속으로 인한 레벨변화를 판단하기 위한 것으로, 별도의 방법으로 풀다운이 가능하다면 굳이 단계(ST302)에서 호스트 신호라인을 USB 인터페이스에 연결할 필요는 없다고 해석된다.3 is a diagram illustrating an automatic switching method of a USB operation mode according to an embodiment of the present invention. First, while maintaining a specific time (T1) while the +5 V potential is applied to the VBUS line 210 of the USB interface (ST301), while connecting the host signal line to the USB interface (ST302), the data line of the USB interface, That is, the levels of the D + / D− lines 220 and 230 are checked (ST303). At this time, maintaining the T1 time while the +5 V potential is applied to the VBUS line 210 (ST301) causes the system to boot up when the partner USB device is a bus power device device, and is a self-powered device device. In this case, it is possible to switch the power supply in any case to provide time for this. In addition, connecting the host signal line to the USB interface (ST302) is to determine the level change due to the connection of the other USB device by pulling down the D + / D- lines 220 and 230 once. If possible, it is interpreted that it is not necessary to connect the host signal line to the USB interface in step ST302.

만일, 데이터 라인(220, 230)의 신호레벨이 'HIGH'로 검출된 경우에는 현재 USB 인터페이스를 통해 (버스파워형 또는 셀프파워형) 디바이스 기기가 접속된 것으로 판단할 수 있다. 따라서, 기기 내부의 운영 소프트웨어에 그러한 이벤트를 알리기 위해 호스트 모드 인터럽트를 발생(ST304)시키고, 소정 USB 규격에 따라서 토폴로지 관리나 파일복사 등과 같은 호스트 모드의 기기동작을 수행(ST305)하며, 어느 정도 시간이 경과하면 USB 접속을 통하여 사용자가 수행하려고 의도한 특정의 호스트 모드 동작, 예컨대 파일복사 동작이 종료(ST306)된다. 이로써, USB 호스트 모드의 동작이 완료된다.If the signal level of the data lines 220 and 230 is detected as 'HIGH', it may be determined that the device device (bus power type or self power type) is currently connected through the USB interface. Therefore, a host mode interrupt is generated (ST304) to inform the operating software inside the device of such an event (ST304), and a host mode device operation such as topology management or file copying is performed according to a predetermined USB standard (ST305). After this elapses, a specific host mode operation, for example, a file copy operation, which the user intends to perform through the USB connection is terminated (ST306). This completes the operation of the USB host mode.

한편, 데이터 라인(220, 230)의 신호레벨이 'LOW'로 검출된 경우에는 현재 USB 인터페이스를 통해 호스트 모드의 기기가 접속되었을 수도 있고 아니면 전혀 접속이 이루어지지 않아 스스로의 풀-다운에 의해서 LOW 레벨이 유지되었을 수도 있어 이를 구분 판단할 필요가 있다. 또한, 선택적으로는 전술한 바와 같이 USB 호스트 모드의 동작이 완료(ST304~ST306)된 이후에 호스트 모드의 기기가 현재 접속되었는지 여부를 판단할 수도 있다.On the other hand, when the signal level of the data lines 220 and 230 is detected as 'LOW', the host mode device may be connected through the current USB interface or the connection is not made at all. Levels may have been maintained and need to be determined. Alternatively, as described above, after the operation of the USB host mode is completed (ST304 to ST306), it may be determined whether the device of the host mode is currently connected.

이를 위해서, 전술한 단계(ST301)에서 VBUS 라인(210)에 인가되었던 +5 V 전위공급을 제거(ST307)한 후, VBUS 라인(210)의 전위가 여전히 +5 V를 유지하는지 여부를 검사(ST308)한다. 이 때, 단계(ST307)에서 +5 V 전위공급을 제거하는 이유는 만일 제거하지 않는다면 VBUS 라인(210)은 전위공급에 의해 항상 신호레벨이 +5 V로 검출될 것이기 때문이며, 단계(ST307)에서 전위공급이 제거되었음에도 불구하고 단계(ST308)에서 VBUS 라인(210)의 전위가 여전히 +5 V를 유지하는 것으로 판단된다면 이는 USB 인터페이스를 통해 호스트 모드의 기기가 접속되어 VBUS 라인(210) 상에 +5 V 전위를 공급하기 때문이다.To this end, after removing the +5 V potential supply applied to the VBUS line 210 at step ST301 (ST307), it is checked whether the potential of the VBUS line 210 is still maintained at +5 V ( ST308). At this time, the reason why the +5 V potential supply is removed in step ST307 is that if it is not removed, the VBUS line 210 will always be detected as +5 V by the potential supply, and in step ST307 If the potential of the VBUS line 210 is still maintained at +5 V in step ST308 despite the fact that the potential supply has been removed, this means that the device in host mode is connected via the USB interface and the + on the VBUS line 210 is connected. This is because a 5 V potential is supplied.

이 경우, VBUS 라인(210)을 통해 공급되는 +5 V 전력으로 기기의 동작전원을 설정함과 동시에 기기의 자체전원은 차단(ST309)하는데 이는 더이상의 전력소모가 없도록 하여 파워세이브를 달성하기 위함이다. 이어서 USB 인터페이스에 디바이스 신호라인이 접속(ST310)되도록 스위칭하고 USB 디바이스 모드의 동작, 예컨대 파일복사 동작을 사용자가 소망하는 대로 수행(ST311, ST312)한다. 바람직하게는, 디바이스 모드의 동작은 VBUS 라인(210)의 동작전위가 +5 V를 유지하는 동안 계속되며, 그 이후에는 즉시 자체전원으로 절환(ST314)한다.In this case, the operation power of the device is set to +5 V power supplied through the VBUS line 210 and the device's own power is cut off (ST309). This is to achieve power saving by eliminating power consumption. to be. Then, the device signal line is connected to the USB interface so as to be connected (ST310), and the operation of the USB device mode, for example, the file copying operation, is performed as desired by the user (ST311, ST312). Preferably, the device mode of operation continues while the operating potential of the VBUS line 210 remains at +5 V, after which it immediately switches to its own power source (ST314).

한편, 단계(ST308)에서 VBUS 라인(210)의 전위가 +5 V가 아닌 경우에는 USB 인터페이스를 통해 호스트 모드의 기기가 접속되지 않은 것으로 판단하는 것이 가능하며, 이 경우 바로 동작을 종료한다.On the other hand, when the potential of the VBUS line 210 is not +5 V in step ST308, it is possible to determine that the device of the host mode is not connected through the USB interface, in which case the operation is immediately terminated.

도 3에 도시된 일련의 과정은 USB 인터페이스를 구비한 장치에서 USB 인터페이스를 통해 어떠한 USB 장치가 접속되었는지의 여부를 먼저 검출하고, 나아가 만일 어떠한 USB 장치가 접속되었다면 그 접속된 장치가 현재 USB 호스트 모드로 동작하는 장치인지 아니면 USB 디바이스 모드로 동작하는 장치인지를 검출하는 동작에 관한 것이다. 도 3에 도시된 일련의 과정은 타이머 인터럽트 방식이나 폴링(polling) 방식으로 수행될 수 있다.The process shown in FIG. 3 first detects which USB device is connected via the USB interface in the device with the USB interface, and furthermore, if any USB device is connected, the connected device is currently in USB host mode. The present invention relates to an operation of detecting whether the device operates in the USB device mode or the device operating in the USB device mode. The series of processes illustrated in FIG. 3 may be performed by a timer interrupt method or a polling method.

도 4a 내지 도 4e는 본 발명의 실시예에 따른 전압강하 검출회로(410), USB 스위칭회로(420), VBUS 전위 생성회로(430), 동작전원 추출회로(440), 스위칭신호 생성회로(450)의 상세구성을 도시하는 도면으로서, 도 4a 내지 도 4e에 도시된 실시예는 전계효과 트랜지스터(Field Effect Transistor : FET)를 사용하여 구현되어 있으나, 통상의 바이폴라 트렌지스터(Bipolar Transistor)를 사용하여 구현하더라도 무방하며, 기타의 칩셋을 사용하여 본 발명을 구성하는 것도 가능하다. 한편, FET 소자의 특성상, P-채널 FET는 핀1(게이트)가 핀2(소스)보다 특정 임계치 이상 낮을 때 핀2(소스)-핀3(드레인)으로 전류가 흐르고, N-채널 FET는 핀1(게이트)가 핀2(소스)보다 특정 임계치 이상 높을 때 핀3(드레인)-핀2(소스)로 전류가 흐른다는 점에서 서로 구별된다.4A to 4E illustrate a voltage drop detection circuit 410, a USB switching circuit 420, a VBUS potential generation circuit 430, an operation power extraction circuit 440, and a switching signal generation circuit 450 according to an embodiment of the present invention. 4A to 4E are implemented using a Field Effect Transistor (FET), but are implemented using a conventional Bipolar Transistor. It is also possible to configure the present invention using other chipsets. On the other hand, due to the characteristics of the FET device, a P-channel FET flows current to pins 2 (source) to pins 3 (drain) when pin 1 (gate) is lower than a certain threshold than pin 2 (source), and the N-channel FET They are distinguished from each other in that current flows from pin 3 (drain) to pin 2 (source) when pin 1 (gate) is higher than a certain threshold above pin 2 (source).

먼저, 도 4a에 도시된 전압강하 검출회로(410)에 대해서 기술한다. 도시된 전압강하 검출회로(410)는 VBUS 라인(210)으로 전류가 흘러나가는지 여부를 센싱하 여, 만일 전류가 흘러나가는 경우, 즉 USB로 연결된 상대방 기기로 소량이라도 전원이 제공되는 경우에는 신호 DEV_IN_DTC를 'HIGH'로 출력하고, 그렇지 않은 경우에는 신호 DEV_IN_DTC를 'LOW'로 출력한다. 따라서, 전압강하 검출회로(410)에서 검출하는 '전압강하'란 VBUS 라인(210) 상의 전류흐름으로 인한 저항소자(413) 양단의 전압강하를 의미한다고 보는 것이 정확하다.First, the voltage drop detection circuit 410 shown in FIG. 4A will be described. The illustrated voltage drop detection circuit 410 senses whether a current flows through the VBUS line 210, and if a current flows out, that is, a small amount of power is supplied to the counterpart device connected to the USB. The DEV_IN_DTC is output as 'HIGH', otherwise the signal DEV_IN_DTC is output as 'LOW'. Therefore, the voltage drop detected by the voltage drop detection circuit 410 is accurate to regard the voltage drop across the resistance element 413 due to the current flow on the VBUS line 210.

전압강하 검출회로(410)에서는 시스템 동작전압인 3.3 V 전위(VDD33D)가 비교적 큰 저항값을 갖는 저항소자(413)를 거쳐서 다이오드(412)의 애노드(anode)로 연결되고, 다시 다이오드(412)의 캐쏘드(cathod)는 VBUS 라인(210)에 연결되어 있다. 이러한 구성에서는, 만일 시스템 전원인 VDD33D로부터 VBUS 라인(210)으로 전류가 흐르지 않으면 P-채널 FET(411)의 핀2-핀1의 전위차가 없기 때문에 핀2-핀3이 오픈(open)되는데 현재 핀3에는 풀-다운 저항이 연결되어 있기 때문에 신호 DEV_IN_DTC는 'LOW'가 된다. In the voltage drop detection circuit 410, the 3.3 V potential VDD33D, which is a system operating voltage, is connected to the anode of the diode 412 through a resistor 413 having a relatively large resistance value, and then, the diode 412. The cathode of is connected to the VBUS line 210. In such a configuration, if no current flows from the system power supply VDD33D to the VBUS line 210, there is no potential difference between pins 2 and 1 of the P-channel FET 411, so that the pins 2 and 3 are open. Since pin 3 has a pull-down resistor connected, the signal DEV_IN_DTC goes 'LOW'.

반대로, 만일 시스템 전원인 VDD33D로부터 VBUS 라인(210)으로 일정 수준 이상의 전류가 흐르게 되면 저항소자(413)에 의해 P-채널 FET(411)의 핀2-핀1 사이에 전위차가 생기게 되어 핀2-핀3이 단락(short)되고 이에 따라 시스템 전압(VDD33D)에 의해 신호 DEV_IN_DTC는 'HIGH'가 된다. 정리하면, 전압강하 검출회로(410)의 실시예는 시스템 전원인 VDD33D로부터 VBUS 라인(210)으로의 전류흐름을 통해 전압강하를 검출하며, 신호 DEV_IN_DTC는 전압강하가 있을 때 'HIGH'가 되고 전압강하가 없을 때 'LOW'가 된다.On the contrary, if a predetermined level or more current flows from the system power supply VDD33D to the VBUS line 210, a potential difference is generated between the pins 2-pin 1 of the P-channel FET 411 by the resistor element 413. Pin 3 is shorted and thus the signal DEV_IN_DTC becomes 'HIGH' by the system voltage VDD33D. In summary, the embodiment of the voltage drop detection circuit 410 detects the voltage drop through the current flow from the system power supply VDD33D to the VBUS line 210, and the signal DEV_IN_DTC becomes 'HIGH' when there is a voltage drop and the voltage It will be 'LOW' when there is no descent.

USB 인터페이스를 통해 버스파워형 디바이스 모드의 장치가 연결되면 VBUS 라인(210)을 통하여 대략 0.13 ㎃ 정도의 전류가 흐르게 되고, P-채널 FET(411) 소자에서는 대략 0.6 V의 전압차가 핀2-핀1에 존재할 때 핀2-핀3이 연결되므로, 핀1과 핀2를 연결하는 저항소자(413)는 대략 4.6 ㏀ 이상이 되어야 한다. 본 실시예에서는 보다 확실한 동작을 보장하기 위해서 15 ㏀의 저항값을 갖는 저항소자를 사용하여 전압강하 검출회로(410)를 구성하였다. When a device in bus-powered device mode is connected via the USB interface, a current of approximately 0.13 Ω flows through the VBUS line 210, and a voltage difference of approximately 0.6 V in the P-channel FET 411 element is pin 2 -pin. Since pin 2 and pin 3 are connected when present at 1, the resistance element 413 connecting pin 1 and pin 2 should be approximately 4.6 kΩ or more. In this embodiment, the voltage drop detection circuit 410 is configured by using a resistance element having a resistance value of 15 mA to ensure more reliable operation.

다만, 이러한 부품값 설정은 본 발명의 구성을 설명하기 위한 일 실시예에 불과한 것으로 이해되어야 한다. 즉, 버스파워형 디바이스 모드의 장치가 VBUS 라인(210)을 통해 끌어들이는 전류의 양은 구체적인 기기에 따라서는 0.13 ㎃보다 많을 수도 있고 혹은 더 적을 수도 있으며, P-채널 FET(411)에서 핀2-핀3이 연결되기 위한 핀2-핀1의 인가전압 또한 사용하는 FET 소자의 구체적인 모델에 따라서 0.6 V보다 높을 수도 있고 혹은 더 낮을 수도 있다. 따라서, 전압강하 검출회로(410)를 구성하는 부품, 특히 저항소자(413)의 값은 실제로 사용되는 각 부품의 구체적 특성에 따라서 탄력적으로 설정된다.However, it is to be understood that such component value setting is merely an embodiment for explaining the configuration of the present invention. That is, the amount of current drawn by the device in bus-powered device mode through the VBUS line 210 may be more or less than 0.13 kA, depending on the specific device, and pin 2 in the P-channel FET 411. -The applied voltage of pin 2-pin 1 to which pin 3 is connected may also be higher or lower than 0.6 V depending on the specific model of the FET device used. Therefore, the value of the components constituting the voltage drop detection circuit 410, in particular the resistance element 413, is elastically set according to the specific characteristics of each component actually used.

또한, 저항소자(414)는 시스템 동작전원(VDD33D)이 그대로 포트에 인가되는 것을 방지하기 위한 일종의 댐핑(damping) 저항으로서 대략 4.7 ㏀이 무난하며, 저항소자(415)는 위 저항소자(414)로 인한 분압효과(voltage dividing)를 상대적으로 제거하여 DEV_IN_DTC 신호가 논리적 HIGH로 설정될 수 있도록 하기 위한 것으로 상대적으로 큰 저항값이 사용되며, 본 실시예에서는 47 ㏀의 저항값을 갖는 저항소자를 사용하였다. 다만, 위 수치는 본 발명의 실시예에 불과하며, 사용하는 소자의 특성에 따라서 적절하게 설정된다.In addition, the resistance element 414 is a kind of damping resistance for preventing the system operating power supply VDD33D from being applied to the port as it is, and the resistance element 415 is a good resistance, and the resistance element 415 is the upper resistance element 414. In order to remove voltage dividing effect due to this, the DEV_IN_DTC signal can be set to logical HIGH. A relatively large resistance value is used. In this embodiment, a resistance element having a resistance of 47 ㏀ is used. It was. However, the above numerical values are only examples of the present invention, and are appropriately set according to the characteristics of the device to be used.

이어서, 도 4b에 도시된 USB 스위칭회로(420)에 대해서 기술한다. USB 스위칭회로(420)는 일종의 아날로그 스위치로서, USB 콘넥터(422)에 대해서 호스트 신호라인(HD+, HD-)를 연결할 것인지 아니면 디바이스 신호라인(UD+, UD-)를 연결할 것인지를 스위칭한다. 즉, 입력포트 IN에 LOW 레벨신호가 인가되면 신호라인 COM 1,2와 신호라인 NC가 연결되어 본 장치는 디바이스 모드로 동작하게 되고, 입력포트 IN에 HIGH 레벨신호가 인가되면 신호라인 COM 1,2와 신호라인 NO가 연결되어 본 장치는 호스트 모드로 동작하게 된다. 도시된 바와 같이 신호라인 COM 1,2는 USB 콘넥터(422)의 데이터 라인(D+/D-)에 연결되고, 스위칭신호 HST_DEV_CTL의 생성에 대해서는 도 4e를 참조하여 설명한다.Next, the USB switching circuit 420 shown in FIG. 4B will be described. The USB switching circuit 420 is an analog switch and switches whether the host signal lines HD + and HD- or the device signal lines UD + and UD- are connected to the USB connector 422. That is, when the LOW level signal is applied to the input port IN, the signal lines COM 1,2 and the signal line NC are connected, and the device operates in the device mode. When the HIGH level signal is applied to the input port IN, the signal lines COM 1, 2 and signal line NO are connected so that the device operates in host mode. As shown, the signal lines COM 1,2 are connected to the data lines D + / D- of the USB connector 422, and the generation of the switching signal HST_DEV_CTL will be described with reference to FIG. 4E.

이어서, 도 4c에 도시된 VBUS 전위 생성회로(430)에 대해서 기술한다. VBUS 전위 생성회로(430)는 내장된 1.5 V 배터리(건전지)로부터 5 V의 VBUS 라인전위를 생성하는데, MAKE5V 칩(431)에서는 입력포트 SHDN에 LOW 레벨신호가 인가되면 출력단자 OUT으로 0 V가 출력되고(디바이스 모드), 입력포트 SHDN에 HIGH 레벨신호가 인가되면 출력단자 OUT으로 5 V가 출력된다(호스트 모드). 신호 5V_PWR_CTL는 본 실시예에서는 CPU(미도시)에서 출력되는 제어신호로서 이러한 구성을 통하여 동작모드에 따라서 VBUS 라인(210)에 5 V를 인가할 것인지 여부를 제어하는 것이 가능하다. 저항(433, 434)는 MAKE5V 칩(431)에 내장된 증폭소자의 피드백 경로에 연결되는데, 그 값은 MAKE5V 칩(431)의 매뉴얼을 따른다.Next, the VBUS potential generating circuit 430 shown in FIG. 4C will be described. The VBUS potential generating circuit 430 generates a 5V VBUS line potential from the built-in 1.5V battery (battery). In the MAKE5V chip 431, when a low level signal is applied to the input port SHDN, 0V is output to the output terminal OUT. When the HIGH level signal is applied to the input port SHDN, 5 V is output to the output terminal OUT (host mode). The signal 5V_PWR_CTL is a control signal output from the CPU (not shown) in this embodiment, and it is possible to control whether 5V is applied to the VBUS line 210 according to the operation mode through this configuration. The resistors 433 and 434 are connected to the feedback path of the amplifier built in the MAKE5V chip 431, the value of which follows the manual of the MAKE5V chip 431.

이어서, 도 4d에 도시된 동작전원 추출회로(440)에 대해서 기술한다. 도시된 동작전원 추출회로(440)는 제어신호 HST_DEV_CTL의 신호레벨에 따라서 선택적으로 VBUS 라인(210)으로부터 시스템 전압(VDD33D)를 추출하는 기능을 수행한다. 시스템 전압(VDD33D)은 디폴트로는 내장된 1.5 V 배터리(건전지)로부터 스텝업 DC/DC 컨버터를 통해 만들어지며(호스트 모드), 필요한 경우에는 VBUS 라인(210)의 5 V 전원으로부터 3.3V_LDO 칩(442)을 통해 생성되는 3.3 V 전원으로 대체된다(디바이스 모드).Next, the operating power extraction circuit 440 shown in FIG. 4D will be described. The illustrated operating power extracting circuit 440 selectively extracts the system voltage VDD33D from the VBUS line 210 according to the signal level of the control signal HST_DEV_CTL. The system voltage (VDD33D) is made by default from a built-in 1.5 V battery (battery) via a step-up DC / DC converter (host mode) and, if necessary, a 3.3V_LDO chip (from the 5 V supply of the VBUS line 210). Replaced with a 3.3 V supply generated through 442 (device mode).

도시된 P-채널 FET(441)에서 이러한 전원스위칭 동작이 이루어지는데, 먼저 신호 HST_DEV_CTL는 호스트 모드에서와 같이 자체 전원으로 VBUS 라인(210)을 공급하여야 하는 경우에는 HIGH 레벨이므로 P-채널 FET(441)의 핀2-핀3이 오픈되어 내장전원이 그대로 사용되며, 버스파워형 디바이스 모드에서와 같이 상대방 호스트 장치가 제공하는 전위에서 동작전원을 추출하여야 하는 경우에는 신호 HST_DEV_CTL이 LOW 레벨이므로 P-채널 FET(441)의 핀2-핀3이 연결되어 VBUS 라인(210)의 5 V 전원으로부터 추출된 전원이 사용된다. 스위칭신호 HST_DEV_CTL에 대해서는 도 4e를 참조하여 후술하고자 한다.This power switching operation is performed in the illustrated P-channel FET 441. First, the signal HST_DEV_CTL is a HIGH level when the VBUS line 210 needs to be supplied to its own power source as in the host mode, so the P-channel FET 441 is used. Pin 2 of pin) is opened and the internal power is used as it is.In case that the operating power must be extracted from the potential provided by the host device as in the bus power device mode, the signal HST_DEV_CTL is LOW level, so the P-channel Pins 2-3 of the FET 441 are connected and a power source extracted from the 5 V power source of the VBUS line 210 is used. The switching signal HST_DEV_CTL will be described later with reference to FIG. 4E.

이어서, 도 4e에 도시된 스위칭신호 생성회로(450)에 대해서 기술한다. 스위칭신호 생성회로(450)는 전술한 바 스위칭신호 HST_DEV_CTL을 생성하는 회로로서, 전술한 바와 같이 스위칭신호 HST_DEV_CTL에 의해 USB 콘넥터(422)에 연결되는 USB 신호라인의 스위칭, 및 시스템 전압(VDD33D)의 소스 스위칭이 이루어진다. 먼저, 4.2V_DETECTION 칩(451)은 입력(VDD)이 4.2 V 이하이면 0 V가 출력되고, 그 이상이면 입력포트 VDD에 인가된 전압이 출력되도록 동작하는데, 현재 입력(VDD) 핀에는 VBUS 라인(210)이 연결되어 있으므로 동작모드에 상관없이 VBUS 라인(210)에 5 V만 입력되면 항상 5 V가 출력하게 된다.Next, the switching signal generation circuit 450 shown in FIG. 4E will be described. The switching signal generation circuit 450 is a circuit for generating the switching signal HST_DEV_CTL as described above. Source switching takes place. First, the 4.2V_DETECTION chip 451 operates to output 0 V when the input VDD is 4.2 V or less, and output a voltage applied to the input port VDD when the input VDD is 4.2 V or less. Since 210 is connected, if only 5 V is input to the VBUS line 210 regardless of the operation mode, 5 V is always output.

다만, 전술한 제어신호 5V_PWR_CTL을 통하여 VBUS 라인(210)의 전원소스를 구분하게 되는데, 전술한 바와 같이 호스트 모드로서 자체전원을 사용하는 경우에는 제어신호 5V_PWR_CTL가 HIGH 레벨로 설정되어 N-채널 FET(452)의 핀2-핀3이 단락되며 이로 인해 N-채널 FET(453)의 핀1에 LOW 레벨이 인가되어 N-채널 FET(453)의 핀2-핀3이 오픈됨으로써 결국은 스위칭신호 HST_DEV_CTL이 'HIGH' 값으로 출력된다. 한편, 버스파워형 디바이스 모드로서 상대방 호스트 장치가 제공하는 전원을 공급받아 사용하는 경우에는 제어신호 5V_PWR_CTL가 LOW 레벨로 설정되고, 이에 따라서 스위칭신호 생성회로(450)가 전술한 바와는 정반대로 동작하여 결국 스위칭신호 HST_DEV_CTL이 'LOW' 값으로 출력된다.However, the power source of the VBUS line 210 is distinguished through the above-described control signal 5V_PWR_CTL. As described above, when the self-power is used as the host mode, the control signal 5V_PWR_CTL is set to the HIGH level so that the N-channel FET ( Pin 2-pin 3 of 452 is shorted, which causes a low level to be applied to pin 1 of the N-channel FET 453, thereby opening pin 2-pin 3 of the N-channel FET 453, thereby eventually switching signal HST_DEV_CTL. This is output as 'HIGH' value. On the other hand, when the bus host type device is supplied with and used with the power provided by the counterpart host device, the control signal 5V_PWR_CTL is set to the LOW level. Accordingly, the switching signal generation circuit 450 operates in the opposite manner to the above. As a result, the switching signal HST_DEV_CTL is output as a 'LOW' value.

도 5는 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면이다. 먼저, 호스트 신호라인(HD+, HD-)을 USB 스위칭 회로(421)를 통해 USB 콘넥터(422)에 연결(ST501)하고, 전압강하 검출회로(410)를 사용하여 VBUS 라인(210)에 특정 임계치 이상의 전압강하가 발생되었는지 여부를 검사(ST502)하는데, 이 때 전압강하가 발생한 것으로 검출된다면 이는 디바이스 기기가 USB 인터페이스를 통해 접속됨으로 인하여 VBUS 라인(210)을 통해 시스템 전류가 흘러나간 것으로 판단할 수 있다. 따라서, 이 경우에는 본 발명의 방법을 채용하는 기기는 호스트 모드로 동작하여야 하며, USB 규격에서 요구하는 바에 따라 VBUS 라인(210)에 +5 V 전위를 인가한다(ST503).5 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention. First, the host signal lines HD + and HD- are connected to the USB connector 422 through the USB switching circuit 421 (ST501), and a specific threshold value is applied to the VBUS line 210 using the voltage drop detection circuit 410. It is checked whether the above voltage drop has occurred (ST502), and if it is detected that a voltage drop has occurred, it can be determined that the system current has flowed through the VBUS line 210 because the device device is connected through the USB interface. have. Therefore, in this case, the device employing the method of the present invention should operate in the host mode, and apply a +5 V potential to the VBUS line 210 as required by the USB standard (ST503).

이어서, 데이터 라인, 즉 D+/D- 라인(220, 230)의 신호레벨을 검사(ST504)하는데, 이는 USB를 통하여 연결된 상대 기기가 정말로 디바이스 기기인지를 확인하는 것으로서 보다 완전한 기기동작을 보장하기 위함이다. 앞서 단계(ST501)에서 호스트 신호라인(HD+, HD-)을 USB 콘넥터(422)에 연결함으로써 데이터 라인을 풀다운시켰으므로, 단계(ST504)에서 데이터 라인이 'HIGH' 레벨이라면 상대방 기기는 진실로 디바이스 기기임이 확인된다.Subsequently, the signal level of the data line, i.e., the D + / D- lines 220 and 230, is checked (ST504). This is to confirm whether the external device connected via USB is really a device device, to ensure more complete device operation. to be. Since the data line is pulled down by connecting the host signal lines HD + and HD- to the USB connector 422 in step ST501, if the data line is 'HIGH' level in step ST504, the other device is truly a device device. Is confirmed.

다만, 본 실시예에서는 단계(ST504)에서 데이터 라인이 'LOW' 레벨로 판단되는 경우에는 VBUS 라인(210)에 인가된 +5 V 전위를 제거(ST508)한 후 일종의 에러상황으로서 바로 종료하도록 동작하나, 다른 실시예로서 VBUS 라인(210)에 인가된 +5 V 전위를 제거(ST508)한 후 단계(ST509)로 진행하여 상대방 기기가 혹시 호스트 기기는 아닌지 확인하는 것도 바람직하다. 이는 설계상 오류로 인하여 호스트 기기임에도 불구하고 USB를 통한 기기접속 시에 VBUS 라인(210)을 통하여 상대방 시스템 전류를 소모하는 기기가 존재할 수도 있으며, 이와 같이 잘못 설계된 기기에 대해서도 상호동작성을 보장하기 위함이다.However, in the present exemplary embodiment, when it is determined that the data line is at the 'LOW' level in step ST504, the terminal immediately terminates as a kind of error after removing the +5 V potential applied to the VBUS line 210 (ST508). As another example, after removing the +5 V potential applied to the VBUS line 210 (ST508), the process proceeds to step ST509 to confirm whether the counterpart device is not a host device. This may be due to a design error, but even though the host device is a device that consumes the other system current through the VBUS line 210 when the device is connected via USB, to ensure interoperability even for such a poorly designed device For sake.

한편, 도 3을 참조하여 전술한 바와 같이, 버스파워형 디바이스 기기의 경우에는 VBUS 라인(210)에 +5 V가 인가된 후에 시스템 부팅을 종료하여 데이터 라인을 HIGH 레벨로 설정할 때까지 상당한 시간(T1)이 소요될 수 있고 더욱이 그 소요되는 시간도 기기에 따라서 일정하지 않아 그 시간을 어떻게 가정하더라도 확실한 동작을 보장할 수 없다는 문제점이 있다. 이에 따라, 단계(ST704)에 의해서 도 5의 실시예에 에러요소가 추가될 수도 있으므로 전술한 단계(ST704)에 관한 사항은 도 5 의 실시예에 있어서 선택적인 것으로 이해되어야 하며, 이는 후술하는 도 6의 실시예에 대해서도 적용된다.On the other hand, as described above with reference to Figure 3, in the case of the bus power device device, after a +5 V is applied to the VBUS line 210, a considerable time until the end of system booting to set the data line to the HIGH level ( T1) may be required, and furthermore, the time required is not constant depending on the device, so there is a problem in that the operation is not guaranteed even if the time is assumed. Accordingly, since an error element may be added to the embodiment of FIG. 5 by step ST704, the above-described matters of step ST704 should be understood as optional in the embodiment of FIG. 5, which will be described later. The same applies to the sixth embodiment.

단계(ST504)에 이어서, 기기 내부의 운영 소프트웨어에 디바이스 기기접속 이벤트를 알리기 위해 호스트 모드 인터럽트를 발생(ST505)시키고, 소정 USB 규격에 따라서 토폴로지 관리나 파일복사 등과 같은 호스트 모드의 기기동작을 수행(ST506)하며, 어느 정도 시간이 경과하면 USB 접속을 통하여 사용자가 수행하려고 의도한 특정의 호스트 모드 동작, 예컨대 파일복사 동작이 종료(ST507)된다. 이로써, USB 호스트 모드의 동작이 완료되며, VBUS 라인(210)에 인가된 +5 V 전위공급을 제거(ST508)한다.Subsequently to step ST504, a host mode interrupt is generated (ST505) to notify the device software connection event to the operating software inside the device, and the device operation in the host mode such as topology management or file copying is performed according to a predetermined USB standard ( After a certain time has elapsed, a specific host mode operation, for example, a file copy operation, which the user intends to perform through the USB connection is terminated (ST507). Thus, the operation of the USB host mode is completed, and the +5 V potential supply applied to the VBUS line 210 is removed (ST508).

한편, 단계(ST502)에서 VBUS 라인상의 전압강하가 이루어지지 않은 경우에는 현재 USB 인터페이스를 통해 호스트 모드의 기기가 접속되었을 수도 있고 아니면 전혀 접속이 이루어지지 않았기 때문일수도 있으므로 이를 구분 판단할 필요가 있다. 이를 위해, VBUS 라인(210)의 전위가 +5 V인지 여부를 검사(ST509)하는데, 만일 VBUS 라인(210)의 전위가 +5 V인 경우에는 이는 USB 인터페이스를 통해 호스트 모드의 기기가 접속되어 호스트 모드의 기기가 VBUS 라인(210) 상에 +5 V 전위를 공급하기 때문이다.On the other hand, when the voltage drop on the VBUS line is not made in step ST502, it may be because the device in the host mode may be connected through the USB interface or the connection may not be made at all. To this end, it is checked whether or not the potential of the VBUS line 210 is +5 V (ST509). If the potential of the VBUS line 210 is +5 V, it is connected to the host mode device through the USB interface. This is because the device in host mode supplies a +5 V potential on the VBUS line 210.

이 경우, VBUS 라인(210)을 통해 공급되는 +5 V 전력으로부터 예컨대 동작전원 추출회로(440)를 사용하여 기기의 동작전원(VDD33D)을 추출함과 동시에 기기의 자체전원은 차단(ST510)하는데 이는 더이상의 전력소모가 없도록 하여 파워세이브를 달성하기 위함이다. 이어서 USB 스위칭 회로(421)를 통하여 디바이스 신호라인(UD+, UD-)이 USB 콘넥터(422)로 스위칭 접속(ST511)되도록 하고, 사용자가 소망하는 대로 특정의 USB 디바이스 모드의 동작, 예컨대 파일복사 동작이 이루어진다(ST512, ST513). 바람직하게는, 디바이스 모드의 동작은 VBUS 라인(210)의 동작전위가 +5 V를 유지하는 동안 계속되며, 그 이후에는 즉시 예컨대 내장 건전지 등의 자체전원으로 절환(ST516)한다.In this case, the operating power VDD33D of the device is extracted from the +5 V power supplied through the VBUS line 210 using the operation power extraction circuit 440, and the self power of the device is cut off (ST510). This is to achieve a power save so that there is no more power consumption. Subsequently, the device signal lines UD + and UD- are connected to the USB connector 422 by a switching connection ST511 through the USB switching circuit 421, and the operation of a specific USB device mode, for example, a file copy operation, as desired by the user. This is done (ST512, ST513). Preferably, the device mode operation is continued while the operating potential of the VBUS line 210 is maintained at +5 V, after which it immediately switches to its own power supply such as an internal battery (ST516).

한편, 단계(ST509)에서 VBUS 라인(210)의 전위가 +5 V가 아닌 경우에는 USB 인터페이스를 통해 호스트 모드의 기기가 접속되지 않은 것으로 판단하는 것이 가능하며, 이 경우 바로 동작을 종료한다. 도 5에 도시된 과정은 타이머 인터럽트 방식이나 폴링 방식으로 수행될 수 있다.On the other hand, when the potential of the VBUS line 210 is not +5 V in step ST509, it is possible to determine that the device of the host mode is not connected via the USB interface, in which case the operation is immediately terminated. The process illustrated in FIG. 5 may be performed by a timer interrupt method or a polling method.

도 6은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면이다. 도 6에 개시된 실시예는 도 5의 실시예와 사실상 동일한 메커니즘으로 동작하며, 다만 동작모드를 검출 및 판단하는 순서만 상이하다. 따라서, 도 5의 실시예와 도 6의 실시예는 소프트웨어 흐름도로서의 표현에만 상이점을 갖는 것이고, 도 4a 내지 도 4e를 참조하여 도시하였던 바, 회로적으로 구현하는 경우에는 사실상 동일한 것으로 판단할 수 있다.6 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention. The embodiment disclosed in FIG. 6 operates in substantially the same mechanism as the embodiment of FIG. 5, except that the order of detecting and determining the operation mode is different. Accordingly, the embodiment of FIG. 5 and the embodiment of FIG. 6 have differences only in the representation as a software flowchart, and as shown in FIGS. 4A to 4E, it can be determined that the circuit implementation is virtually the same. .

즉, 도 6의 실시예에서는 먼저 +5 V 전위공급이 제거된 상태에서 VBUS 라인(210)이 +5 V인지 여부를 검사(ST601)함으로써 USB 인터페이스를 통하여 호스트 모드의 기기가 접속되었는지 여부를 검사하고, 만일 그러하다면("YES" 경우), VBUS 라인(210)에서 전원을 획득하고 USB 콘넥터(422)로 디바이스 신호라인(UD+, UD-)을 접속하는 등의 일련의 디바이스 모드 동작(ST602~ST607)을 수행한다. 한편, 전술한 단계(ST601)에서 VBUS 라인(210)이 +5 V가 아닌 것으로 판단되는 경우에는, 이는 USB 인터페이스를 통하여 디바이스 모드의 기기가 접속되었을 수도 있고 아니면 전혀 USB 접속이 이루어지지 않았을 수도 있으므로, 이를 구분 판단하여야 한다.That is, in the embodiment of FIG. 6, first, whether the VBUS line 210 is +5 V while the +5 V potential supply is removed (ST601) determines whether the device of the host mode is connected through the USB interface. If so (if YES), a series of device mode operations such as acquiring power from the VBUS line 210 and connecting the device signal lines UD + and UD- to the USB connector 422 are performed. ST607). On the other hand, if it is determined in step ST601 that the VBUS line 210 is not +5 V, this may be because the device in the device mode may be connected through the USB interface or the USB connection may not be made at all. This should be judged separately.

이를 위해, 도 5를 참조하여 전술한 바와 같이, 호스트 신호라인(HD+, HD-)을 USB 스위칭 회로(421)를 통해 USB 콘넥터(422)에 연결(ST608)하고, 전압강하 검출회로(410)를 사용하여 VBUS 라인(210)에 특정 임계치 이상의 전압강하가 발생되었는지 여부를 검사(ST609)한다. 만일, 단계(ST609)에서 전압강하가 발생한 것으로 검출된다면 이는 특정 디바이스 기기가 USB 인터페이스를 통해 접속되어 VBUS 라인(210)을 통해 시스템 전류가 흘러나간 것으로 판단할 수 있고, 이에 본 발명의 방법을 채용하는 기기는 호스트 모드로 동작하여야 하므로 USB 규격에서 요구하는 바에 따라 VBUS 라인(210)에 +5 V 전위를 인가한다(ST610). 이와 같이 디바이스 기기가 USB 접속된 경우에는 도 5를 참조하여 전술한 바와 같은 일련의 호스트 모드 동작(ST610~ST615)를 수행한다.To this end, as described above with reference to FIG. 5, the host signal lines HD + and HD- are connected to the USB connector 422 through the USB switching circuit 421 (ST608), and the voltage drop detection circuit 410 is provided. In operation ST609, the VBUS line 210 determines whether a voltage drop exceeding a specific threshold occurs. If it is detected in step ST609 that a voltage drop has occurred, it may be determined that a specific device device is connected through the USB interface and that the system current flows through the VBUS line 210, and thus employs the method of the present invention. Since the device must operate in the host mode, a +5 V potential is applied to the VBUS line 210 as required by the USB standard (ST610). When the device device is connected to the USB as described above, the host mode operations ST610 to ST615 as described above with reference to FIG. 5 are performed.

한편, 단계(ST601)에서 VBUS 라인(210)이 +5 V가 아닌 것으로 검출되고, 단계(ST609)에서 VBUS 라인(210)에 전압강하도 발생하지 않은 것으로 검출된 경우에는 USB 인터페이스를 통해 어떠한 기기도 접속되지 않은 것으로 판단하는 것이 가능하며, 이 경우 바로 동작을 종료한다. 또한, 도 6에 도시된 과정은 타이머 인터럽트 방식이나 폴링 방식으로 수행될 수 있다. On the other hand, if it is detected in step ST601 that the VBUS line 210 is not + 5V, and in step ST609 it is detected that no voltage drop occurs in the VBUS line 210, any device via the USB interface. It is also possible to determine that no connection is made, in which case the operation ends immediately. In addition, the process illustrated in FIG. 6 may be performed by a timer interrupt method or a polling method.

도 7은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면이다. 도 7의 실시예는 도 3의 실시예와 도 5의 실시예를 결합한 것으로서, 도 5의 실시예와 비교하면 단계(ST702)에서 VBUS 라인(210)에 전압강하가 검출되지 않은 경우("NO" 경우)에 도 7의 실시예에서는 데이터 라인(220, 230)의 상태를 검사(ST705)하기 이전에 특정의 시간(T2) 동안 VBUS 라인(210)에 +5 V가 인가된 상태로 유지(ST704)하는 점에 특징이 있으며, 도 7의 실시예에서 단계(ST704)의 동작은 도 3의 실시예에서 단계(ST301)에서의 전원인가 상태를 특정 시간(T1) 동안 유지하는 동작에 대응된다.7 is a diagram illustrating an automatic switching method of the USB operation mode according to another embodiment of the present invention. The embodiment of FIG. 7 combines the embodiment of FIG. 3 with the embodiment of FIG. 5, and when no voltage drop is detected on the VBUS line 210 in step ST702 ("NO"). In the embodiment of FIG. 7, +5 V is applied to the VBUS line 210 for a specific time T2 before checking the state of the data lines 220 and 230 (ST705). ST704), the operation of step ST704 in the embodiment of FIG. 7 corresponds to the operation of maintaining the power-on state for the specific time T1 in step ST301 in the embodiment of FIG. .

다만, 도 3의 실시예에서는 특정 시간(T1)을 버스파워형 디바이스 기기가 시스템 부팅을 하기에 충분한 정도로 설정하여야 하므로 T1 값을 상당히 긴 시간으로 설정하여야 하는 문제가 있다. 반면, 도 7의 실시예에서는 버스파워형 디바이스 기기는 단계(ST703)에서 먼저 검출하므로 단계(ST704) 이후에서는 셀프파워형 디바이스 기기와 호스트 기기만 검출하면 된다. 따라서, 도 7의 실시예에서는 셀프파워형 디바이스 기기에서 혹시라도 있을 수 있는 시간지연만 대기하면 되므로 특정 시간(T2)를 상당히 짧게 설정하여도 무방하다. 즉, 셀프파워형 디바이스 기기 중에는 데이터 라인(220, 230)을 자신의 시스템 전압에 항상 풀-업시키는 장치와 VBUS 라인(210)을 검사하여 +5 V 전위가 확인되는 경우에만 데이터 라인(220, 230)을 풀-업시키는 장치가 혼재하므로, 셀프파워형 기기에 일반적으로 대응하기 위해서는 특정 시간(T2) 만큼 대기할 것이 요구되나 그 대기시간은 대단히 짧게 설정하더라도 무방하다.However, in the embodiment of FIG. 3, since the specific time T1 should be set to a sufficient amount for the bus power device device to boot the system, the T1 value needs to be set to a considerably long time. On the other hand, in the embodiment of FIG. 7, the bus power device device detects first at step ST703, so only the self-powered device device and the host device need to be detected after step ST704. Therefore, in the embodiment of FIG. 7, the self-powered device may only wait for a time delay that may be present. Therefore, the specific time T2 may be set considerably shorter. That is, in the self-powered device device, the device which always pulls up the data lines 220 and 230 to its system voltage and the VBUS line 210 are examined to check the +5 V potential only. Since the apparatus for pulling up 230 is mixed, it is required to wait for a specific time T2 to generally cope with the self-powered device, but the waiting time may be set very short.

한편, 도 7의 실시예에서 다른 부분은 앞서 도 5를 참조하여 전술하였던 내용과 대동소이하므로 반복하여 기술하지 않는다. 도 5의 실시예에서는 전류소모가 상대적으로 적은 셀프파워형 디바이스 기기의 검출이 다소 어렵다는 우려가 있으나, 도 7의 실시예에서는 단계(ST702)에서 디바이스 기기를 검출한 후에, 다시 단계(ST705)에서 셀프파워형 디바이스 기기만 특정하여 검출함으로써 전술한 바와 같은 우려가 전혀 없다는 장점이 있다. 응답속도에 있어서도, 도 7의 실시예는 도 3의 실시예와 비교하여 대기시간(T2)를 대기시간(T1)보다 상당히 짧게 설정할 수 있으므로 그 응답속도가 월등하며, 도 5의 실시예와 비교하여 대기시간(T2) 만큼의 지연은 있으나 그 정도가 심하지 않다.Meanwhile, in the embodiment of FIG. 7, other parts are similar to those described above with reference to FIG. 5, and thus will not be repeatedly described. In the embodiment of FIG. 5, there is a concern that detection of a self-powered device device having a relatively low current consumption may be somewhat difficult. However, in the embodiment of FIG. 7, the device device is detected in step ST702, and then again in step ST705. There is an advantage that there is no concern as described above by specifying and detecting only the self-powered device device. Also in the response speed, since the waiting time T2 can be set considerably shorter than the waiting time T1 in comparison with the embodiment of FIG. 3, the response speed is superior, and compared with the embodiment of FIG. 5. Therefore, there is a delay as much as the waiting time T2, but the degree is not severe.

도 8은 본 발명의 다른 실시예에 따른 USB 동작모드의 자동스위칭 방법을 도시하는 도면이다. 도 8의 실시예는 도 3의 실시예와 도 6의 실시예를 결합한 것으로서, 도 6의 실시예와 비교하면 단계(ST809)에서 VBUS 라인(210)에 전압강하가 검출되지 않은 경우("NO" 경우)에 도 8의 실시예에서는 데이터 라인(220, 230)의 상태를 검사(ST812)하기 이전에 특정의 시간(T2) 동안 VBUS 라인(210)에 +5 V가 인가된 상태로 유지(ST811)하는 점에 특징이 있다. 도 8의 실시예에서 단계(ST811)의 동작은 도 7의 실시예에서 단계(ST704)의 동작에 대응하고, 따라서 도 8에서도 특정 시간(T2)의 값을 상당히 짧게 설정하여도 무방하며, 이로써 도 3의 실시예보다 훨씬 빠른 응답속도를 제공할 수 있다.8 is a diagram illustrating an automatic switching method of a USB operation mode according to another embodiment of the present invention. 8 is a combination of the embodiment of FIG. 3 and the embodiment of FIG. 6, and when no voltage drop is detected on the VBUS line 210 in step ST809 compared to the embodiment of FIG. 6 (“NO In the embodiment of FIG. 8, +5 V is applied to the VBUS line 210 for a specific time T2 before checking the state of the data lines 220 and 230 (ST812). ST811). The operation of step ST811 in the embodiment of FIG. 8 corresponds to the operation of step ST704 in the embodiment of FIG. 7, so that the value of the specific time T2 may also be set considerably shorter in FIG. It can provide a much faster response speed than the embodiment of FIG.

한편, 도 5 및 도 6을 참조하여 전술한 바와 같이, 도 7의 실시예와 도 8의 실시예는 사실상 동일한 메커니즘으로 동작하는 것으로서 단지 소프트웨어 흐름도로서의 표현에만 상이점을 갖는 것에 불과하다. 따라서, 도 4a 내지 도 4e를 참조하여 도시하였던 바, 회로적으로 구현하는 경우에는 사실상 동일한 것으로 판단할 수 있다.On the other hand, as described above with reference to FIGS. 5 and 6, the embodiment of FIG. 7 and the embodiment of FIG. 8 operate with substantially the same mechanism, which merely differs in representation only as a software flow chart. Therefore, as illustrated with reference to FIGS. 4A to 4E, it may be determined that the circuit implementation is substantially the same.

본 발명의 실시예들은 다양한 컴퓨터로 구현되는 동작을 수행하기 위한 프로그램 명령을 포함하는 컴퓨터로 판독가능한 정보기록매체를 포함할 수 있다. 위 컴퓨터로 판독가능한 정보기록매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 정보기록매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 혹은 컴퓨터 소프트웨어 당업자에게 공지되어 사용가능한 것일 수도 있다. 컴퓨터로 판독가능한 정보기록매체의 예에는 하드디스크, 플로피디스크, CD-ROM, DVD-ROM, 및 플래시메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 정보기록매체는 프로그램 명령, 데이터 구조 등을 지정하는 신호를 전송하는 반송파를 포함하는 광 또는 금속선, 도파관 등의 전송매체일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어 지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용하여 컴퓨터에 의해서 실행될 수 있는 고급언어 코드를 포함한다.Embodiments of the present invention may include a computer readable information recording medium including program instructions for performing various computer-implemented operations. The computer-readable information recording medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the information recording medium may be those specially designed and constructed for the present invention, or may be known and available to those skilled in computer software. Examples of computer-readable information recording media include hardware devices specifically configured to store and execute program instructions, such as hard disks, floppy disks, CD-ROMs, DVD-ROMs, and flash memories. The information recording medium may be a transmission medium such as an optical or metal wire, a waveguide, or the like including a carrier wave for transmitting a signal specifying a program command, a data structure, or the like. Examples of program instructions include machine code, such as produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter.

또한, 본 발명의 USB 동작모드의 자동스위칭 방법을 채용하면 USB 장치에 단일의 USB 포트, 예컨대 디바이스용 리셉터클(130)을 마련하고서도 그 동작모드로서 호스트 모드와 디바이스 모드를 모두 지원가능하다. 즉, USB 장치를 컴퓨터 시스템과 접속시켜 USB 디바이스 장치(260)로서 동작시키는 것도 가능하고, USB 장치를 다른 USB 디바이스 장치와 접속시켜 USB 호스트 장치(250)로서 동작시키는 것도 가능하다. 다만, USB 장치를 호스트 장치(250)로서 동작시키기 위해서는 USB 케이블 말단의 호스트용 플러그(120)와 접속되어야 하는 바, 이를 위해 USB 포트의 기구적 구성을 특수하게 할 수도 있으나, 단순히 소위 젠더(gender)를 제공하여 해결할 수도 있다.In addition, by adopting the automatic switching method of the USB operation mode of the present invention, even if a single USB port, for example, a device receptacle 130 is provided in the USB device, both the host mode and the device mode can be supported as the operation mode. That is, the USB device can be connected to a computer system to operate as the USB device device 260, or the USB device can be connected to other USB device devices to operate as the USB host device 250. However, in order to operate the USB device as the host device 250, it must be connected with the host plug 120 at the end of the USB cable. For this purpose, the mechanical configuration of the USB port may be special, but is simply a so-called gender. Can be solved by

본 발명의 USB 동작모드의 자동스위칭 방법에 따르면 단일형식의 USB 포트를 사용하여 호스트 장치와 디바이스 장치를 선택적으로 모두 접속하여 사용할 수 있으며, 이를 통하여 휴대용 USB 장치를 보다 소형, 저가격으로 설계할 수 있다는 장점이 있다.According to the automatic switching method of the USB operation mode of the present invention, the host device and the device device can be selectively connected and used by using a single type of USB port, and thus, a portable USB device can be designed more compactly and at a lower cost. There is an advantage.

Claims (8)

USB의 VBUS 라인에 특정 고전위를 인가하여 특정 시간(T1) 동안 상기 인가상태를 유지하고;Applying a specific high potential to the VBUS line of USB to maintain the applied state for a specific time T1; USB의 데이터 라인을 검사하여 HIGH 레벨이면, USB 인터페이스와 호스트 신호라인을 접속시키고, 호스트 모드 인터럽트를 발생시키고, USB 호스트로 모드 설정하며;Examine the USB data line and, if it is at the HIGH level, connect the USB interface to the host signal line, generate a host mode interrupt, and set the mode to the USB host; 상기 VBUS 라인에 인가된 특정 고전위를 제거한 후 상기 VBUS 라인을 검사하여 특정 고전위가 유지되면, 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고, USB 인터페이스와 디바이스 신호라인을 접속시키고, USB 디바이스로 모드 설정하는 것을 특징으로 하는 USB 동작모드의 자동스위칭 방법.After removing the specific high potential applied to the VBUS line and inspecting the VBUS line to maintain the specific high potential, the device operating power is set to the power provided through the VBUS line, and the USB interface and the device signal line are connected. , USB device mode setting mode , characterized in that the USB device. USB의 VBUS 라인을 검사하여 상기 VBUS 라인 상의 전류흐름으로 인한 특정 임계치 이상의 전압강하가 발생한 것으로 검출되면, USB 인터페이스와 호스트 신호라인을 접속시키고, 상기 VBUS 라인에 특정 고전위를 인가하고, 호스트 모드 인터럽트를 발생시키고, USB 호스트로 모드 설정하며;If the USB VBUS line is examined and detected that a voltage drop above a certain threshold has occurred due to the current flow on the VBUS line, the USB interface and host signal line are connected , a specific high potential is applied to the VBUS line, and a host mode interrupt Generates a mode, sets the mode to the USB host; 상기 VBUS 라인에 대해서 특정 고전위를 인가하지 않은 상태에서 상기 VBUS 라인을 검사하여 상기 특정 고전위인 경우에는, 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고, USB 인터페이스와 디바이스 신호라인을 접속시키고, USB 디바이스로 모드 설정하는 것을 특징으로 하는 USB 동작모드의 자동스위칭 방법.The VBUS line is inspected without a specific high potential applied to the VBUS line, and in the case of the specific high potential, the device operating power is set using the power provided through the VBUS line, and the USB interface and the device signal line are set. The automatic switching method of the USB operation mode characterized by connecting and setting a mode to a USB device. USB의 VBUS 라인을 검사하여 상기 VBUS 라인 상의 전류흐름으로 인한 특정 임계치 이상의 전압강하가 발생한 것으로 검출되거나 또는 상기 VBUS 라인에 대한 특정 고전위 인가상태를 특정 시간(T2) 동안 유지한 후 USB의 데이터 라인을 검사하여 HIGH 레벨이면, USB 인터페이스와 호스트 신호라인을 접속시키고, 상기 VBUS 라인에 특정 고전위를 인가하고, 호스트 모드 인터럽트를 발생시키고, USB 호스트로 모드 설정하며;Examine the VBUS line of the USB and detect that a voltage drop above a certain threshold has occurred due to the current flow on the VBUS line, or maintain the specific high potential applied state for the VBUS line for a specific time T2 and then Check and check if the HIGH level, connect the USB interface and the host signal line , apply a specific high potential to the VBUS line, generate a host mode interrupt, and set the mode to the USB host; 상기 VBUS 라인에 대해서 특정 고전위를 인가하지 않은 상태에서 상기 VBUS 라인을 검사하여 상기 특정 고전위인 경우에는, 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고, USB 인터페이스와 디바이스 신호라인을 접속시키고, USB 디바이스로 모드 설정하는 것을 특징으로 하는 USB 동작모드의 자동스위칭 방법.The VBUS line is inspected without a specific high potential applied to the VBUS line, and in the case of the specific high potential, the device operating power is set using the power provided through the VBUS line, and the USB interface and the device signal line are set. The automatic switching method of the USB operation mode characterized by connecting and setting a mode to a USB device. 제1항 내지 제3항 중 어느 하나의 항에 있어서, 상기 USB 디바이스 모드의 동작을 수행하는 경우에, 상기 VBUS 라인이 특정 고전위가 유지되는지 여부를 지속 적으로 검사하여, 상기 특정 고전위로 유지되는 경우에는 상기 USB 디바이스 모드의 동작을 유지하며, 상기 특정 고전위로 유지되지 않는 경우에는 자체전력으로 기기 동작전원을 설정하고 상기 USB 디바이스 모드의 동작을 중단하는 것을 특징으로 하는 USB 동작모드의 자동스위칭 방법.The method according to any one of claims 1 to 3, wherein when performing the operation of the USB device mode, the VBUS line continuously checks whether a specific high potential is maintained and maintains the specific high potential. If the operation of the USB device mode is maintained, and if the particular high potential does not maintain the automatic operation of the USB operation mode, characterized in that to set the device operating power to its own power and stop the operation of the USB device mode Way. 제1항 내지 제3항 중 어느 하나의 항에 따른 USB 동작모드의 자동스위칭 방법을 구현하는 프로그램을 기록한 컴퓨터로 판독가능한 정보기록매체.A computer-readable information recording medium having recorded thereon a program for implementing the automatic switching method of the USB operation mode according to any one of claims 1 to 3. USB 접속이 가능하고 USB 호스트 모드의 기기동작과 USB 디바이스 모드의 기기동작이 가능한 USB 장치로서,As a USB device that can be connected to USB, device operation in USB host mode and device operation in USB device mode are possible. (1) 상기 USB 접속을 제공하는 USB 콘넥터;(1) a USB connector providing the USB connection; (2) 호스트 신호라인과 디바이스 신호라인을 선택적으로 상기 USB 콘넥터로 스위칭 접속하는 버스 스위치;(2) a bus switch for selectively switching a host signal line and a device signal line to the USB connector; (3) 상기 USB 장치의 동작전원을 설정하기 위한 전원설정부; 및(3) a power setting unit for setting an operating power of the USB device; And (4) 상기 버스 스위치와 상기 전원설정부를 제어하고 상기 USB 장치의 기기동작을 제어하는 USB 콘트롤러로서, 상기 USB 콘넥터의 VBUS 라인에 상기 전원설정부로부터 특정 고전위를 인가하여 특정 시간(T1) 동안 상기 인가상태를 유지하고, ① 상기 USB 콘넥터의 데이터 라인이 HIGH 레벨이면, 상기 버스 스위치를 제어하여 상기 USB 콘넥터와 상기 호스트 신호라인이 접속되도록 하고 상기 USB 호스트 모드의 기기동작을 수행하며, ② 상기 USB 콘넥터의 VBUS 라인에 인가된 특정 고전위를 제거한 후 상기 VBUS 라인을 검사하여 특정 고전위가 유지되면, 상기 전원설정부를 제어하여 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고 상기 버스 스위치를 제어하여 상기 USB 콘넥터와 상기 디바이스 신호라인이 접속되도록 하고 상기 USB 디바이스 모드의 기기동작을 수행하는 USB 콘트롤러를 포함하여 구성되는 것을 특징으로 하는 USB 장치.(4) A USB controller that controls the bus switch and the power setting unit and controls the device operation of the USB device, by applying a specific high potential from the power setting unit to the VBUS line of the USB connector for a specific time (T1). Maintain the applied state, and ① if the data line of the USB connector is HIGH level, controlling the bus switch to connect the USB connector and the host signal line and perform the device operation of the USB host mode, ② the After removing the specific high potential applied to the VBUS line of the USB connector and inspecting the VBUS line to maintain a specific high potential, the power setting unit is controlled to set the device operating power with the power provided through the VBUS line and the bus. Switch to control the USB connector and the device signal line connected to the USB device mode USB device characterized in that comprises a USB controller to perform a device operation. USB 접속이 가능하고 USB 호스트 모드의 기기동작과 USB 디바이스 모드의 기기동작이 가능한 USB 장치로서,As a USB device that can be connected to USB, device operation in USB host mode and device operation in USB device mode are possible. (1) 상기 USB 접속을 제공하는 USB 콘넥터;(1) a USB connector providing the USB connection; (2) 상기 USB 콘넥터의 VBUS 라인을 통한 전류흐름으로 인하여 특정 임계치 이상의 전압강하 발생 여부를 검출하기 위한 전압강하 센싱회로;(2) a voltage drop sensing circuit for detecting whether voltage drop above a specific threshold occurs due to a current flow through the VBUS line of the USB connector; (3) 호스트 신호라인과 디바이스 신호라인을 선택적으로 상기 USB 콘넥터로 스위칭 접속하는 버스 스위치;(3) a bus switch for selectively switching a host signal line and a device signal line to the USB connector; (4) 상기 USB 장치의 동작전원을 설정하기 위한 전원설정부; 및(4) a power setting unit for setting an operating power of the USB device; And (5) 상기 전압강하 센싱회로와 상기 버스 스위치와 상기 전원설정부를 제어하고 상기 USB 장치의 기기동작을 제어하는 USB 콘트롤러로서, ① 상기 전압강하 센싱회로에 의해 전압강하가 검출되면, 상기 버스 스위치를 제어하여 상기 USB 콘 넥터와 상기 호스트 신호라인이 접속되도록 하고 상기 USB 호스트 모드의 기기동작을 수행하며, ② 상기 USB 콘넥터의 상기 VBUS 라인에 특정 고전위가 인가되지 않은 상태에서 상기 VBUS 라인을 검사하여 특정 고전위인 경우에는, 상기 전원설정부를 제어하여 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고 상기 버스 스위치를 제어하여 상기 USB 콘넥터와 상기 디바이스 신호라인이 접속되도록 하고 상기 USB 디바이스 모드의 기기동작을 수행하는 USB 콘트롤러를 포함하여 구성되는 것을 특징으로 하는 USB 장치.(5) A USB controller for controlling the voltage drop sensing circuit, the bus switch, and the power setting unit and controlling the operation of the USB device, wherein when the voltage drop is detected by the voltage drop sensing circuit, the bus switch is turned off. Control the USB connector and the host signal line to be connected and perform the device operation of the USB host mode, and ② check the VBUS line without a specific high potential applied to the VBUS line of the USB connector. In the case of a specific high potential, the power setting unit is controlled to set a device operating power with power provided through the VBUS line, and to control the bus switch so that the USB connector and the device signal line are connected to each other. Characterized in that it comprises a USB controller for performing the device operation USB device. USB 접속이 가능하고 USB 호스트 모드의 기기동작과 USB 디바이스 모드의 기기동작이 가능한 USB 장치로서,As a USB device that can be connected to USB, device operation in USB host mode and device operation in USB device mode are possible. (1) 상기 USB 접속을 제공하는 USB 콘넥터;(1) a USB connector providing the USB connection; (2) 상기 USB 콘넥터의 VBUS 라인을 통한 전류흐름으로 인하여 특정 임계치 이상의 전압강하 발생 여부를 검출하기 위한 전압강하 센싱회로;(2) a voltage drop sensing circuit for detecting whether voltage drop above a specific threshold occurs due to a current flow through the VBUS line of the USB connector; (3) 호스트 신호라인과 디바이스 신호라인을 선택적으로 상기 USB 콘넥터로 스위칭 접속하는 버스 스위치;(3) a bus switch for selectively switching a host signal line and a device signal line to the USB connector; (4) 상기 USB 장치의 동작전원을 설정하기 위한 전원설정부; 및(4) a power setting unit for setting an operating power of the USB device; And (5) 상기 전압강하 센싱회로와 상기 버스 스위치와 상기 전원설정부를 제어하고 상기 USB 장치의 기기동작을 제어하는 USB 콘트롤러로서, ① 상기 전압강하 센싱회로에 의해 전압강하가 검출되거나 또는 상기 VBUS 라인에 대한 특정 고전위 인가상태를 특정 시간(T2) 동안 유지한 후 상기 USB 콘넥터의 데이터 라인을 검사하여 HIGH 레벨이면, 상기 버스 스위치를 제어하여 상기 USB 콘넥터와 상기 호스트 신호라인이 접속되도록 하고 상기 USB 호스트 모드의 기기동작을 수행하며, ② 상기 USB 콘넥터의 상기 VBUS 라인에 특정 고전위가 인가되지 않은 상태에서 상기 VBUS 라인을 검사하여 특정 고전위인 경우에는, 상기 전원설정부를 제어하여 상기 VBUS 라인을 통해 제공되는 전력으로 기기 동작전원을 설정하고 상기 버스 스위치를 제어하여 상기 USB 콘넥터와 상기 디바이스 신호라인이 접속되도록 하고 상기 USB 디바이스 모드의 기기동작을 수행하는 USB 콘트롤러를 포함하여 구성되는 것을 특징으로 하는 USB 장치.(5) A USB controller for controlling the voltage drop sensing circuit, the bus switch, the power setting unit, and controlling the operation of the USB device, wherein: (1) A voltage drop is detected by the voltage drop sensing circuit or is applied to the VBUS line. After maintaining a specific high potential applied state for a specific time (T2) and checking the data line of the USB connector, if the HIGH level, the bus switch is controlled to connect the USB connector and the host signal line and the USB host Perform a device operation in a mode; and (2) inspect the VBUS line in a state where a specific high potential is not applied to the VBUS line of the USB connector, and control the power setting unit to provide the VBUS line through the VBUS line. Set the operating power of the device to the power supplied and control the bus switch to the USB connector and the So that the vise signal line is connected to the USB device characterized in that comprises a USB controller to perform a device operation of the USB device mode.
KR1020040004744A 2004-01-26 2004-01-26 Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same KR100659515B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040004744A KR100659515B1 (en) 2004-01-26 2004-01-26 Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040004744A KR100659515B1 (en) 2004-01-26 2004-01-26 Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same

Publications (2)

Publication Number Publication Date
KR20050077106A KR20050077106A (en) 2005-08-01
KR100659515B1 true KR100659515B1 (en) 2006-12-20

Family

ID=37264687

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040004744A KR100659515B1 (en) 2004-01-26 2004-01-26 Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same

Country Status (1)

Country Link
KR (1) KR100659515B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170056002A (en) * 2014-09-15 2017-05-22 마이크로 모우션, 인코포레이티드 A method and apparatus to control a mode of a device
CN107636614A (en) * 2015-06-26 2018-01-26 英特尔公司 Selected in the port of computing device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100711006B1 (en) * 2005-03-18 2007-04-24 (주)엠씨에스로직 Apparatus for Controlling VBUS Power in USB Device
KR100851297B1 (en) * 2005-11-29 2008-08-08 엠텍비젼 주식회사 Universal Serial Bus Cable Apparatus
US7480753B2 (en) * 2006-04-27 2009-01-20 Standard Microsystems Corporation Switching upstream and downstream logic between ports in a universal serial bus hub
KR100755971B1 (en) 2006-05-30 2007-09-06 삼성전자주식회사 Usb device having single port capable of operating in the manner of dual interface
CN109787317B (en) * 2019-02-22 2023-08-29 共青城市超能电子科技有限公司 Battery on air-conditioning suit and power supply line thereof
CN110059046B (en) * 2019-04-24 2020-12-04 苏州浪潮智能科技有限公司 Method, system and readable medium for switching transmission path of data signal
CN110515867A (en) * 2019-09-09 2019-11-29 中山市天启智能科技有限公司 A kind of cluster core board USB mode automatic switching method and route

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10301899A (en) * 1997-04-23 1998-11-13 Casio Comput Co Ltd Electronic equipment and interface circuit
JP2002116853A (en) * 2000-10-05 2002-04-19 Tdk Corp Usb mounted electronic equipment and use cable to be used therefor
JP2002163051A (en) * 2000-11-29 2002-06-07 Toshiba Corp Electronic apparatus, usb connector structure, and usb device connecting cable
JP2003263253A (en) * 2002-03-07 2003-09-19 Fuji Xerox Co Ltd Usb device
KR20050006484A (en) * 2003-07-09 2005-01-17 (주) 밸류인 Compatible usb connector and method for communicating data using it
KR20050058027A (en) * 2003-12-11 2005-06-16 엘지전자 주식회사 Connector device connecting between usb port and receptacle in mobile phone

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10301899A (en) * 1997-04-23 1998-11-13 Casio Comput Co Ltd Electronic equipment and interface circuit
JP2002116853A (en) * 2000-10-05 2002-04-19 Tdk Corp Usb mounted electronic equipment and use cable to be used therefor
JP2002163051A (en) * 2000-11-29 2002-06-07 Toshiba Corp Electronic apparatus, usb connector structure, and usb device connecting cable
JP2003263253A (en) * 2002-03-07 2003-09-19 Fuji Xerox Co Ltd Usb device
KR20050006484A (en) * 2003-07-09 2005-01-17 (주) 밸류인 Compatible usb connector and method for communicating data using it
KR20050058027A (en) * 2003-12-11 2005-06-16 엘지전자 주식회사 Connector device connecting between usb port and receptacle in mobile phone

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170056002A (en) * 2014-09-15 2017-05-22 마이크로 모우션, 인코포레이티드 A method and apparatus to control a mode of a device
CN107636614A (en) * 2015-06-26 2018-01-26 英特尔公司 Selected in the port of computing device

Also Published As

Publication number Publication date
KR20050077106A (en) 2005-08-01

Similar Documents

Publication Publication Date Title
KR100905795B1 (en) Mobile device of supporting uart and usb communication using same connector and operating method there-of
US20190220075A1 (en) Universal serial bus power-delivery and system including the same
JP4115494B2 (en) Automatic voltage detection when multiple voltages are applied
JP6813392B2 (en) Configurable and power-optimized integrated gate driver for USB power supply and Type-C SoC
US7498801B2 (en) Apparatus, method, and computer program product for monitoring and controlling a microcomputer using a single existing pin
US8200852B2 (en) Multi-mode dongle for peripheral devices and associated methods
CN107465060A (en) USB Type-C switching module and starting method thereof
CN102662898A (en) Host-slave compatibility method, device and system for USB (universal serial bus) device
JP6714469B2 (en) Electronic device and control method thereof
KR100273619B1 (en) Operation mode transfer system and method
CN1402850A (en) Method and apparatus for detecting type of interface to which peripheral device is connected
JP5789759B2 (en) Information processing apparatus, nonvolatile storage device, information processing system, and nonvolatile memory controller
KR100659515B1 (en) Automatic Switching Method of USB Operation Mode, and Single-Type USB Port Device Using The Same
JPWO2004095250A1 (en) USB upstream device, USB connector, and USB cable
US7870408B2 (en) Universal serial bus wakeup circuit
JP2006268306A (en) Semiconductor device and connection processing method therefor
US7359995B2 (en) Peripheral device connection current compensation circuit
CN110908673B (en) Digital power supply chip burning method
CN116539992A (en) Storage device in-place stable state detection device, method, logic module and medium
JP2001222359A (en) Interface identification device
US20140365806A1 (en) Peripheral apparatus and control method thereof
KR100711006B1 (en) Apparatus for Controlling VBUS Power in USB Device
CN214474977U (en) Solid state hard drives switching card and computer equipment
CN109344016B (en) USB device capable of switching between host and device modes and switching method
JP2023040804A (en) Port controller and electronic apparatus

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121108

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20131108

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20141205

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20151102

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20161108

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20171121

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20181108

Year of fee payment: 13

FPAY Annual fee payment

Payment date: 20191120

Year of fee payment: 14