TW201915765A - Electronic apparatus - Google Patents

Electronic apparatus Download PDF

Info

Publication number
TW201915765A
TW201915765A TW106133252A TW106133252A TW201915765A TW 201915765 A TW201915765 A TW 201915765A TW 106133252 A TW106133252 A TW 106133252A TW 106133252 A TW106133252 A TW 106133252A TW 201915765 A TW201915765 A TW 201915765A
Authority
TW
Taiwan
Prior art keywords
master
mode
electronic device
slave mode
transmission path
Prior art date
Application number
TW106133252A
Other languages
Chinese (zh)
Other versions
TWI630484B (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 TW106133252A priority Critical patent/TWI630484B/en
Application granted granted Critical
Publication of TWI630484B publication Critical patent/TWI630484B/en
Publication of TW201915765A publication Critical patent/TW201915765A/en

Links

Abstract

An electronic apparatus including a processor, at least one peripheral device, a first USB port and a host-slave mode switching module is provided. The first USB port is configured to be coupled to a first external apparatus. The host-slave mode switching module is coupled to the processor, the first USB port and the at least one peripheral device. When the electronic apparatus operates in a first mode, the host-slave mode switching module is set to operates in a slave mode, the host-slave mode switching module sets the first external apparatus to operates in a host mode, and the host-slave mode switching module turns on a transmission path between the first USB port and the at least one peripheral device, such that the first external apparatus implements data transmission with the at least one peripheral device through the transmission path.

Description

電子裝置Electronic device

本發明是有關於一種電子裝置,且特別是有關於一種具備主從角色切換功能的電子裝置。The present invention relates to an electronic device, and more particularly to an electronic device having a master-slave role switching function.

一般來說,行動裝置(例如手機或平板電腦)通常具有通用序列匯流排(Universal Serial Bus,或稱USB)埠,用以與其他電子裝置(例如鍵盤、滑鼠或隨身碟等等)的USB接頭相耦接以進行資料傳輸。由於上述行動裝置的USB埠與其他電子裝置的USB接頭的規格可能不同,導致上述行動裝置的USB埠須透過額外的USB轉接頭方能與其他電子裝置的USB接頭插接。除此之外,由於行動裝置的輕薄化已成趨勢,致使其通常僅具有一個USB埠,故此行動裝置須透過USB集線器(Hub)方能同時外接多個USB電子裝置。上述的種種情況皆導致此行動裝置在使用上受到侷限。In general, mobile devices (such as mobile phones or tablets) usually have a universal serial bus (USB), which is used for USB with other electronic devices (such as keyboard, mouse or flash drive, etc.). The connectors are coupled for data transfer. Since the USB port of the mobile device may be different from the USB connector of other electronic devices, the USB of the mobile device cannot be plugged into the USB connector of other electronic devices through an additional USB adapter. In addition, since the thinness of the mobile device has become a trend, so that it usually has only one USB port, the mobile device must be connected to a plurality of USB electronic devices through a USB hub. All of the above situations have led to the limitation of the use of this mobile device.

另外,使用者也可分別下載特定的應用程式及驅動程式至行動裝置及個人電腦(或筆記型電腦),並透過個人電腦(或筆記型電腦)的無線網路介面使用鍵盤及滑鼠來控制行動裝置,如此一來,行動裝置無須透過USB集線器即可同時受控於鍵盤及滑鼠。然而,上述的應用程式可能會有相容性的問題而無法支援所有的行動裝置,導致此行動裝置在使用上依舊受限。In addition, users can download specific applications and drivers to mobile devices and personal computers (or laptops), and use the keyboard and mouse to control the wireless network interface of a personal computer (or laptop). The mobile device, in this way, the mobile device can be controlled by both the keyboard and the mouse without the need of a USB hub. However, the above application may have compatibility problems and cannot support all mobile devices, resulting in the limited use of this mobile device.

有鑑於此,本發明提供一種具備主從角色切換功能的電子裝置。透過電子裝置的主從角色的切換運作,致使外部裝置可透過電子裝置的通用序列匯流排埠而與電子裝置的至少一周邊裝置進行資料傳輸,以提高外部裝置及電子裝置在使用上的彈性。In view of the above, the present invention provides an electronic device having a master-slave role switching function. Through the switching operation of the master-slave role of the electronic device, the external device can transmit data to at least one peripheral device of the electronic device through the universal serial bus bar of the electronic device, so as to improve the flexibility of the use of the external device and the electronic device.

本發明的電子裝置包括處理器、至少一周邊裝置、第一通用序列匯流排埠以及主從模式切換模組。第一通用序列匯流排埠用以耦接第一外部裝置。主從模式切換模組耦接處理器、第一通用序列匯流排埠以及上述至少一周邊裝置。當電子裝置運作於第一模式時,主從模式切換模組被設定為從屬模式,主從模式切換模組將第一外部裝置設定為主要模式,並導通第一通用序列匯流排埠與上述至少一周邊裝置之間的傳輸路徑,致使第一外部裝置與上述至少一周邊裝置透過此傳輸路徑進行資料傳輸。The electronic device of the present invention comprises a processor, at least one peripheral device, a first universal sequence bus bar, and a master-slave mode switching module. The first universal sequence bus bar is configured to couple the first external device. The master-slave mode switching module is coupled to the processor, the first universal sequence bus, and the at least one peripheral device. When the electronic device operates in the first mode, the master-slave mode switching module is set to the slave mode, and the master-slave mode switching module sets the first external device as the master mode, and turns on the first universal sequence bus bar and the at least A transmission path between the peripheral devices causes the first external device and the at least one peripheral device to transmit data through the transmission path.

基於上述,本發明的電子裝置中的主從模式切換模組具備主從角色切換功能。透過主從模式切換模組的主從角色的切換運作,可讓耦接在電子裝置的第一通用序列匯流排埠的第一外部裝置可與電子裝置的周邊裝置進行資料傳輸。如此一來,第一外部裝置及電子裝置無須安裝特定的應用程式及驅動程式,即可讓使用者利用電子裝置的周邊裝置來操控第一外部裝置,或可讓使用者透過第一外部裝置來存取電子裝置的周邊裝置的資料,因此可提高第一外部裝置及電子裝置在使用上的彈性。Based on the above, the master-slave mode switching module in the electronic device of the present invention has a master-slave role switching function. The switching operation of the master-slave role of the master-slave mode switching module allows the first external device coupled to the first universal sequence bus of the electronic device to perform data transmission with the peripheral device of the electronic device. In this way, the first external device and the electronic device can be used by the user to control the first external device by using the peripheral device of the electronic device without installing a specific application and driver, or can be used by the user through the first external device. By accessing the data of the peripheral devices of the electronic device, the flexibility of the first external device and the electronic device can be improved.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.

為了使本發明之內容可以被更容易明瞭,以下特舉實施例做為本發明確實能夠據以實施的範例。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件,係代表相同或類似部件。In order to make the content of the present invention easier to understand, the following specific embodiments are examples of the invention that can be implemented. In addition, wherever possible, the same reference numerals in the FIGS.

以下請參照圖1,圖1是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。在本發明的一實施例中,電子裝置100可例如是個人電腦或筆記型電腦,但本發明並不以此為限。電子裝置100可包括處理器110、至少一周邊裝置130、第一通用序列匯流排埠150以及主從模式切換模組170,但本發明不限於此。在本發明的一實施例中,周邊裝置130可例如是內建在電子裝置100的滑鼠、鍵盤及儲存裝置等等的至少其中之一,但本發明並不以此為限。第一通用序列匯流排埠150用以耦接第一外部裝置910,其中第一外部裝置910可例如是手機裝置、平板電腦或掌上型電腦等等,但本發明並不以此為限。主從模式切換模組170耦接處理器110、第一通用序列匯流排埠150及周邊裝置130。主從模式切換模組170具備主從角色切換功能,以及可導通或斷開處理器110、第一通用序列匯流排埠150與周邊裝置130之間的多條傳輸路徑。Referring to FIG. 1 , FIG. 1 is a circuit block diagram of an electronic device according to an embodiment of the invention. In an embodiment of the invention, the electronic device 100 can be, for example, a personal computer or a notebook computer, but the invention is not limited thereto. The electronic device 100 may include the processor 110, at least one peripheral device 130, the first universal serial bus bar 150, and the master-slave mode switching module 170, but the invention is not limited thereto. In an embodiment of the present invention, the peripheral device 130 can be, for example, at least one of a mouse, a keyboard, a storage device, and the like built in the electronic device 100, but the invention is not limited thereto. The first universal sequence bus 150 is configured to be coupled to the first external device 910. The first external device 910 can be, for example, a mobile phone device, a tablet computer, a palmtop computer, or the like, but the invention is not limited thereto. The master-slave mode switching module 170 is coupled to the processor 110, the first universal sequence bus bar 150, and the peripheral device 130. The master-slave mode switching module 170 has a master-slave role switching function, and can turn on or off the processor 110, multiple transmission paths between the first universal sequence bus bar 150 and the peripheral device 130.

詳細來說,在本發明的一實施例中,電子裝置100可運作於第一模式及第二模式,但本發明不限於此。當電子裝置100運作於第一模式時,主從模式切換模組170被設定為從屬模式(slave mode),主從模式切換模組170可將第一外部裝置910設定為主要模式(host mode),並導通第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1,致使第一外部裝置910與周邊裝置130可透過傳輸路徑PH1進行資料傳輸。除此之外,當電子裝置100運作於第一模式時,主從模式切換模組170可斷開處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2,以及斷開處理器110與周邊裝置130之間的傳輸路徑PH3,其中傳輸路徑PH1、PH2及PH3為通用序列匯流排傳輸路徑。In detail, in an embodiment of the invention, the electronic device 100 can operate in the first mode and the second mode, but the invention is not limited thereto. When the electronic device 100 operates in the first mode, the master-slave mode switching module 170 is set to a slave mode, and the master-slave mode switching module 170 can set the first external device 910 to a master mode. And turning on the transmission path PH1 between the first universal sequence bus 150 and the peripheral device 130, so that the first external device 910 and the peripheral device 130 can transmit data through the transmission path PH1. In addition, when the electronic device 100 operates in the first mode, the master-slave mode switching module 170 can disconnect the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150, and disconnect the processor. The transmission path PH3 between the 110 and the peripheral device 130, wherein the transmission paths PH1, PH2, and PH3 are general-purpose serial bus transmission paths.

另一方面,當電子裝置100運作於第二模式時,主從模式切換模組170被設定為主要模式,主從模式切換模組170將第一外部裝置910設定為從屬模式,主從模式切換模組170導通處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2以及處理器110與周邊裝置130之間的傳輸路徑PH3,且主從模式切換模組170斷開第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1。於第二模式下,處理器110可分別與第一外部裝置910及周邊裝置130進行資料傳輸。On the other hand, when the electronic device 100 operates in the second mode, the master-slave mode switching module 170 is set to the master mode, and the master-slave mode switching module 170 sets the first external device 910 to the slave mode, and the master-slave mode switches. The module 170 turns on the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150 and the transmission path PH3 between the processor 110 and the peripheral device 130, and the master-slave mode switching module 170 disconnects the first universal The transmission path PH1 between the sequence bus 150 and the peripheral device 130. In the second mode, the processor 110 can perform data transmission with the first external device 910 and the peripheral device 130, respectively.

更進一步來說,當使用者將第一外部裝置910插接至第一通用序列匯流排埠150時,電子裝置100是運作在第二模式,故主從模式切換模組170為主要模式(亦即做為USB host),而第一外部裝置910及周邊裝置130皆為從屬模式(亦即做為USB slave)。此時,處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2以及處理器110與周邊裝置130之間的傳輸路徑PH3為導通狀態,而第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1則為斷開狀態。Further, when the user inserts the first external device 910 into the first universal serial bus 埠 150, the electronic device 100 operates in the second mode, so the master-slave mode switching module 170 is the main mode (also That is, as the USB host), the first external device 910 and the peripheral device 130 are in the slave mode (that is, as a USB slave). At this time, the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150 and the transmission path PH3 between the processor 110 and the peripheral device 130 are in an on state, and the first universal sequence bus 埠 150 and the periphery The transmission path PH1 between the devices 130 is in an off state.

當使用者欲利用周邊裝置130(例如滑鼠或鍵盤)來操控第一外部裝置910,或是利用第一外部裝置910來存取周邊裝置130(例如儲存裝置)的資料時,使用者可將電子裝置100切換至第一模式。當電子裝置100切換至第一模式時,主從模式切換模組170被切換為從屬模式(亦即做為USB slave),而第一外部裝置910則切換為主要模式(亦即做為USB host)。此時,處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2以及處理器110與周邊裝置130之間的傳輸路徑PH3會被斷開,而第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1則被導通。如此一來,使用者即可透過周邊裝置130(例如滑鼠或鍵盤)來控制第一外部裝置910,或者是,使用者可透過第一外部裝置910來存取周邊裝置130(例如儲存裝置)的資料。When the user wants to use the peripheral device 130 (such as a mouse or a keyboard) to manipulate the first external device 910, or the first external device 910 to access the data of the peripheral device 130 (such as the storage device), the user can The electronic device 100 switches to the first mode. When the electronic device 100 switches to the first mode, the master-slave mode switching module 170 is switched to the slave mode (ie, as a USB slave), and the first external device 910 is switched to the master mode (ie, as a USB host). ). At this time, the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150 and the transmission path PH3 between the processor 110 and the peripheral device 130 are disconnected, and the first universal sequence bus 埠 150 and The transmission path PH1 between the peripheral devices 130 is turned on. In this way, the user can control the first external device 910 through the peripheral device 130 (such as a mouse or a keyboard), or the user can access the peripheral device 130 (eg, the storage device) through the first external device 910. data of.

