TW201351150A - Portable device and peripheral extension dock - Google Patents

Portable device and peripheral extension dock Download PDF

Info

Publication number
TW201351150A
TW201351150A TW101125109A TW101125109A TW201351150A TW 201351150 A TW201351150 A TW 201351150A TW 101125109 A TW101125109 A TW 101125109A TW 101125109 A TW101125109 A TW 101125109A TW 201351150 A TW201351150 A TW 201351150A
Authority
TW
Taiwan
Prior art keywords
pin
peripheral
electronic device
wire
processor
Prior art date
Application number
TW101125109A
Other languages
Chinese (zh)
Other versions
TWI475390B (en
Inventor
Ching-Chung Hung
Yu-Peng Lai
Wei-Chih Chang
Original Assignee
Htc Corp
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 Htc Corp filed Critical Htc Corp
Publication of TW201351150A publication Critical patent/TW201351150A/en
Application granted granted Critical
Publication of TWI475390B publication Critical patent/TWI475390B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1632External expansion units, e.g. docking stations
    • 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/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

An embodiment of the invention provides an electronic device comprising a body, a connector, a processor and a switching device. The processor coupled to the connector comprises a detection pin and a 1-wire pin. The switching device is coupled between the processor and the connector to connect one pin of the connector to the detection pin or the 1-wire pin. When a peripheral device connects to the connector, the processor control the switching device to connect the connector to the detection pin and the processor determines whether the peripheral device is a 1-wire device. When the peripheral device is determined as the 1-wire device, the processor controls the switching device to connect the connector to the 1-wire pin and executes a 1-wire communication with the peripheral device.

Description

手持式電子裝置與週邊擴充裝置 Handheld electronic device and peripheral expansion device

本發明為一種電子裝置與週邊裝置的通信方法,特別是一種電子裝置與單線週邊裝置的通信方法。 The invention relates to a communication method between an electronic device and a peripheral device, in particular to a communication method between the electronic device and the single-line peripheral device.

手持式電子裝置,如智慧型手機、平板電腦或是個人數位助理,已經成為消費者個人或公務使用上的必需品。為增加手持式電子裝置的實用性,需要透過不同的週邊裝置來來增加手持式電子裝置的功能。再者,為減少手持式電子裝置的連接埠種類以及降低匯流排介面的複雜度,單線(1-wire)匯流排因此被採用。單線(1-wire)匯流排是一種最簡單的匯流排形式。它透過單一傳輸線完成全部的控制與通信,不僅節省輸入輸出埠,也簡化了系統設計而降低硬體成本。但是手持式電子裝置沒有連接單線週邊裝置,手持式電子裝置仍會不斷的去輪詢(polling)單線匯流排,這會對手持式電子裝置有限的電力造成影響,手持式電子裝置的使用時間也因此降低。 Handheld electronic devices, such as smart phones, tablets or personal digital assistants, have become a necessity for consumer personal or official use. In order to increase the utility of the handheld electronic device, it is necessary to increase the functionality of the handheld electronic device through different peripheral devices. Furthermore, in order to reduce the type of connection of the handheld electronic device and to reduce the complexity of the bus interface, a 1-wire bus is thus employed. A 1-wire bus is one of the simplest forms of bus. It performs all control and communication through a single transmission line, which not only saves input and output, but also simplifies system design and reduces hardware cost. However, the handheld electronic device is not connected to the single-wire peripheral device, and the handheld electronic device will continue to poll the single-wire busbar, which affects the limited power of the handheld electronic device, and the use time of the handheld electronic device is therefore reduce.

本發明的一實施例提供一種電子裝置,包括一機體、一連接埠、一處理器以及一切換裝置。連接埠,裝置於該機體上且可被一週邊裝置插入,以允許該週邊裝置電性連接至該電子裝置。處理器,電性連接至該連接埠,包括一偵測接腳與一單線通信接腳。切換裝置,耦接該處理器與該連接埠之間,選擇性地將上述連接埠連接至上述偵測接 腳或是上述單線通信接腳其中之一。當該週邊裝置插入該連接埠時,該處理器指示該切換裝置將該連接埠連接至該偵測接腳,並透過該偵測接腳判斷該週邊裝置是否為一單線裝置。當該處理器判斷該該週邊裝置為一單線裝置時,該處理器指示該切換裝置將該連接埠連接至該單線通信接腳,並透過該單線通信接腳與該週邊裝置進行一單線通信。 An embodiment of the invention provides an electronic device including a body, a port, a processor, and a switching device. The port is connected to the body and can be inserted by a peripheral device to allow the peripheral device to be electrically connected to the electronic device. The processor is electrically connected to the port, and includes a detecting pin and a single wire communication pin. The switching device is coupled between the processor and the port, and selectively connects the port to the detecting connection The foot is either one of the above single-wire communication pins. When the peripheral device is inserted into the port, the processor instructs the switching device to connect the port to the detecting pin, and determines whether the peripheral device is a single wire device through the detecting pin. When the processor determines that the peripheral device is a single-wire device, the processor instructs the switching device to connect the port to the single-wire communication pin, and performs a single-wire communication with the peripheral device through the single-wire communication pin.

本發明的另一實施例提供一種電子裝置,電性連接至一擴充裝置,以產生一單線資料路徑與一中斷路徑,其中該擴充裝置可電性連接至至少一個週邊裝置。該電子裝置包括一機體、一連接埠、一處理器以及一切換裝置。連接埠,裝置於該機體上且可電性連接至該擴充裝置,以透過該擴充裝置電性連接至上述週邊裝置,其中,當該擴充裝置連接或移除該週邊裝置時,一中斷信號被傳送至該連接埠。處理器,電性連接至該連接埠,具有一偵測接腳、一單線通信接腳、一中斷接腳,其中該中斷接腳透過該連接埠連接至該中斷路徑,以接收該中斷信號。切換裝置,耦接該處理器與該連接埠之間,選擇性地將上述偵測接腳或是上述單線通信接腳其中之一連接至上述單線資料路徑。當該處理器自該中斷接腳接收到該中斷信號時,該切換裝置將上述單線通信接腳耦接至上數單線資料路徑,該處理器藉由該單線資料路徑,掃描連接至該擴充裝置之上述週邊裝置的一狀態。 Another embodiment of the present invention provides an electronic device electrically connected to an expansion device to generate a single-wire data path and an interruption path, wherein the expansion device is electrically connected to the at least one peripheral device. The electronic device includes a body, a port, a processor, and a switching device. a connection device, the device is electrically connected to the expansion device, and is electrically connected to the peripheral device through the expansion device, wherein when the expansion device connects or removes the peripheral device, an interrupt signal is Transfer to this port. The processor is electrically connected to the port, and has a detecting pin, a single wire communication pin, and an interrupt pin. The interrupt pin is connected to the interrupt path through the port to receive the interrupt signal. The switching device is coupled between the processor and the port, and selectively connects the detecting pin or one of the single-wire communication pins to the single-wire data path. When the processor receives the interrupt signal from the interrupt pin, the switching device couples the single-wire communication pin to the upper single-wire data path, and the processor scans and connects to the expansion device by using the single-wire data path. A state of the peripheral device described above.

本發明的另一實施例提供一種週邊擴充裝置,連接至一手持式電子裝置。該週邊擴充裝置包括一第一連接部、一第二連接部以及一控制器。第一連接部,連接至一單線 週邊裝置,包括一第一偵測腳位與一第一單線通信腳位。第二連接部,連接至一週邊裝置,包括一第二偵測腳位與一第二單線通信腳位。控制器,包括耦接該第一偵測腳位的一第一中斷腳位、耦接該第二偵測腳位的一第二中斷腳位以及一輸出腳位。當該第一中斷腳位或該第二中斷腳位的一邏輯狀態改變時,輸出一中斷信號給該手持式電子裝置,並建立該手持式電子裝置與該單線週邊裝置或該週邊裝置的一電性連接。 Another embodiment of the present invention provides a peripheral expansion device coupled to a handheld electronic device. The peripheral expansion device includes a first connection portion, a second connection portion, and a controller. a first connecting portion connected to a single line The peripheral device includes a first detecting pin and a first single wire communication pin. The second connecting portion is connected to a peripheral device, and includes a second detecting pin and a second single wire communicating pin. The controller includes a first interrupt pin coupled to the first detect pin, a second interrupt pin coupled to the second detect pin, and an output pin. When the logic state of the first interrupt pin or the second interrupt pin changes, an interrupt signal is output to the handheld electronic device, and the handheld electronic device and the single-wire peripheral device or the peripheral device are established. Electrical connection.

有關本發明之前述及其他技術內容、特點與功效,在以下配合參考圖式之一較佳實施例的詳細說明中,將可清楚的呈現。以下實施例中所提到的方向用語,例如:上、下、左、右、前或後等,僅是參考附加圖式的方向。因此,使用的方向用語是用來說明並非用來限制本發明。 The above and other technical contents, features and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments. The directional terms mentioned in the following embodiments, such as up, down, left, right, front or back, etc., are only directions referring to the additional drawings. Therefore, the directional terminology used is for the purpose of illustration and not limitation.

第1圖為根據本發明之一手持式電子裝置的一實施例的示意圖。手持式電子裝置11具有一機體,其中該處理器111與該切換裝置112設置與該機體內部,該連接器113設置於該機體上,用以連接外埠裝置。手持式電子裝置11透過連接器113與週邊裝置12的連接器122連接。在本實施例中,連接器113可使用micro USB連接器。Micro USB連接器中包含了5個腳位,其中一識別腳位(第一圖上的腳位P1)僅適用於USB On-The-Go規範,一般情況並不會被使用,因此可以將腳位P1做為單線通信協定(1-wire protocol)所使用的腳位。切換裝置112用以建立處理器111 與週邊裝置12之間的連線,並根據處理器111透過第二通用輸出輸入腳位(GPIO_2)輸出的一選擇信號,選擇建立端點A與端點B0或端點A與端點B1之間的連線。第二通用輸出輸入腳位(GPIO_2)與切換裝置112的端點S耦接。在預設情況下,切換裝置112被預設建立端點A與端點B0之間的連線。在本發明的一實施例中,切換裝置112為一多工器。 1 is a schematic diagram of an embodiment of a handheld electronic device in accordance with the present invention. The handheld electronic device 11 has a body, wherein the processor 111 and the switching device 112 are disposed inside the body, and the connector 113 is disposed on the body for connecting the external device. The handheld electronic device 11 is connected to the connector 122 of the peripheral device 12 via a connector 113. In this embodiment, the connector 113 can use a micro USB connector. The Micro USB connector contains 5 pins, one of which recognizes the pin (P1 on the first picture) only applies to the USB On-The-Go specification. Normally it will not be used, so the foot can be used. Bit P1 is used as the pin used by the 1-wire protocol. The switching device 112 is configured to establish the processor 111 Connecting with the peripheral device 12, and selecting to establish the endpoint A and the endpoint B0 or the endpoint A and the endpoint B1 according to a selection signal output by the processor 111 through the second general-purpose output input pin (GPIO_2) The connection between the two. The second general purpose output input pin (GPIO_2) is coupled to the end point S of the switching device 112. In the default case, the switching device 112 is preset to establish a connection between the endpoint A and the endpoint B0. In an embodiment of the invention, the switching device 112 is a multiplexer.

處理器111的一第一第一通用輸出輸入腳位(GPIO_1)耦接至切換裝置112的端點B0,且端點N1與電壓Vcc之間耦接一第一電阻R1。連接器122的腳位P2耦接至一單線認證控制器121,且透過一電阻Rs耦接至一地電位。在本實施例中,電阻R1的電阻值約100k Ω,而電阻Rs的電阻值約15K Ω。當週邊裝置12連接到手持式電子裝置11時,端點N1的電壓被下拉至一低電壓準位。處理器111透過腳位GPIO_1偵測到電壓改變,觸發一中斷信號,讓手持式電子裝置11知道此時有週邊裝置連接。偵測裝置115會偵測此時端點N1的電壓,並判斷週邊裝置12是否為一單線(1-wire)週邊裝置。在本實施例中,週邊裝置12如果是單線(1-wire)週邊裝置,電阻Rs的電阻值為15K Ω。如果是其他的週邊裝置,電阻Rs的電阻值可能就不是15K Ω。因此,偵測裝置115可以根據端點N1的電壓,判斷週邊裝置12中的下拉電阻Rs的電阻值來判斷是否為一單線週邊裝置。 A first first general-purpose output pin (GPIO_1) of the processor 111 is coupled to the end B0 of the switching device 112, and a first resistor R1 is coupled between the terminal N1 and the voltage Vcc. The pin P2 of the connector 122 is coupled to a single-line authentication controller 121 and coupled to a ground potential through a resistor Rs. In the present embodiment, the resistance of the resistor R1 is about 100 k Ω, and the resistance of the resistor Rs is about 15 k Ω. When the peripheral device 12 is connected to the handheld electronic device 11, the voltage at the terminal N1 is pulled down to a low voltage level. The processor 111 detects a voltage change through the pin GPIO_1, triggers an interrupt signal, and allows the handheld electronic device 11 to know that there is a peripheral device connection at this time. The detecting device 115 detects the voltage of the terminal N1 at this time, and determines whether the peripheral device 12 is a 1-wire peripheral device. In the present embodiment, if the peripheral device 12 is a 1-wire peripheral device, the resistance of the resistor Rs is 15 K Ω. If it is another peripheral device, the resistance of the resistor Rs may not be 15K Ω. Therefore, the detecting device 115 can determine whether the resistance value of the pull-down resistor Rs in the peripheral device 12 is a single-line peripheral device according to the voltage of the terminal N1.

如果判斷此時週邊裝置12是一單線(1-wire)週邊裝置,處理器111發出一選擇信號給切換裝置112,使切換 裝置112建立端點A與端點B1之間的連線。接著,處理器111內的一單線主控制器(1-wire master)114與單線認證控制器(1-wire authentication controller)121進行單線通信(1-wire communication)。當通信結束後,處理器111再通知切換裝置112,使切換裝置112建立端點A與端點B0之間的連線。在本實施例中,單線主控制器可能為處理器111內的一特定電路、一功能元件、該處理器111所執行的一程式或是透過一特定程式將該處理器111所執行的程式轉換的一邏輯電路。在本實施例中,處理器111藉由控制腳位GPIO_2的邏輯準位來控制切換裝置112。舉例來說,當腳位GPIO_2的邏輯準位為邏輯準位0時,切換裝置112建立端點A與端點B0之間的連線,當腳位GPIO_2的邏輯準位為邏輯準位1時,切換裝置112建立端點A與端點B1之間的連線。 If it is determined that the peripheral device 12 is a 1-wire peripheral device, the processor 111 sends a selection signal to the switching device 112 to switch. Device 112 establishes a connection between endpoint A and endpoint B1. Next, a 1-wire master 114 in the processor 111 performs 1-wire communication with the 1-wire authentication controller 121. When the communication is over, the processor 111 again notifies the switching device 112 that the switching device 112 establishes a connection between the endpoint A and the endpoint B0. In this embodiment, the single-line main controller may be a specific circuit in the processor 111, a functional component, a program executed by the processor 111, or a program executed by the processor 111 through a specific program. a logic circuit. In this embodiment, the processor 111 controls the switching device 112 by controlling the logic level of the pin GPIO_2. For example, when the logic level of the pin GPIO_2 is the logic level 0, the switching device 112 establishes a connection between the terminal A and the end point B0. When the logic level of the pin GPIO_2 is the logic level 1, The switching device 112 establishes a connection between the endpoint A and the endpoint B1.

第2圖為根據本發明之一週邊裝置偵測與溝通方法的一實施例的流程圖。本實施例的方法特別適用於具有單線通信功能(1-wire communication function)的手持式電子裝置,且可以降低手持式電子裝置的耗電。傳統的手持式電子裝置會持續的輪詢(polling)週邊裝置來判斷是否有單線週邊裝置(1-wire peripheral device)連接。而本實施例的方法只有在偵測到連接的週邊裝置是單線週邊裝置才會進行單信通信。在步驟S21中,建立一第一連線,如第1圖中端點A與端點B0之間的連線。簡單來說,第一連線是手持裝置內的一偵測器或偵測單元與手持式電子裝置的連接器之間的一連線,利用該第一連線,判斷週邊裝置是 否有連接至手持式電子裝置。在步驟S22中,判斷週邊裝置是否有連接至手持式電子裝置。在本實施例中,若週邊裝置連接至手持式電子裝置,則會產生並傳送一中斷信號給手持裝置內的一處理器。舉例來說,偵測器會連接著連接器的一腳位,當週邊裝置連接至手持式電子裝置時,會將該腳位的電壓下拉至一低電壓準位或上拉至一高電壓準位,一中斷信號因此產生以告知手持式電子裝置內的處理器有週邊裝置連接至手持式電子裝置。如果沒有週邊裝置連接至手持式電子裝置,則執行步驟S24,維持目前的第一連線。 2 is a flow chart of an embodiment of a method for detecting and communicating peripheral devices in accordance with the present invention. The method of the present embodiment is particularly suitable for a handheld electronic device having a 1-wire communication function, and can reduce the power consumption of the handheld electronic device. Conventional handheld electronic devices continuously poll the peripheral devices to determine if there is a 1-wire peripheral device connection. However, the method of this embodiment only performs single-letter communication when it detects that the connected peripheral device is a single-line peripheral device. In step S21, a first connection is established, such as the connection between the end point A and the end point B0 in FIG. Briefly, the first connection is a connection between a detector or a detection unit in the handheld device and a connector of the handheld electronic device. With the first connection, the peripheral device is determined to be There is no connection to the handheld electronic device. In step S22, it is determined whether the peripheral device is connected to the handheld electronic device. In this embodiment, if the peripheral device is connected to the handheld electronic device, an interrupt signal is generated and transmitted to a processor in the handheld device. For example, the detector is connected to a pin of the connector. When the peripheral device is connected to the handheld electronic device, the voltage of the pin is pulled down to a low voltage level or pulled up to a high voltage level. The bit, an interrupt signal is thus generated to inform the processor within the handheld electronic device that a peripheral device is connected to the handheld electronic device. If no peripheral device is connected to the handheld electronic device, step S24 is performed to maintain the current first connection.

在步驟S23中,手持式電子裝置內的一偵測裝置判斷此時連接的週邊裝置是否為一單線週邊裝置。如果不是的話,則執行步驟S24,維持目前的第一連線。如果是的話,則執行步驟S25。在步驟S25中,第一連線被切斷且建立一第二連線,如第1圖中端點A與端點B1之間的連線。。簡單來說,第二連線是手持式電子裝置內的一單線主控制器與手持式電子裝置的連接器之間的一連線。利用該第二連線與週邊裝置內的單線認證控制器進行單線通信(1-wire communication)。當單線主控制器與週邊裝置內的單線認證控制器結束單線通信時,會傳送一選擇信號給一切換裝置,用以切斷第二連線並建立第一連線。因此在步驟S25中,判斷單線通信是否結束。如果單線通信尚未結束,則執行步驟S27,維持第二連線。如果單線通信已經結束,則執行步驟S28,切斷第二連線並建立第一連線。 In step S23, a detecting device in the handheld electronic device determines whether the peripheral device connected at this time is a single-line peripheral device. If not, step S24 is performed to maintain the current first connection. If yes, step S25 is performed. In step S25, the first connection is cut and a second connection is established, such as the connection between the end point A and the end point B1 in FIG. . Briefly, the second connection is a connection between a single-wire main controller and a connector of a handheld electronic device in a handheld electronic device. The second connection is used to perform 1-wire communication with a single-line authentication controller in the peripheral device. When the single-line main controller and the single-line authentication controller in the peripheral device end the single-line communication, a selection signal is transmitted to a switching device for cutting the second connection and establishing the first connection. Therefore, in step S25, it is judged whether or not the one-line communication is ended. If the single line communication has not ended, step S27 is performed to maintain the second connection. If the one-line communication has ended, step S28 is executed to cut off the second connection and establish a first connection.

第3圖為根據本發明之一週邊擴充裝置的一實施例的 示意圖。週邊擴充裝置32具有一第一連接器323與一第二連接器324,其中每一個連接器內都包括了一單線通信腳位與一偵測腳位。第一連接器422的偵測腳位耦接至控制器321的腳位GP1,第二連接器324的偵測腳位耦接至控制器321的腳位GP2。當第一連接器323或第二連接器324連接一週邊裝置時,腳位GP1或GP2的電壓會被下拉至一地電位或一高電壓準位,使得控制器321得知此時有週邊裝置連接至週邊擴充裝置32。在第3圖中,第一連接器323連接一單線週邊裝置33,第二連接器324連接至一USB裝置34。因為USB裝置34並不支援單線通信,因此第二連接器324的單線通信腳位並不會動作。在本實施例中,第一連接器323與第二連接器324為micro USB連接器,其中的識別腳位被作為本實施例中的單線通信腳位。 Figure 3 is a view of an embodiment of a peripheral expansion device according to the present invention schematic diagram. The peripheral expansion device 32 has a first connector 323 and a second connector 324, each of which includes a single-wire communication pin and a detection pin. The detection pin of the first connector 422 is coupled to the pin GP1 of the controller 321, and the detection pin of the second connector 324 is coupled to the pin GP2 of the controller 321. When the first connector 323 or the second connector 324 is connected to a peripheral device, the voltage of the pin GP1 or GP2 is pulled down to a ground potential or a high voltage level, so that the controller 321 knows that there is a peripheral device at this time. Connected to the peripheral expansion unit 32. In FIG. 3, the first connector 323 is connected to a single-wire peripheral device 33, and the second connector 324 is connected to a USB device 34. Since the USB device 34 does not support single-line communication, the single-wire communication pin of the second connector 324 does not operate. In this embodiment, the first connector 323 and the second connector 324 are micro USB connectors, wherein the identification pin is used as the single-line communication pin in the embodiment.

週邊擴充裝置32連接至手持式電子裝置31,作為手持式電子裝置31與週邊裝置進行單信通信的媒介。第一連接器323與第二連接器324都包含一單線通信腳位,耦接至控制器321內的一單線裝置偵測器322。單線裝置偵測器322會判斷連接至第一連接器323或第二連接器324的週邊裝置是否為一單線週邊裝置,如果是的話,控制器321透過腳位GP3傳送一控制信號SC1給開關312。當有週邊裝置連接至週邊擴充裝置32或自週邊擴充裝置32移除時,週邊擴充裝置32都會對目前所連接的所有週邊裝置進行偵測,以得知目前連接的週邊裝置是否有單線週邊裝置。如果有偵測到單線週邊裝置時,控制器321透過腳位GP3傳送一控制信號SC1給開關312。單線裝置偵測器322 的偵測運作可參考第1圖中偵測裝置115的運作,在此不贅述。週邊擴充裝置32會將第一連接器323與第二連接器324的單線通信腳位連接在一起,並與手持式電子裝置31的開關裝置312連接。當開關裝置312接收到控制信號SC1時,開關裝置312被導通,使得處理器311內的單線控制器312與第一連接器323以及第二連接器324的單線通信腳位電性連接。接著,單線主控制器313會逐一與週邊裝置進行單線通信。如果週邊裝置並不是單線週邊裝置,則不會回應單線主控制器313所傳送的信號、資料或請求。當單線主控制器313與所有的週邊裝置溝通完畢後,會傳送一控制信號SC2給開關裝置312,使開關裝置312關閉。 The peripheral expansion device 32 is connected to the handheld electronic device 31 as a medium for single-letter communication between the handheld electronic device 31 and the peripheral device. Both the first connector 323 and the second connector 324 include a single-wire communication pin coupled to a single-wire device detector 322 in the controller 321 . The single line device detector 322 determines whether the peripheral device connected to the first connector 323 or the second connector 324 is a single line peripheral device. If so, the controller 321 transmits a control signal SC1 to the switch 312 through the pin GP3. . When a peripheral device is connected to or removed from the peripheral expansion device 32, the peripheral expansion device 32 detects all the peripheral devices currently connected to know whether the currently connected peripheral device has a single-line peripheral device. . If a single line peripheral device is detected, the controller 321 transmits a control signal SC1 to the switch 312 through the pin GP3. Single line device detector 322 For the detection operation, reference may be made to the operation of the detecting device 115 in FIG. 1 and will not be described here. The peripheral expansion device 32 connects the first connector 323 with the single-wire communication pin of the second connector 324 and is connected to the switching device 312 of the handheld electronic device 31. When the switching device 312 receives the control signal SC1, the switching device 312 is turned on, so that the single-wire controller 312 in the processor 311 is electrically connected to the single-wire communication pins of the first connector 323 and the second connector 324. Next, the single-line main controller 313 performs one-line communication with the peripheral devices one by one. If the peripheral device is not a single-wire peripheral device, it will not respond to signals, data or requests transmitted by the single-line main controller 313. When the single-line main controller 313 communicates with all of the peripheral devices, a control signal SC2 is transmitted to the switching device 312 to turn off the switching device 312.

第4圖為根據本發明之一週邊擴充裝置的一實施例的示意圖。週邊擴充裝置42具有一第一連接器422與一第二連接器423,其中每一個連接器內都包括了一單線通信腳位與一偵測腳位。第一連接器422的偵測腳位耦接至控制器421的腳位GP1,第二連接器423的偵測腳位耦接至控制器421的腳位GP2。當第一連接器422或第二連接器423連接一週邊裝置時,腳位GP1或GP2的電壓會被下拉至一地電位或一高電壓準位,使得控制器421得知此時有週邊裝置連接至週邊擴充裝置42。在第4圖中,第一連接器422連接一單線週邊裝置43,第二連接器423連接至一USB裝置44。因為USB裝置44並不支援單線通信,因此第二連接器423的單線通信腳位並不會動作。在本實施例中,第一連接器422與第二連接器423為micro USB連接器,其中的識別腳位被作為本實施例中的單線通信腳位。 Figure 4 is a schematic illustration of an embodiment of a peripheral expansion device in accordance with the present invention. The peripheral expansion device 42 has a first connector 422 and a second connector 423. Each of the connectors includes a single-wire communication pin and a detection pin. The detection pin of the first connector 422 is coupled to the pin GP1 of the controller 421, and the detection pin of the second connector 423 is coupled to the pin GP2 of the controller 421. When the first connector 422 or the second connector 423 is connected to a peripheral device, the voltage of the pin GP1 or GP2 is pulled down to a ground potential or a high voltage level, so that the controller 421 knows that there is a peripheral device at this time. Connected to the peripheral expansion device 42. In FIG. 4, the first connector 422 is connected to a single-wire peripheral device 43, and the second connector 423 is connected to a USB device 44. Since the USB device 44 does not support single-line communication, the single-wire communication pin of the second connector 423 does not operate. In this embodiment, the first connector 422 and the second connector 423 are micro USB connectors, wherein the identification pin is used as the single-line communication pin in the embodiment.

當有週邊裝置連接至週邊擴充裝置42或自週邊擴充裝置42移除時,週邊擴充裝置42傳送一中斷信號給處理器411的腳位GPIO_3。手持式電子裝置41包括一處理器411與一切換裝置412。切換裝置412用以建立處理器411與週邊擴充裝置42之間的連線,並根據處理器411透過第二通用輸出輸入腳位(GPIO_2)輸出的一選擇信號,選擇建立端點A與端點B0或端點A與端點B1之間的連線。第二通用輸出輸入腳位(GPIO_2)與切換裝置412的端點S耦接。在預設情況下,切換裝置412被預設建立端點A與端點B0之間的連線。在本發明的一實施例中,切換裝置412為一多工器。 When a peripheral device is connected to or removed from the peripheral expansion device 42, the peripheral expansion device 42 transmits an interrupt signal to the pin GPIO_3 of the processor 411. The handheld electronic device 41 includes a processor 411 and a switching device 412. The switching device 412 is configured to establish a connection between the processor 411 and the peripheral expansion device 42 and select to establish the endpoint A and the endpoint according to a selection signal output by the processor 411 through the second general-purpose output input pin (GPIO_2). B0 or the connection between endpoint A and endpoint B1. The second general purpose output input pin (GPIO_2) is coupled to the end point S of the switching device 412. In the default case, the switching device 412 is preset to establish a connection between the endpoint A and the endpoint B0. In an embodiment of the invention, the switching device 412 is a multiplexer.

當處理器411接收到週邊擴充裝置42傳送的中斷信號時,偵測裝置414會偵測此時連接至週邊擴充裝置42的週邊裝置中是否有單線週邊裝置。偵測裝置414會偵測此時端點B0的電壓,並判是否有單線(1-wire)週邊裝置連接至週邊擴充裝置42。在本實施例中,週邊裝置如果是單線(1-wire)週邊裝置,其與週邊擴充裝置42的單線通信腳位連接的腳位會耦接一電阻Rs,其電阻值為15K Ω。在本實施例中,單線週邊裝置43與偵測裝置414電性連接時,端點B0的電壓會被降低。因此偵測裝置414可以根據端點B0的電壓,估算出電阻Rs的電阻值。如果求得的電阻值約為15K Ω。則表示此時週邊擴充裝置42的有連接到單線週邊裝置。 When the processor 411 receives the interrupt signal transmitted by the peripheral expansion device 42, the detecting device 414 detects whether there is a single-line peripheral device in the peripheral device connected to the peripheral expansion device 42 at this time. The detecting device 414 detects the voltage of the terminal B0 at this time and determines whether a 1-wire peripheral device is connected to the peripheral expansion device 42. In this embodiment, if the peripheral device is a 1-wire peripheral device, the pin connected to the single-wire communication pin of the peripheral expansion device 42 is coupled to a resistor Rs having a resistance value of 15K Ω. In this embodiment, when the single-wire peripheral device 43 is electrically connected to the detecting device 414, the voltage of the terminal B0 is lowered. Therefore, the detecting means 414 can estimate the resistance value of the resistor Rs based on the voltage of the terminal B0. If the obtained resistance is about 15K Ω. It means that the peripheral expansion device 42 is connected to the single-line peripheral device at this time.

如果偵測裝置414判斷此時有單線週邊裝置連接至週邊擴充裝置42,處理器411發出一選擇信號給切換裝置 412,使切換裝置412建立端點A與端點B1之間的連線。接著,處理器411內的一單線主控制器(1-wire master)413與單線認證控制器431(1-wire authentication controller)進行單線通信(1-wire communication)。單線主控制器413會逐一與週邊擴充裝置42所連接的週邊裝置進行單線通信。如果週邊裝置並不是單線週邊裝置,則不會回應單線主控制器413所傳送的信號、資料或請求。當單線主控制器413與所有的週邊裝置溝通完畢後,單線主控制器413會記錄下此時週邊擴充裝置42所連接的週邊裝置的一狀態資料。舉例來說,該狀態資料包括了連接器的識別資訊、與該連接器連接的週邊裝置是否為單線週邊裝置的一資料、該單線週邊裝置的類型或識別資訊。 If the detecting device 414 determines that a single-wire peripheral device is connected to the peripheral expansion device 42 at this time, the processor 411 sends a selection signal to the switching device. 412, causing the switching device 412 to establish a connection between the endpoint A and the endpoint B1. Next, a 1-wire master 413 in the processor 411 performs 1-wire communication with a 1-wire authentication controller 431. The single-line main controller 413 performs one-line communication with the peripheral devices connected to the peripheral expansion device 42 one by one. If the peripheral device is not a single-wire peripheral device, it will not respond to signals, data or requests transmitted by the single-line main controller 413. After the single-line main controller 413 communicates with all the peripheral devices, the single-line main controller 413 records a status data of the peripheral devices connected to the peripheral expansion device 42 at this time. For example, the status data includes identification information of the connector, whether the peripheral device connected to the connector is a data of the single-line peripheral device, the type of the single-wire peripheral device, or identification information.

在本實施例中,手持裝置41更包含一儲存單元,用以儲存複數組電碼(code)。當單線通信結束後,單線主控制器413比較透過單線通信所接收之識別資料與儲存之電碼,以辨別該週邊裝置。 In this embodiment, the handheld device 41 further includes a storage unit for storing a complex array of codes. When the one-line communication ends, the single-line main controller 413 compares the identification data received by the single-wire communication with the stored electric code to identify the peripheral device.

當單線通信結束後,處理器411再通知切換裝置412,使切換裝置412建立端點A與端點B0之間的連線。在本實施例中,單線主控制器413可能為處理器413內的一特定電路、一功能元件、該處理器413所執行的一程式或是透過一特定程式將該處理器413所執行的程式轉換的一邏輯電路。在本實施例中,處理器411藉由控制腳位GPIO_2的邏輯準位來控制切換裝置413。舉例來說,當腳位GPIO_2的邏輯準位為邏輯準位0時,切換裝置412建立端點A與端點B0之間的連線,當腳位GPIO_2的邏輯準位為邏輯準 位1時,切換裝置412建立端點A與端點B1之間的連線。 When the one-line communication ends, the processor 411 again notifies the switching device 412 that the switching device 412 establishes a connection between the endpoint A and the endpoint B0. In this embodiment, the single-line main controller 413 may be a specific circuit in the processor 413, a function component, a program executed by the processor 413, or a program executed by the processor 413 through a specific program. A logic circuit that converts. In this embodiment, the processor 411 controls the switching device 413 by controlling the logic level of the pin GPIO_2. For example, when the logic level of the pin GPIO_2 is a logic level 0, the switching device 412 establishes a connection between the terminal A and the end point B0. When the logic level of the pin GPIO_2 is a logic When bit 1, the switching device 412 establishes a connection between the endpoint A and the endpoint B1.

在本實施例中,有週邊裝置連接至週邊擴充裝置42或自週邊擴充裝置42移除時,週邊擴充裝置42會發送中斷信號INT_O給處理器411,接著偵測裝置414會偵測此時連接至週邊擴充裝置42的週邊裝置中是否有單線週邊裝置。如果偵測裝置414判斷此時有單線週邊裝置連接至週邊擴充裝置42,處理器411發出一選擇信號給切換裝置412,使切換裝置412建立端點A與端點B1之間的連線。接著,單線主控制器413重覆前述動作,在此不贅述。 In this embodiment, when the peripheral device is connected to or removed from the peripheral expansion device 42, the peripheral expansion device 42 sends an interrupt signal INT_O to the processor 411, and then the detection device 414 detects the connection at this time. Whether there is a single line peripheral device in the peripheral device to the peripheral expansion device 42. If the detecting means 414 determines that a single-wire peripheral device is connected to the peripheral expansion device 42, the processor 411 sends a selection signal to the switching device 412 to cause the switching device 412 to establish a connection between the terminal A and the terminal B1. Next, the single-line main controller 413 repeats the above-described operations, and details are not described herein.

第5圖為根據本發明之一單線週邊裝置的一實施例的示意圖。單線週邊裝置51包含一連接器511與一單線認證控制器512。連接器511的一腳位透過一電阻Rs接地,其中電阻Rs的電阻值為15K Ω。當單線週邊裝置51連接到具有單線通信功能的電子裝置時,電阻Rs會使得電子裝置產生一中斷信號,告知有單線週邊裝置51連接至該電子裝置。接著,單線認證控制器512與電子裝置進行單線通信。當單線通信結束後,電子裝置與單線週邊裝置51中斷單線通信連結。在另一實施例中,當單線通信結束後,單線認證控制器512發出一控制信號給電子裝置,用以中斷單線通信連結。 Figure 5 is a schematic illustration of an embodiment of a single wire peripheral device in accordance with the present invention. The single line peripheral device 51 includes a connector 511 and a single line authentication controller 512. A pin of the connector 511 is grounded through a resistor Rs, wherein the resistance of the resistor Rs is 15K Ω. When the single-wire peripheral device 51 is connected to an electronic device having a single-wire communication function, the resistor Rs causes the electronic device to generate an interrupt signal informing that the single-wire peripheral device 51 is connected to the electronic device. Next, the single line authentication controller 512 performs single line communication with the electronic device. When the one-line communication ends, the electronic device and the single-line peripheral device 51 interrupt the single-wire communication connection. In another embodiment, after the single-wire communication ends, the single-line authentication controller 512 sends a control signal to the electronic device to interrupt the single-wire communication link.

第6圖為根據本發明之一週邊裝置偵測與溝通方法的另一實施例的流程圖。本實施例的方法特別適用於具有單線通信功能(1-wire communication function)的手持式電子裝置,以降低手持式電子裝置的耗電。傳統的手持式電子裝置會持續的輪詢(polling)週邊裝置來判斷是否有單 線週邊裝置(1-wire peripheral device)連接。而本實施例的方法只有在偵測到連接的週邊裝置是單線週邊裝置才會進行單信通信。在步驟S61中,週邊裝置透過一週邊擴充裝置建立與手持式電子裝置的一第一連線,如第4圖中端點A與端點B0之間的連線。簡單來說,第一連線是手持裝置內的一偵測器或偵測單元與手持式電子裝置的連接器之間的一連線。在步驟S62中,手持式電子裝置偵測是否有與週邊擴充裝置。若無,則維持在步驟S62。若有,執行步驟S63,以建立一第二連線,並切斷第一連線。第二連線如第4圖中端點A與端點B1之間的連線。簡單來說,第二連線是手持式電子裝置內的一單線主控制器與手持式電子裝置的連接器之間的一連線。 Figure 6 is a flow chart showing another embodiment of a method for detecting and communicating peripheral devices in accordance with the present invention. The method of the present embodiment is particularly suitable for a handheld electronic device having a 1-wire communication function to reduce the power consumption of the handheld electronic device. Traditional handheld electronic devices continue to polling peripheral devices to determine if there is a single A 1-wire peripheral device is connected. However, the method of this embodiment only performs single-letter communication when it detects that the connected peripheral device is a single-line peripheral device. In step S61, the peripheral device establishes a first connection with the handheld electronic device through a peripheral expansion device, such as the connection between the endpoint A and the endpoint B0 in FIG. Briefly, the first connection is a connection between a detector or a detection unit in the handheld device and a connector of the handheld electronic device. In step S62, the handheld electronic device detects whether there is a peripheral expansion device. If not, it is maintained at step S62. If yes, step S63 is performed to establish a second connection and the first connection is cut. The second connection is the connection between the endpoint A and the endpoint B1 in FIG. Briefly, the second connection is a connection between a single-wire main controller and a connector of a handheld electronic device in a handheld electronic device.

在步驟S64中,手持式電子裝置偵測是否有週邊裝置連接至週邊擴充裝置。在本實施例中,當有週邊裝置連接至週邊擴充裝置時,週邊擴充裝置會發出一中斷信號給手持式電子裝置。如果沒有週邊裝置連接至週邊擴充裝置時,則維持步驟S64。如果有週邊裝置連接至週邊擴充裝置時,則執行步驟S65。在步驟S65中,手持式電子裝置利用該第二連線與週邊裝置內的單線認證控制器進行單線通信(1-wire communication)。在步驟S66中,手持式電子裝置會記錄連接至週邊擴充裝置的所有單線週邊裝置的狀態。在另一實施例中,手持式電子裝置會記錄連接至週邊擴充裝置的所有的週邊裝置的狀態。在步驟S67中,手持式電子裝置會偵測週邊擴充裝置是否有被移除,如果是則執行步驟S61,如果沒有被移除,則執行步驟S64。 In step S64, the handheld electronic device detects whether a peripheral device is connected to the peripheral expansion device. In this embodiment, when a peripheral device is connected to the peripheral expansion device, the peripheral expansion device sends an interrupt signal to the handheld electronic device. If no peripheral device is connected to the peripheral expansion device, step S64 is maintained. If there is a peripheral device connected to the peripheral expansion device, step S65 is performed. In step S65, the handheld electronic device utilizes the second connection to perform 1-wire communication with a single-line authentication controller in the peripheral device. In step S66, the handheld electronic device records the status of all of the single-wire peripheral devices connected to the peripheral expansion device. In another embodiment, the handheld electronic device records the status of all of the peripheral devices connected to the peripheral expansion device. In step S67, the handheld electronic device detects whether the peripheral expansion device has been removed. If yes, step S61 is performed, and if not, step S64 is performed.

惟以上所述者,僅為本發明之較佳實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及發明說明內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。另外本發明的任一實施例或申請專利範圍不須達成本發明所揭露之全部目的或優點或特點。此外,摘要部分和標題僅是用來輔助專利文件搜尋之用,並非用來限制本發明之權利範圍。 The above is only the preferred embodiment of the present invention, and the scope of the invention is not limited thereto, that is, the simple equivalent changes and modifications made by the scope of the invention and the description of the invention are All remain within the scope of the invention patent. In addition, any of the objects or advantages or features of the present invention are not required to be achieved by any embodiment or application of the invention. In addition, the abstract sections and headings are only used to assist in the search of patent documents and are not intended to limit the scope of the invention.

11‧‧‧手持式電子裝置 11‧‧‧Handheld electronic devices

111‧‧‧處理器 111‧‧‧ Processor

112‧‧‧切換裝置 112‧‧‧Switching device

113‧‧‧連接器 113‧‧‧Connector

114‧‧‧單線主控制器 114‧‧‧One-line main controller

115‧‧‧偵測裝置 115‧‧‧Detection device

12‧‧‧周邊裝置 12‧‧‧ peripheral devices

122‧‧‧連接器 122‧‧‧Connector

121‧‧‧單線認證控制器 121‧‧‧One-line authentication controller

31‧‧‧手持式電子裝置 31‧‧‧Handheld electronic devices

32‧‧‧週邊擴充裝置 32‧‧‧ peripheral expansion devices

33‧‧‧單線週邊裝置 33‧‧‧Single line peripheral

34‧‧‧USB裝置 34‧‧‧USB device

311‧‧‧處理器 311‧‧‧ processor

312‧‧‧開關裝置 312‧‧‧Switching device

313‧‧‧單線主控制器 313‧‧‧Single line master controller

321‧‧‧控制器 321‧‧‧ Controller

322‧‧‧單線裝置偵測器 322‧‧‧Single line device detector

323‧‧‧第一連接器 323‧‧‧First connector

324‧‧‧第二連接器 324‧‧‧Second connector

331‧‧‧單線認證控制器 331‧‧‧ single line certification controller

41‧‧‧手持式電子裝置 41‧‧‧Handheld electronic devices

42‧‧‧週邊擴充裝置 42‧‧‧ peripheral expansion unit

43‧‧‧單線週邊裝置 43‧‧‧Single line peripheral

44‧‧‧USB裝置 44‧‧‧USB device

411‧‧‧處理器 411‧‧‧ processor

412‧‧‧切換裝置 412‧‧‧Switching device

413‧‧‧單線主控制器 413‧‧‧Single line master controller

414‧‧‧偵測裝置 414‧‧‧Detection device

421‧‧‧控制器 421‧‧‧ Controller

422‧‧‧連接器 422‧‧‧Connector

423‧‧‧連接器 423‧‧‧Connector

431‧‧‧單線認證控制器 431‧‧‧Single line authentication controller

51‧‧‧單線週邊裝置 51‧‧‧Single line peripheral device

511‧‧‧連接器 511‧‧‧Connector

512‧‧‧單線認證控制器 512‧‧‧ single line certification controller

第1圖為根據本發明之一手持式電子裝置的一實施例的示意圖。 1 is a schematic diagram of an embodiment of a handheld electronic device in accordance with the present invention.

第2圖為根據本發明之一週邊裝置偵測與溝通方法的一實施例的流程圖。 2 is a flow chart of an embodiment of a method for detecting and communicating peripheral devices in accordance with the present invention.

第3圖為根據本發明之一週邊擴充裝置的一實施例的示意圖。 Figure 3 is a schematic illustration of an embodiment of a peripheral expansion device in accordance with the present invention.

第4圖為根據本發明之一週邊擴充裝置的一實施例的示意圖。 Figure 4 is a schematic illustration of an embodiment of a peripheral expansion device in accordance with the present invention.

第5圖為根據本發明之一單線週邊裝置的一實施例的示意圖。 Figure 5 is a schematic illustration of an embodiment of a single wire peripheral device in accordance with the present invention.

第6圖為根據本發明之一週邊裝置偵測與溝通方法的另一實施例的流程圖。 Figure 6 is a flow chart showing another embodiment of a method for detecting and communicating peripheral devices in accordance with the present invention.

11‧‧‧手持式電子裝置 11‧‧‧Handheld electronic devices

111‧‧‧處理器 111‧‧‧ Processor

112‧‧‧切換裝置 112‧‧‧Switching device

113‧‧‧連接器 113‧‧‧Connector

114‧‧‧單線主控制器 114‧‧‧One-line main controller

115‧‧‧偵測裝置 115‧‧‧Detection device

12‧‧‧周邊裝置 12‧‧‧ peripheral devices

122‧‧‧連接器 122‧‧‧Connector

121‧‧‧單線認證控制器 121‧‧‧One-line authentication controller

Claims (21)

一種電子裝置,包括:一機體(housing);一連接埠,裝置於該機體上且可被一週邊裝置插入,以允許該週邊裝置電性連接至該電子裝置;一處理器,電性連接至該連接埠,包括一偵測接腳與一單線通信接腳;一切換裝置,耦接該處理器與該連接埠之間,選擇性地將上述連接埠連接至上述偵測接腳或是上述單線通信接腳其中之一;當該週邊裝置插入該連接埠時,該處理器指示該切換裝置將該連接埠連接至該偵測接腳,並透過該偵測接腳判斷該週邊裝置是否為一單線裝置;當該處理器判斷該該週邊裝置為一單線裝置時,該處理器指示該切換裝置將該連接埠連接至該單線通信接腳,並透過該單線通信接腳與該週邊裝置進行一單線通信。 An electronic device comprising: a housing; a connection device disposed on the body and insertable by a peripheral device to allow the peripheral device to be electrically connected to the electronic device; a processor electrically connected to The connection port includes a detection pin and a single-wire communication pin; a switching device coupled between the processor and the port, selectively connecting the port to the detecting pin or the One of the single-wire communication pins; when the peripheral device is inserted into the connection port, the processor instructs the switching device to connect the connection port to the detection pin, and determines whether the peripheral device is a single-wire device; when the processor determines that the peripheral device is a single-wire device, the processor instructs the switching device to connect the port to the single-wire communication pin, and performs the peripheral device with the single-wire communication pin A single line communication. 如申請專利範圍第1項所述之電子裝置,其中,當該單線通信結束後,該處理器輸出上述切換信號,使該切換裝置將上述連接埠連接至上述偵測接腳 The electronic device of claim 1, wherein, after the single-wire communication ends, the processor outputs the switching signal, so that the switching device connects the connection port to the detection pin 如申請專利範圍第1項所述之電子裝置,該週邊裝置具有一連接器,其中該連接器尺寸相容該連接埠,使得該電子裝置可與該週邊裝置電性連接。 The electronic device of claim 1, wherein the peripheral device has a connector, wherein the connector is sized to be compatible with the connector such that the electronic device can be electrically connected to the peripheral device. 如申請申請專利範圍第1項所述之電子裝置,其中該切換裝置包括: 一第一端點,耦接該連接埠的一第一腳位;一第二端點,耦接該單線通信接腳;以及一第三端點,耦接該偵測接腳。 The electronic device of claim 1, wherein the switching device comprises: A first terminal is coupled to a first pin of the port; a second terminal is coupled to the single-wire communication pin; and a third terminal is coupled to the detecting pin. 如申請申請專利範圍第1項所述之電子裝置,其中該偵測接腳為一通用輸出輸入腳位,該偵測接腳透過一第一電阻耦接至一電壓源,當該偵測接腳的一電壓被下拉至一低電壓準位時,該處理器判斷該週邊裝置已電性連接至該電子裝置。 The electronic device of claim 1, wherein the detecting pin is a general-purpose output input pin, and the detecting pin is coupled to a voltage source through a first resistor. When a voltage of the foot is pulled down to a low voltage level, the processor determines that the peripheral device is electrically connected to the electronic device. 如申請申請專利範圍第1項所述之電子裝置,其中該連接埠為一micro USB連接埠,且該第一腳位為該micro USB連接埠的一識別腳位。 The electronic device of claim 1, wherein the connection port is a micro USB port, and the first pin is an identification pin of the micro USB port. 如申請申請專利範圍第1項所述之電子裝置,更包含一儲存單元,用以儲存複數組電碼,當該單線通信結束後,該處理器比較上述單線通信所接收之辨別資料與儲存之電碼,以辨別該週邊裝置,或記錄該週邊裝置的一狀態。 The electronic device as claimed in claim 1, further comprising a storage unit for storing the complex array code. When the single line communication ends, the processor compares the identification data received by the single line communication with the stored code. To identify the peripheral device or to record a state of the peripheral device. 一種電子裝置,電性連接至一擴充裝置,以產生一單線資料路徑與一中斷路徑,其中該擴充裝置可電性連接至至少一個週邊裝置,該電子裝置包括:一機體;一連接埠,裝置於該機體上且可電性連接至該擴充裝置,以透過該擴充裝置電性連接至上述週邊裝置,其中,當該擴充裝置連接或移除該週邊裝置時,一中斷信號被傳送至該連接埠;一處理器,電性連接至該連接埠,具有一偵測接腳、一單線通信接腳、一中斷接腳,其中該中斷接腳透過該連 接埠連接至該中斷路徑,以接收該中斷信號;一切換裝置,耦接該處理器與該連接埠之間,選擇性地將上述偵測接腳或是上述單線通信接腳其中之一連接至上述單線資料路徑;其中當該處理器自該中斷接腳接收到該中斷信號時,該切換裝置將上述單線通信接腳耦接至上數單線資料路徑,該處理器藉由該單線資料路徑,掃描連接至該擴充裝置之上述週邊裝置的一狀態。 An electronic device is electrically connected to an expansion device to generate a single-wire data path and an interruption path, wherein the expansion device is electrically connected to at least one peripheral device, the electronic device includes: a body; a connection device And being electrically connected to the expansion device to be electrically connected to the peripheral device through the expansion device, wherein an interrupt signal is transmitted to the connection device when the expansion device connects or removes the peripheral device a processor electrically connected to the port, having a detecting pin, a single-wire communication pin, and an interrupt pin, wherein the interrupt pin passes through the connection Connected to the interrupt path to receive the interrupt signal; a switching device coupled between the processor and the port, selectively connecting the detecting pin or one of the single-wire communication pins And the single-wire data path; wherein, when the processor receives the interrupt signal from the interrupt pin, the switching device couples the single-wire communication pin to the upper single-wire data path, and the processor uses the single-wire data path Scanning a state of the peripheral device connected to the expansion device. 如申請專利範圍第8項所述之電子裝置,其中該處理器透過該單線資料路徑掃描並記錄連接至該擴充裝置之上述週邊裝置的該狀態並產生一狀態資料,且該處理器在產生該狀態資料後,停止掃描上述週邊裝置。 The electronic device of claim 8, wherein the processor scans and records the state of the peripheral device connected to the expansion device through the single-line data path and generates a status data, and the processor generates the After the status data, the scanning of the peripheral devices is stopped. 如申請專利範圍第9項所述之電子裝置,其中該處理器透過該偵測接腳判斷上述週邊裝置是否支援單線通信,並透過該單線通信接腳與上述週邊裝置進行單線通信。 The electronic device of claim 9, wherein the processor determines whether the peripheral device supports single-line communication through the detecting pin, and performs single-line communication with the peripheral device through the single-wire communication pin. 如申請申請專利範圍第8項所述之電子裝置,其中該切換裝置包括:一第一端點,耦接該連接埠的一第一腳位;一第二端點,耦接該單線通信接腳;以及一第三端點,耦接該偵測接腳。 The electronic device of claim 8, wherein the switching device comprises: a first terminal coupled to a first pin of the port; and a second terminal coupled to the single wire communication a foot; and a third end point coupled to the detecting pin. 如申請申請專利範圍第8項所述之電子裝置,其中該偵測接腳為一通用輸出輸入腳位,該偵測接腳透過一第一電阻耦接至一電壓源,當該偵測接腳的一電壓被下拉至一低電壓準位時,該處理器判斷該週邊裝置已電性連接至該電子裝置。 The electronic device of claim 8, wherein the detecting pin is a general-purpose output input pin, and the detecting pin is coupled to a voltage source through a first resistor. When a voltage of the foot is pulled down to a low voltage level, the processor determines that the peripheral device is electrically connected to the electronic device. 如申請申請專利範圍第8項所述之電子裝置,其中該連接埠為一micro USB連接埠,且該第一腳位為該micro USB連接埠的一識別腳位。 The electronic device of claim 8, wherein the connection port is a micro USB port, and the first pin is an identification pin of the micro USB port. 如申請申請專利範圍第8項所述之電子裝置,更包含一儲存單元,用以儲存複數組電碼,當該單線通信結束後,該處理器比較上述單線通信所接收之辨別資料與儲存之電碼,以辨別該週邊裝置,或記錄該週邊裝置的一狀態。 The electronic device as claimed in claim 8, further comprising a storage unit for storing the complex array code, wherein when the single line communication ends, the processor compares the identification data and the stored code received by the single line communication. To identify the peripheral device or to record a state of the peripheral device. 一種週邊擴充裝置,連接至一電子裝置,包括:一第一連接部,連接至一單線週邊裝置,包括一第一偵測腳位與一第一單線通信腳位;一第二連接部,連接至一週邊裝置,包括一第二偵測腳位與一第二單線通信腳位;以及一控制器,包括:一第一中斷腳位,耦接該第一偵測腳位;一第二中斷腳位,耦接該第二偵測腳位;以及一輸出腳位,當該第一中斷腳位或該第二中斷腳位的一邏輯狀態改變時,輸出一中斷信號給該電子裝置,並建立該電子裝置與該單線週邊裝置或該週邊裝置的一電性連接。 A peripheral expansion device is connected to an electronic device, comprising: a first connection portion connected to a single-line peripheral device, including a first detection pin and a first single-wire communication pin; and a second connection portion The device includes a second detecting pin and a second single wire communication pin; and a controller, comprising: a first interrupt pin coupled to the first detecting pin; and a second interrupt a pin, coupled to the second detecting pin; and an output pin, when the logic state of the first interrupt pin or the second interrupt pin changes, outputting an interrupt signal to the electronic device, and Establishing an electrical connection between the electronic device and the single-wire peripheral device or the peripheral device. 如申請專利範圍第15項所述之週邊擴充裝置,其中該電子裝置透過該電性連接與該單線週邊裝置進行一單線通信。 The peripheral expansion device of claim 15, wherein the electronic device performs a single line communication with the single line peripheral device through the electrical connection. 如申請專利範圍第15項所述之週邊擴充裝置,其中當該單線週邊裝置與該第一連接部連接或自該第一連接 部移除時,該第一偵測腳位的一邏輯狀態被改變。 The peripheral expansion device of claim 15, wherein the single-wire peripheral device is connected to the first connection or from the first connection When the part is removed, a logic state of the first detection pin is changed. 如申請專利範圍第15項所述之週邊擴充裝置,其中當該週邊裝置與該第一連接部連接或自該第一連接部移除時,該第一偵測腳位的一邏輯狀態被改變。 The peripheral expansion device of claim 15, wherein a logic state of the first detection pin is changed when the peripheral device is connected to or removed from the first connection portion. . 如申請專利範圍第15項所述之週邊擴充裝置,其中該週邊裝置為一USB周邊裝置。 The peripheral expansion device of claim 15, wherein the peripheral device is a USB peripheral device. 如申請專利範圍第15項所述之週邊擴充裝置,其中該第一連接部為一micro USB連接部,且該第一單線通信腳位該micro USB連接器的一識別腳位。 The peripheral expansion device of claim 15, wherein the first connection portion is a micro USB connection portion, and the first single-wire communication pin is located at an identification pin of the micro USB connector. 如申請專利範圍第15項所述之週邊擴充裝置,其中該第二連接部為一micro USB連接部,且該第二單線通信腳位該micro USB連接器的一識別腳位。 The peripheral expansion device of claim 15, wherein the second connection portion is a micro USB connection portion, and the second single-wire communication pin is located at an identification pin of the micro USB connector.
TW101125109A 2012-06-05 2012-07-12 Portable device and peripheral extension dock TWI475390B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US13/489,027 US8954628B2 (en) 2012-06-05 2012-06-05 Portable device and peripheral extension dock

Publications (2)

Publication Number Publication Date
TW201351150A true TW201351150A (en) 2013-12-16
TWI475390B TWI475390B (en) 2015-03-01

Family

ID=49579550

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101125109A TWI475390B (en) 2012-06-05 2012-07-12 Portable device and peripheral extension dock

Country Status (4)

Country Link
US (3) US8954628B2 (en)
CN (1) CN103473193B (en)
DE (1) DE102013006162B4 (en)
TW (1) TWI475390B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268728B2 (en) * 2012-07-02 2016-02-23 Htc Corporation Portable electronic device and accessory device thereof, and operating method for the portable electronic device
KR102069708B1 (en) * 2012-08-27 2020-01-23 삼성전자 주식회사 Accessory Device for supporting a hierarchical connection and System, and Supporting Method thereof
US8930586B2 (en) * 2013-04-03 2015-01-06 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Identification of electronic devices operating within a computing system
CN103473208B (en) * 2013-04-12 2016-10-12 威盛电子股份有限公司 Transmission system
JP6323712B2 (en) * 2014-06-30 2018-05-16 カシオ計算機株式会社 Electronics
US9876983B2 (en) * 2015-05-29 2018-01-23 Raytheon Company System and method for providing power from a standardized component without a power source output to an accessory component
JP6661342B2 (en) * 2015-11-26 2020-03-11 Dynabook株式会社 Port connection circuit, port connection control method, electronic equipment
WO2017123193A1 (en) * 2016-01-11 2017-07-20 Hewlett-Packard Development Company, L.P. Usb-c port connections based on multi-level straps
CN107404133A (en) * 2016-05-20 2017-11-28 中兴通讯股份有限公司 Charging method, charger and terminal
US10061378B2 (en) * 2016-07-29 2018-08-28 Sandisk Technologies Llc System and method for adjusting device performance based on sensed host current sourcing capability
TWI633422B (en) * 2017-04-28 2018-08-21 宏碁股份有限公司 Extendable host device and power management method thereof
CN107943735A (en) * 2017-12-14 2018-04-20 闻泰通讯股份有限公司 Connect circuit and electronic equipment
CN109660646B (en) * 2019-01-31 2021-01-26 华勤技术股份有限公司 Connecting module and electronic equipment
US11429709B2 (en) * 2019-10-10 2022-08-30 Microchip Technology Incorporated Interfacing with a one-wire device that is in parallel with a low-impedance element, and related systems and devices
CN112666491B (en) * 2021-01-13 2023-08-22 联想长风科技(北京)有限公司 Method and system for detecting docking station of tablet personal computer

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5978927A (en) * 1996-03-05 1999-11-02 Dallas Semiconductor Corporation Method and system for measuring a maximum and minimum response time of a plurality of devices on a data bus and adapting the timing of read and write time slots
GB2411013B (en) * 2004-02-10 2006-05-31 Sendo Int Ltd Electronic device and methods of interrupting a processor therein
US7949802B2 (en) * 2006-12-08 2011-05-24 Nokia Corporation Enhanced communication via a serial interface
CN101320490A (en) * 2007-06-07 2008-12-10 鸿富锦精密工业(深圳)有限公司 Monitoring device for user mode of connector
US20090024764A1 (en) * 2007-07-18 2009-01-22 International Business Machines Corporation Tracking The Physical Location Of A Server In A Data Center
US7769940B2 (en) * 2008-02-13 2010-08-03 Belkin International, Inc. Switching device configured to couple a first computer to a first peripheral device and one or more second peripheral devices and method of manufacturing same
US8078223B2 (en) * 2008-07-25 2011-12-13 Lg Electronics Inc. Mobile terminal having expansion module and method of controlling operation of the mobile terminal
US8176214B2 (en) * 2008-10-31 2012-05-08 Silicon Image, Inc. Transmission of alternative content over standard device connectors
TW201104429A (en) 2009-07-28 2011-02-01 Io Interconnect Ltd Peripherals sharing system of integrated personal computer and method using the same
CN101989124B (en) * 2009-07-30 2012-10-03 艾欧互联有限公司 Peripheral device sharing system of integrated personal computer and method thereof
WO2011038211A1 (en) * 2009-09-25 2011-03-31 Analogix Semiconductor, Inc. Dual-mode data transfer of uncompressed multimedia contents or data communications
CN102243511B (en) * 2010-05-11 2015-04-01 宏正自动科技股份有限公司 Multicomputer management device and method
US9268728B2 (en) * 2012-07-02 2016-02-23 Htc Corporation Portable electronic device and accessory device thereof, and operating method for the portable electronic device

Also Published As

Publication number Publication date
US20150355679A1 (en) 2015-12-10
DE102013006162B4 (en) 2021-04-01
US9547337B2 (en) 2017-01-17
DE102013006162A1 (en) 2013-12-05
US9141141B2 (en) 2015-09-22
US8954628B2 (en) 2015-02-10
TWI475390B (en) 2015-03-01
US20150109727A1 (en) 2015-04-23
CN103473193B (en) 2016-08-03
US20130322010A1 (en) 2013-12-05
CN103473193A (en) 2013-12-25

Similar Documents

Publication Publication Date Title
TWI475390B (en) Portable device and peripheral extension dock
EP2597844B1 (en) Method and device for sharing micro-usb interface between earphone and usb
US8914555B2 (en) Methods, systems and apparatus for determining whether an accessory includes particular circuitry
US9274578B2 (en) Enable power from an accessory to a host device based on whether the accessory is able to alter an electrical characteristic of the power path
JP3959374B2 (en) USB interface system
AU2012101769B4 (en) Data structures for facilitating communication between a host device and an accessory
EP1150525B1 (en) Mobile communication terminal device
EP3206279A1 (en) Charging control method and device, power adapter, and mobile terminal
KR101682611B1 (en) Cable with circuitry for communicating performance information
CN106445858B (en) Information processing method, information processing module and electronic equipment
JP2010251859A (en) Mobile terminal
TW201403339A (en) Portable electronic device and accessory device thereof, and operating method for the portable electronic device
JP2018013932A (en) Electronic apparatus
JP6995557B2 (en) Relay device, receiver device, and transmission system using them
JP2002116853A (en) Usb mounted electronic equipment and use cable to be used therefor
CN202694335U (en) Circuit device capable of sharing universal serial bus (USB) interface and universal asynchronous receiver transmitter (UART) interface
CN111400225B (en) USB switching circuit
CN103311766A (en) Mobile equipment switching device and working mode switching method thereof
JP2015159415A (en) optical cable
CN113347508A (en) External device communication circuit, external device communication connection method and intelligent terminal device
JP4376838B2 (en) Equipment with communication function
KR100598056B1 (en) Terminal with USB memory device and its embodying method
CN114070665A (en) MBUS host communication circuit, method, device and medium thereof
JP2011128835A (en) Power supply control method of communication network device, and communication network device
JP2014085821A (en) Usb apparatus