以下請參照圖2,圖2是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。如圖2所示,電子裝置200同樣可包括處理器110、周邊裝置230、第一通用序列匯流排埠150以及主從模式切換模組170,但本發明不限於此。圖2所示的處理器110、第一通用序列匯流排埠150以及主從模式切換模組170的實施方式及運作分別類似於圖1的處理器110、第一通用序列匯流排埠150以及主從模式切換模組170,故可參酌上述圖1的相關說明,在此不再贅述。以下將針對周邊裝置230進行說明。Referring to FIG. 2, FIG. 2 is a circuit block diagram of an electronic device according to an embodiment of the invention. As shown in FIG. 2, the electronic device 200 may also include the processor 110, the peripheral device 230, the first universal serial bus bar 150, and the master-slave mode switching module 170, but the invention is not limited thereto. The implementation and operation of the processor 110, the first universal sequence bus 埠 150, and the master-slave mode switching module 170 shown in FIG. 2 are similar to the processor 110 of FIG. 1, the first universal sequence bus 埠 150, and the main The mode switching module 170 is used, so that the related description of FIG. 1 can be referred to, and details are not described herein again. The peripheral device 230 will be described below.

周邊裝置230可包括通用序列匯流排埠集線器231(即USB集線器231)以及多個第二通用序列匯流排埠。然為了方便說明及圖式簡潔起見,圖2僅繪示三個第二通用序列匯流排埠232~234,但本發明並不以此為限。第二通用序列匯流排埠232~234分別耦接第二外部裝置922~924。本發明的一實施例中,第二外部裝置922~924可例如是電子裝置200外接的滑鼠、鍵盤及隨身碟等等,但本發明並不以此為限。The peripheral device 230 can include a universal serial bus bar hub 231 (ie, a USB hub 231) and a plurality of second universal sequence bus bars. For the sake of convenience of description and simplicity of the drawing, FIG. 2 only shows three second general-purpose serial bus bars 232-234, but the invention is not limited thereto. The second universal sequence bus bars 232-234 are respectively coupled to the second external devices 922-924. In an embodiment of the present invention, the second external device 922 924 can be, for example, a mouse, a keyboard, a flash drive, and the like externally connected to the electronic device 200, but the invention is not limited thereto.

通用序列匯流排埠集線器231耦接在第二通用序列匯流排埠232~234與主從模式切換模組170之間。當電子裝置200運作於第一模式時,第一外部裝置910與第二外部裝置922~924可透過第一通用序列匯流排埠150與周邊裝置之間230的傳輸路徑PH1及通用序列匯流排埠集線器231進行資料傳輸。The universal serial bus hub 231 is coupled between the second universal sequence bus 埠 232 234 and the master-slave mode switching module 170. When the electronic device 200 operates in the first mode, the first external device 910 and the second external device 922-924 can transmit the transmission path PH1 and the universal serial bus arrangement between the first universal serial bus bar 150 and the peripheral device 230. The hub 231 performs data transmission.

舉例來說,當使用者欲利用第二外部裝置922~923 (例如滑鼠或鍵盤)來操控第一外部裝置910,或是利用第一外部裝置910來存取第二外部裝置924 (例如隨身碟)的資料時,使用者可將電子裝置200設定為第一模式。當電子裝置200切換至第一模式時,主從模式切換模組170被切換為從屬模式,而第一外部裝置910則切換為主要模式。此時,處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2以及處理器110與周邊裝置130之間的傳輸路徑PH3會被斷開,而第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1則被導通。如此一來,使用者即可透過第二外部裝置922~923 (例如滑鼠或鍵盤)來操控第一外部裝置910,或者是,使用者可透過第一外部裝置910來存取第二外部裝置924 (例如隨身碟)的資料。For example, when the user wants to use the second external device 922~923 (such as a mouse or a keyboard) to operate the first external device 910, or use the first external device 910 to access the second external device 924 (such as portable When the data of the disc is used, the user can set the electronic device 200 to the first mode. When the electronic device 200 switches to the first mode, the master-slave mode switching module 170 is switched to the slave mode, and the first external device 910 is switched to the master mode. At this time, the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150 and the transmission path PH3 between the processor 110 and the peripheral device 130 are disconnected, and the first universal sequence bus 埠 150 and The transmission path PH1 between the peripheral devices 130 is turned on. In this way, the user can control the first external device 910 through the second external device 922~923 (such as a mouse or a keyboard), or the user can access the second external device through the first external device 910. Information on 924 (such as a pen drive).

以下請參照圖3,圖3是依照本發明一實施例所繪示的主從模式切換模組的電路方塊示意圖,可應用於圖1及圖2的電子裝置100及200。但為了便於說明,以下將以圖3的主從模式切換模組170搭配圖1的電子裝置100為範例進行說明,而圖3的主從模式切換模組170搭配圖2的電子裝置200的運作則可類推得知。如圖3所示,主從模式切換模組170可包括控制電路371、主從模式切換晶片373以及切換模組375,但本發明不限於此。控制電路371用以根據模式信號MS以產生控制信號CS,其中模式信號MS可用以表示電子裝置100是運作在第一模式或第二模式。Please refer to FIG. 3 . FIG. 3 is a circuit block diagram of a master-slave mode switching module according to an embodiment of the invention, which can be applied to the electronic devices 100 and 200 of FIGS. 1 and 2 . For convenience of description, the following is an example in which the master-slave mode switching module 170 of FIG. 3 is combined with the electronic device 100 of FIG. 1 , and the master-slave mode switching module 170 of FIG. 3 is combined with the operation of the electronic device 200 of FIG. 2 . Then you can learn from analogy. As shown in FIG. 3, the master-slave mode switching module 170 may include a control circuit 371, a master-slave mode switching chip 373, and a switching module 375, but the invention is not limited thereto. The control circuit 371 is configured to generate a control signal CS according to the mode signal MS, wherein the mode signal MS can be used to indicate that the electronic device 100 is operating in the first mode or the second mode.

主從模式切換晶片373耦接第一通用序列匯流排埠150及控制電路371,其中主從模式切換晶片373具有主要模式及從屬模式,且主從模式切換晶片373可受控於控制信號CS而運作於主要模式與從屬模式的其中一者。切換模組375耦接主從模式切換晶片373、處理器110、周邊裝置130及控制電路371,其中切換模組375受控於控制信號CS而導通第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1,或是導通處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2及處理器110與周邊裝置130之間的傳輸路徑PH3。The master-slave mode switching chip 373 is coupled to the first general-purpose sequence bus bar 150 and the control circuit 371, wherein the master-slave mode switching chip 373 has a master mode and a slave mode, and the master-slave mode switching chip 373 can be controlled by the control signal CS. Operates in one of the main mode and the subordinate mode. The switching module 375 is coupled to the master-slave mode switching chip 373, the processor 110, the peripheral device 130, and the control circuit 371. The switching module 375 is controlled by the control signal CS to turn on the first universal sequence bus bar 150 and the peripheral device 130. The transmission path PH1 is between the transmission path PH2 between the processor 110 and the first universal sequence bus 150 and the transmission path PH3 between the processor 110 and the peripheral device 130.

詳細來說,當模式信號MS表示電子裝置100運作於第一模式時,主從模式切換晶片373受控於控制信號CS而運作於從屬模式並設定第一外部裝置910運作於主要模式,且切換模組375反應於控制信號CS而導通第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1,並斷開處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2及處理器110與周邊裝置130之間的傳輸路徑PH3。In detail, when the mode signal MS indicates that the electronic device 100 is operating in the first mode, the master-slave mode switching chip 373 is controlled by the control signal CS to operate in the slave mode and sets the first external device 910 to operate in the master mode, and switches The module 375 is responsive to the control signal CS to turn on the transmission path PH1 between the first universal sequence bus 埠 150 and the peripheral device 130, and disconnects the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150. And a transmission path PH3 between the processor 110 and the peripheral device 130.

當模式信號MS表示電子裝置100運作於第二模式時,主從模式切換晶片373受控於控制信號CS而運作於主要模式並設定第一外部裝置910運作於從屬模式,且切換模組375反應於控制信號CS而斷開第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1,並導通處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2及處理器110與周邊裝置130之間的傳輸路徑PH3。When the mode signal MS indicates that the electronic device 100 is operating in the second mode, the master-slave mode switching chip 373 is controlled by the control signal CS to operate in the main mode and sets the first external device 910 to operate in the slave mode, and the switching module 375 reacts Disconnecting the transmission path PH1 between the first universal sequence bus 埠 150 and the peripheral device 130 at the control signal CS, and turning on the transmission path PH2 between the processor 110 and the first universal sequence bus 埠 150 and the processor 110 A transmission path PH3 with the peripheral device 130.

在本發明的一實施例中,切換模組375可包括第一切換電路SW1及第二切換電路SW2。第一切換電路SW1具有第一端E11、第二端E12、第三端E13以及控制端E14。第一切換電路SW1的第一端E11耦接主從模式切換晶片373。第一切換電路SW1的第二端E12耦接處理器110。第一切換電路SW1的控制端E14接收控制信號CS。第二切換電路SW2具有第一端E21、第二端E22、第三端E23以及控制端E24。第二切換電路SW2的第一端E21耦接周邊裝置130。第二切換電路SW2的第二端E22耦接處理器110。第二切換電路SW2的第三端E23與第一切換電路SW1的第三端E13相耦接。第二切換電路SW2的控制端E24接收控制信號CS。In an embodiment of the invention, the switching module 375 can include a first switching circuit SW1 and a second switching circuit SW2. The first switching circuit SW1 has a first end E11, a second end E12, a third end E13, and a control end E14. The first end E11 of the first switching circuit SW1 is coupled to the master-slave mode switching chip 373. The second end E12 of the first switching circuit SW1 is coupled to the processor 110. The control terminal E14 of the first switching circuit SW1 receives the control signal CS. The second switching circuit SW2 has a first end E21, a second end E22, a third end E23, and a control end E24. The first end E21 of the second switching circuit SW2 is coupled to the peripheral device 130. The second end E22 of the second switching circuit SW2 is coupled to the processor 110. The third end E23 of the second switching circuit SW2 is coupled to the third end E13 of the first switching circuit SW1. The control terminal E24 of the second switching circuit SW2 receives the control signal CS.

當模式信號MS表示電子裝置100運作於第一模式時,第一切換電路SW1會反應於控制信號CS而將第一端E11電性連接至第三端E13,且第二切換電路SW2會反應於控制信號CS而將第一端E21電性連接至第三端E23,從而導通第一通用序列匯流排埠150與周邊裝置130之間的傳輸路徑PH1。相對地,當模式信號MS表示電子裝置100運作於第二模式時,第一切換電路SW1會反應於控制信號CS而將第一端E11電性連接至第二端E12,且第二切換電路SW2會反應於控制信號CS而將第一端E21電性連接至第二端E22,從而導通處理器110與第一通用序列匯流排埠150之間的傳輸路徑PH2以及處理器110與周邊裝置130之間的傳輸路徑PH3。When the mode signal MS indicates that the electronic device 100 is operating in the first mode, the first switching circuit SW1 is electrically coupled to the control signal CS to electrically connect the first end E11 to the third end E13, and the second switching circuit SW2 is responsive to The control signal CS electrically connects the first end E21 to the third end E23, thereby turning on the transmission path PH1 between the first universal sequence bus bar 150 and the peripheral device 130. In contrast, when the mode signal MS indicates that the electronic device 100 is operating in the second mode, the first switching circuit SW1 is electrically coupled to the control signal CS to electrically connect the first end E11 to the second end E12, and the second switching circuit SW2 The first end E21 is electrically connected to the second end E22 in response to the control signal CS, thereby turning on the transmission path PH2 between the processor 110 and the first universal sequence bus bar 150 and the processor 110 and the peripheral device 130. The transmission path between PH3.

在本發明的一實施例中,控制電路371可以是硬體、韌體或是儲存在記憶體而由微控制器或微處理器所載入執行的軟體或機器可執行的程式碼。若是採用硬體來實現,則控制電路371可以是由單一整合電路晶片所達成,也可以由多個電路晶片所完成,但本發明並不以此為限。上述多個電路晶片或單一整合電路晶片可採用特殊功能積體電路(Application-specific integrated circuit,簡稱ASIC)或可規劃邏輯元件PLD(Programmable Logic Device,簡稱PLD)或可程式化邏輯閘陣列(Field Programmable Gate Array,簡稱FPGA)來實現。而上述記憶體可以是例如隨機存取記憶體、唯讀記憶體或是快閃記憶體等等。In an embodiment of the invention, the control circuit 371 can be a hardware, a firmware, or a software or machine executable code stored in a memory and loaded by a microcontroller or microprocessor. If implemented by hardware, the control circuit 371 can be implemented by a single integrated circuit chip, or can be completed by multiple circuit chips, but the invention is not limited thereto. The plurality of circuit chips or the single integrated circuit chip may be an Application-specific Integrated Circuit (ASIC) or a Programmable Logic Device (PLD) or a Programmable Logic Gate Array (Field). Programmable Gate Array (FPGA) is used to implement. The above memory may be, for example, a random access memory, a read only memory, or a flash memory.

在本發明的一實施例中,主從模式切換晶片373可採用符合USB電力供應(Power Delivery,簡稱PD)規範的電力供應晶片來實現,但本發明不限於此。在本發明的一實施例中,第一切換電路SW1及第二切換電路SW2可採用開關電路或多工電路來實現,但本發明不限於此。In an embodiment of the present invention, the master-slave mode switching chip 373 may be implemented using a power supply chip conforming to the USB Power Delivery (PD) specification, but the invention is not limited thereto. In an embodiment of the invention, the first switching circuit SW1 and the second switching circuit SW2 may be implemented by using a switching circuit or a multiplexing circuit, but the invention is not limited thereto.

以下請參照圖4,圖4是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。如圖4所示,電子裝置400可包括處理器110、周邊裝置130、第一通用序列匯流排埠150、主從模式切換模組170、按鈕模組190及電池模組120,但本發明不限於此。圖4所示的處理器110、第一通用序列匯流排埠150以及主從模式切換模組170的實施方式及運作分別類似於圖1的處理器110、第一通用序列匯流排埠150以及圖3的主從模式切換模組170,故可參酌上述圖1及圖3的相關說明,在此不再贅述。以下將分別針對按鈕模組190及電池模組120進行說明。Referring to FIG. 4, FIG. 4 is a circuit block diagram of an electronic device according to an embodiment of the invention. As shown in FIG. 4, the electronic device 400 can include a processor 110, a peripheral device 130, a first universal serial bus bar 150, a master-slave mode switching module 170, a button module 190, and a battery module 120, but the present invention does not Limited to this. The implementation and operation of the processor 110, the first universal sequence bus 埠 150, and the master-slave mode switching module 170 shown in FIG. 4 are similar to the processor 110 of FIG. 1, the first universal sequence bus 埠 150, and the diagram, respectively. The master-slave mode switching module 170 of 3 can refer to the related descriptions of FIG. 1 and FIG. 3 above, and details are not described herein again. The button module 190 and the battery module 120 will be described below.

按鈕模組190耦接控制電路371。按鈕模組190可用來設定電子裝置400的運作模式並據以產生模式信號MS。可以理解的是,使用者可透過按鈕模組190來設定電子裝置400的運作模式,其中電子裝置400的運作模式可包括上述的第一模式及第二模式,但本發明不限於此。在本發明的其他實施例中,電子裝置400的運作模式還可包括充電模式及供電模式,關於電子裝置400的充電模式及供電模式的運作說明如下。The button module 190 is coupled to the control circuit 371. The button module 190 can be used to set an operation mode of the electronic device 400 and generate a mode signal MS accordingly. It can be understood that the operation mode of the electronic device 400 can be set by the user through the button module 190. The operation mode of the electronic device 400 can include the first mode and the second mode described above, but the invention is not limited thereto. In other embodiments of the present invention, the operation mode of the electronic device 400 may further include a charging mode and a power supply mode. The operation of the charging mode and the power supply mode of the electronic device 400 are described below.

電池模組120耦接主從模式切換晶片373。當模式信號MS表示電子裝置400運作於充電模式時,主從模式切換晶片373可根據控制信號CS而設定第一外部裝置910對電池模組120進行充電。相對地,當模式信號MS表示電子裝置400運作於供電模式時,主從模式切換晶片373可根據控制信號而設定電池模組120對第一外部裝置910進行充電。如此一來,使用者可透過按鈕模組190來設定電子裝置400對第一外部裝置910充電,或是設定第一外部裝置910對電子裝置400充電。The battery module 120 is coupled to the master-slave mode switching chip 373. When the mode signal MS indicates that the electronic device 400 is operating in the charging mode, the master-slave mode switching chip 373 can set the first external device 910 to charge the battery module 120 according to the control signal CS. In contrast, when the mode signal MS indicates that the electronic device 400 is operating in the power supply mode, the master-slave mode switching chip 373 can set the battery module 120 to charge the first external device 910 according to the control signal. In this way, the user can set the electronic device 400 to charge the first external device 910 through the button module 190 or set the first external device 910 to charge the electronic device 400.

綜上所述,本發明實施例的電子裝置中的主從模式切換模組具備主從角色切換功能。透過主從模式切換模組的主從角色的切換運作,可讓耦接在電子裝置的第一通用序列匯流排埠的第一外部裝置可與電子裝置的周邊裝置進行資料傳輸。如此一來,第一外部裝置及電子裝置無須安裝特定的應用程式及驅動程式,即可讓使用者利用電子裝置的周邊裝置來操控第一外部裝置,或可讓使用者透過第一外部裝置來存取電子裝置的周邊裝置的資料,因此可提高第一外部裝置及電子裝置在使用上的彈性。In summary, the master-slave mode switching module in the electronic device of the embodiment of the invention has a master-slave role switching function. The switching operation of the master-slave role of the master-slave mode switching module allows the first external device coupled to the first universal sequence bus of the electronic device to perform data transmission with the peripheral device of the electronic device. In this way, the first external device and the electronic device can be used by the user to control the first external device by using the peripheral device of the electronic device without installing a specific application and driver, or can be used by the user through the first external device. By accessing the data of the peripheral devices of the electronic device, the flexibility of the first external device and the electronic device can be improved.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

100、200、400‧‧‧電子裝置100, 200, 400‧‧‧ electronic devices

110‧‧‧處理器110‧‧‧ processor

120‧‧‧電池模組120‧‧‧Battery module

130、230‧‧‧周邊裝置130, 230‧‧‧ peripheral devices

150‧‧‧第一通用序列匯流排埠150‧‧‧First Universal Sequence Bus 埠

170‧‧‧主從模式切換模組170‧‧‧Master-slave mode switching module

190‧‧‧按鈕模組190‧‧‧ button module

231‧‧‧USB集線器231‧‧‧USB hub

232、233、234‧‧‧第二通用序列匯流排埠232, 233, 234‧‧‧ second universal sequence bus

371‧‧‧控制電路371‧‧‧Control circuit

373‧‧‧主從模式切換晶片373‧‧‧Master-slave mode switching chip

375‧‧‧切換模組375‧‧‧Switch Module

910‧‧‧第一外部裝置910‧‧‧First external device

922、923、924‧‧‧第二外部裝置922, 923, 924‧‧‧ second external device

CS‧‧‧控制信號CS‧‧‧Control signal

E11、E21‧‧‧第一端E11, E21‧‧‧ first end

E12、E22‧‧‧第二端E12, E22‧‧‧ second end

E13、E23‧‧‧第三端E13, E23‧‧‧ third end

E14、E24‧‧‧控制端E14, E24‧‧‧ control terminal

MS‧‧‧模式信號MS‧‧‧ mode signal

PH1、PH2、PH3‧‧‧傳輸路徑PH1, PH2, PH3‧‧‧ transmission path

SW1‧‧‧第一切換電路SW1‧‧‧ first switching circuit

SW2‧‧‧第二切換電路SW2‧‧‧Second switching circuit

下面的所附圖式是本發明的說明書的一部分,繪示了本發明的示例實施例,所附圖式與說明書的描述一起說明本發明的原理。 圖1是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。 圖2是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。 圖3是依照本發明一實施例所繪示的主從模式切換模組的電路方塊示意圖。 圖4是依照本發明一實施例所繪示的電子裝置的電路方塊示意圖。The following drawings are a part of the specification of the invention, and illustrate the embodiments of the invention FIG. 1 is a circuit block diagram of an electronic device according to an embodiment of the invention. 2 is a circuit block diagram of an electronic device according to an embodiment of the invention. FIG. 3 is a circuit block diagram of a master-slave mode switching module according to an embodiment of the invention. FIG. 4 is a circuit block diagram of an electronic device according to an embodiment of the invention.

Claims (10)

一種電子裝置,包括: 一處理器; 至少一周邊裝置; 一第一通用序列匯流排埠,用以耦接一第一外部裝置;以及 一主從模式切換模組,耦接該處理器、該第一通用序列匯流排埠及該至少一周邊裝置,其中當該電子裝置運作於一第一模式時,該主從模式切換模組被設定為一從屬模式,該主從模式切換模組將該第一外部裝置設定為一主要模式,並導通該第一通用序列匯流排埠與該至少一周邊裝置之間的一傳輸路徑,致使該第一外部裝置與該至少一周邊裝置透過該傳輸路徑進行資料傳輸。An electronic device, comprising: a processor; at least one peripheral device; a first universal sequence bus bar for coupling a first external device; and a master-slave mode switching module coupled to the processor, the a first general-purpose sequence bus and the at least one peripheral device, wherein when the electronic device operates in a first mode, the master-slave mode switching module is set to a slave mode, and the master-slave mode switching module The first external device is set to a main mode, and a transmission path between the first universal sequence bus bar and the at least one peripheral device is turned on, so that the first external device and the at least one peripheral device pass through the transmission path. Data transmission. 如申請專利範圍第1項所述的電子裝置,其中當該電子裝置運作於該第一模式時,該主從模式切換模組斷開該處理器與該第一通用序列匯流排埠之間的一傳輸路徑,以及斷開該處理器與該至少一周邊裝置之間的一傳輸路徑。The electronic device of claim 1, wherein the master-slave mode switching module disconnects between the processor and the first universal sequence bus when the electronic device operates in the first mode a transmission path, and disconnecting a transmission path between the processor and the at least one peripheral device. 如申請專利範圍第1項所述的電子裝置,其中當該電子裝置運作於一第二模式時,該主從模式切換模組被設定為一主要模式,該主從模式切換模組將該第一外部裝置設定為一從屬模式,該主從模式切換模組導通該處理器與該第一通用序列匯流排埠之間的一傳輸路徑以及該處理器與該至少一周邊裝置之間的一傳輸路徑,且該主從模式切換模組斷開該第一通用序列匯流排埠與該至少一周邊裝置之間的該傳輸路徑,致使該處理器分別與該第一外部裝置及該至少一周邊裝置進行資料傳輸。The electronic device of claim 1, wherein when the electronic device operates in a second mode, the master-slave mode switching module is set to a main mode, and the master-slave mode switching module An external device is set to a slave mode, and the master-slave mode switching module turns on a transmission path between the processor and the first universal sequence bus and a transmission between the processor and the at least one peripheral device a path, and the master-slave mode switching module disconnects the transmission path between the first universal sequence bus and the at least one peripheral device, so that the processor and the first external device and the at least one peripheral device respectively Data transfer. 如申請專利範圍第1項所述的電子裝置,其中該至少一周邊裝置包括: 多個第二通用序列匯流排埠,用以耦接多個第二外部裝置;以及 一通用序列匯流排埠集線器,耦接在該些第二通用序列匯流排埠與該主從模式切換模組之間, 其中當該電子裝置運作於該第一模式時,該第一外部裝置與該些第二外部裝置透過該傳輸路徑及該通用序列匯流排埠集線器進行資料傳輸。The electronic device of claim 1, wherein the at least one peripheral device comprises: a plurality of second universal serial busbars for coupling a plurality of second external devices; and a universal serial busbar hub Between the second universal sequence bus and the master-slave mode switching module, wherein the first external device and the second external device pass through when the electronic device operates in the first mode The transmission path and the universal sequence bus hub perform data transmission. 如申請專利範圍第1項所述的電子裝置,其中該主從模式切換模組包括: 一控制電路,用以根據一模式信號以產生一控制信號; 一主從模式切換晶片,耦接該第一通用序列匯流排埠及該控制電路,其中該主從模式切換晶片具有一主要模式及一從屬模式,且該主從模式切換晶片受控於該控制信號而運作於該主要模式與該從屬模式的其中一者;以及 一切換模組,耦接該主從模式切換晶片、該處理器、該至少一周邊裝置及該控制電路,其中該切換模組受控於該控制信號而導通該第一通用序列匯流排埠與該至少一周邊裝置之間的該傳輸路徑,或是導通該處理器與該第一通用序列匯流排埠之間的一傳輸路徑及該處理器與該至少一周邊裝置之間的一傳輸路徑。The electronic device of claim 1, wherein the master-slave mode switching module comprises: a control circuit for generating a control signal according to a mode signal; and a master-slave mode switching chip coupled to the first a general-purpose serial bus and the control circuit, wherein the master-slave mode switching chip has a main mode and a slave mode, and the master-slave mode switching chip is controlled by the control signal to operate in the master mode and the slave mode And a switching module coupled to the master-slave mode switching chip, the processor, the at least one peripheral device, and the control circuit, wherein the switching module is controlled by the control signal to turn on the first The transmission path between the universal sequence bus and the at least one peripheral device, or a transmission path between the processor and the first universal sequence bus and the processor and the at least one peripheral device A transmission path between. 如申請專利範圍第5項所述的電子裝置,其中: 當該模式信號表示該電子裝置運作於該第一模式時,該主從模式切換晶片受控於該控制信號而運作於該從屬模式並設定該第一外部裝置運作於該主要模式,且該切換模組反應於該控制信號而導通該第一通用序列匯流排埠與該至少一周邊裝置之間的該傳輸路徑,並斷開該處理器與該第一通用序列匯流排埠之間的該傳輸路徑及該處理器與該至少一周邊裝置之間的該傳輸路徑。The electronic device of claim 5, wherein: when the mode signal indicates that the electronic device operates in the first mode, the master-slave mode switching chip is controlled by the control signal to operate in the slave mode and Setting the first external device to operate in the main mode, and the switching module is responsive to the control signal to turn on the transmission path between the first universal sequence bus bar and the at least one peripheral device, and disconnect the processing The transmission path between the device and the first universal sequence bus and the transmission path between the processor and the at least one peripheral device. 如申請專利範圍第5項所述的電子裝置,其中: 當該模式信號表示該電子裝置運作於一第二模式時,該主從模式切換晶片受控於該控制信號而運作於該主要模式並設定該第一外部裝置運作於該從屬模式,且該切換模組反應於該控制信號而斷開該第一通用序列匯流排埠與該至少一周邊裝置之間的該傳輸路徑,並導通該處理器與該第一通用序列匯流排埠之間的該傳輸路徑及該處理器與該至少一周邊裝置之間的該傳輸路徑。The electronic device of claim 5, wherein: when the mode signal indicates that the electronic device operates in a second mode, the master-slave mode switching chip is controlled by the control signal to operate in the main mode and Setting the first external device to operate in the slave mode, and the switching module disconnects the transmission path between the first universal sequence bus bar and the at least one peripheral device in response to the control signal, and turns on the process The transmission path between the device and the first universal sequence bus and the transmission path between the processor and the at least one peripheral device. 如申請專利範圍第5項所述的電子裝置,更包括: 一按鈕模組,耦接該控制電路,用以設定該電子裝置的一運作模式並據以產生該模式信號。The electronic device of claim 5, further comprising: a button module coupled to the control circuit for setting an operation mode of the electronic device and generating the mode signal accordingly. 如申請專利範圍第5項所述的電子裝置,其中切換模組包括: 一第一切換電路,具有一第一端、一第二端、一第三端以及一控制端,其中該第一切換電路的該第一端耦接該主從模式切換晶片,該第一切換電路的該第二端耦接該處理器,且該第一切換電路的該控制端接收該控制信號;以及 一第二切換電路,具有一第一端、一第二端、一第三端以及一控制端,其中該第二切換電路的該第一端耦接該至少一周邊裝置,該第二切換電路的該第二端耦接該處理器,該第二切換電路的該第三端與該第一切換電路的該第三端相耦接,且該第二切換電路的該控制端接收該控制信號。The electronic device of claim 5, wherein the switching module comprises: a first switching circuit having a first end, a second end, a third end, and a control end, wherein the first switching The first end of the circuit is coupled to the master-slave mode switching chip, the second end of the first switching circuit is coupled to the processor, and the control end of the first switching circuit receives the control signal; and a second The switching circuit has a first end, a second end, a third end, and a control end, wherein the first end of the second switching circuit is coupled to the at least one peripheral device, and the second switching circuit The second end is coupled to the processor, the third end of the second switching circuit is coupled to the third end of the first switching circuit, and the control end of the second switching circuit receives the control signal. 如申請專利範圍第5項所述的電子裝置,更包括: 一電池模組,耦接該主從模式切換晶片, 其中當該模式信號表示該電子裝置運作於一充電模式時,該主從模式切換晶片受控於該控制信號而設定該第一外部裝置對該電池模組進行充電, 其中當該模式信號表示該電子裝置運作於一供電模式時,該主從模式切換晶片受控於該控制信號而設定該電池模組對該第一外部裝置進行充電。The electronic device of claim 5, further comprising: a battery module coupled to the master-slave mode switching chip, wherein the master mode is when the mode signal indicates that the electronic device operates in a charging mode The switching chip is controlled by the control signal to set the first external device to charge the battery module, wherein when the mode signal indicates that the electronic device operates in a power supply mode, the master-slave mode switching chip is controlled by the control The battery module is configured to charge the first external device.
TW106133252A 2017-09-28 2017-09-28 Electronic apparatus TWI630484B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106133252A TWI630484B (en) 2017-09-28 2017-09-28 Electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106133252A TWI630484B (en) 2017-09-28 2017-09-28 Electronic apparatus

Publications (2)

Publication Number Publication Date
TWI630484B TWI630484B (en) 2018-07-21
TW201915765A true TW201915765A (en) 2019-04-16

Family

ID=63640735

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106133252A TWI630484B (en) 2017-09-28 2017-09-28 Electronic apparatus

Country Status (1)

Country Link
TW (1) TWI630484B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377545B (en) * 2019-06-12 2023-07-21 苏州佳世达电通有限公司 Dual purpose port determination method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202798027U (en) * 2012-05-17 2013-03-13 兰家林 Bidirectional power supply circuit of single USB interface
TWI546674B (en) * 2015-06-05 2016-08-21 巨盛電子股份有限公司 Data transmitting device having multi-transmission modes and method of switching multi-transmission modes thereof
CN204808314U (en) * 2015-07-10 2015-11-25 向开元 USB concentrator

Also Published As

Publication number Publication date
TWI630484B (en) 2018-07-21

Similar Documents

Publication Publication Date Title
US10977057B2 (en) Electronic apparatus capable of collectively managing different firmware codes and operation method thereof
US20160004287A1 (en) Portable electronic device and power management method thereof
US10955888B2 (en) Universal serial bus device and method for dynamically defining a power source or sink status for downstream facing ports
US10380049B2 (en) Multi-host supported universal serial bus hub and automobile head unit using the same
TWI712898B (en) Docking station, electrical device, and method for configuring basic input output system
TW201624227A (en) Apparatus, system and method for communication of touch sensor information
TWM365529U (en) Data access apparatus and processing system using the same
CN107544921B (en) Storage device and operation method thereof
TWI581108B (en) Connector with USB Form Factor, Data Transmission Device and Data Storage Device Thereof
TWM584452U (en) Integrated electronic apparatus for data access, data transmission and power management
US20200327080A1 (en) Apparatus and method for performing data transmission with docking device by using usb interface
US20150169491A1 (en) Electronic device using usb socket to load firmware and firmware loading method thereof
US8463978B2 (en) Computer with ability to charge electronic device in power off state and USB interface module thereof
TWI630484B (en) Electronic apparatus
US20050070157A1 (en) Dual digital data connector
KR20150072248A (en) USB OTG memory device
TWM491982U (en) Connection wire with synchronous control function
US20140019778A1 (en) Hub device
TWI526833B (en) Host device display device and data transmission method thereof
CN111949103B (en) Integrated electronic device with data access, transmission and power management and method thereof
TWI618057B (en) Storage device and operating method thereof
TWI696326B (en) Peripheral device
US20210124707A1 (en) Usb connector device
US20100250800A1 (en) Input device
WO2016154811A1 (en) Removable storage apparatus having otg function