TWI451289B - Electrical device and function executing method applying thereof - Google Patents

Electrical device and function executing method applying thereof Download PDF

Info

Publication number
TWI451289B
TWI451289B TW100111336A TW100111336A TWI451289B TW I451289 B TWI451289 B TW I451289B TW 100111336 A TW100111336 A TW 100111336A TW 100111336 A TW100111336 A TW 100111336A TW I451289 B TWI451289 B TW I451289B
Authority
TW
Taiwan
Prior art keywords
button
input
pressed
flag
event signal
Prior art date
Application number
TW100111336A
Other languages
Chinese (zh)
Other versions
TW201239680A (en
Inventor
Peiyu Chen
Tsaiming Cheng
Chihlung Chen
Yuting Wang
Yenkai Huang
Hengyu Wu
Yuwen Chou
Original Assignee
Pegatron 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 Pegatron Corp filed Critical Pegatron Corp
Priority to TW100111336A priority Critical patent/TWI451289B/en
Publication of TW201239680A publication Critical patent/TW201239680A/en
Application granted granted Critical
Publication of TWI451289B publication Critical patent/TWI451289B/en

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Description

電子裝置以及應用於其之功能執行方法Electronic device and function execution method applied thereto

本發明是有關於一種電子裝置以及應用於其之功能執行方法,且特別是有關於一種利用少數按鍵即能達到多種操作功能之電子裝置以及應用於其之功能執行方法。The present invention relates to an electronic device and a function performing method therefor, and more particularly to an electronic device capable of achieving a plurality of operational functions using a small number of keys and a function performing method applied thereto.

隨著3C(Computer,Communications and Consumer)產業的發展,有越來越多的人會使用可攜式電子裝置(portable electrical device)作為生活中的輔助工具。舉例而言,常見的可攜式裝置包含個人數位助理(personal digital assistant;PDA)、行動電話(mobile phone)、智慧型手機(smart phone)等,這些手持裝置之體積輕巧,攜帶方便,因此使用的人數越來越多,所需之功能亦越來越廣。With the development of the 3C (Computer, Communications and Consumer) industry, more and more people will use portable electrical devices as an aid in life. For example, a common portable device includes a personal digital assistant (PDA), a mobile phone, a smart phone, etc., and these handheld devices are lightweight and easy to carry, so they are used. The number of people is increasing and the functions required are becoming wider and wider.

因為可攜式電子裝置本身訴求的是輕與薄,因此通常沒有提供太多的USB port。此外,使用外接USB裝置會影響產品的攜帶性,讓使用者感到不便利。Because the portable electronic device itself is light and thin, it usually does not provide too many USB ports. In addition, the use of an external USB device can affect the portability of the product and make the user feel inconvenient.

若使用觸控螢幕作為輸入介面時,觸控螢幕容易因為手指之點擊,而在觸控螢幕上留下指紋。此外,操作觸控螢幕需要移動手指,比較不方便。另外,若觸控螢幕上作為點擊的物件太小,將不方便使用者以手指點擊,因而需要較大之觸控螢幕尺寸,才能方便使用者操作。如果使用尖銳的硬物操作觸控螢幕,一方面會傷害觸控螢幕,一方面要再額外拿取硬物,也不方便使用者操作。When using a touch screen as an input interface, the touch screen is likely to leave a fingerprint on the touch screen due to finger clicks. In addition, it is inconvenient to operate the touch screen by moving the finger. In addition, if the object on the touch screen as a click is too small, it is inconvenient for the user to click with a finger, and thus a larger touch screen size is required to facilitate the user's operation. If you use a sharp hard object to operate the touch screen, it will damage the touch screen on the one hand, and you need to take extra hard objects on the one hand, which is not convenient for the user to operate.

當可攜式電子裝置具有較多功能時,如果使每個功能對應一個按鍵,將需要配置很多按鍵,會影響產品外觀以及其體積。When the portable electronic device has more functions, if each function is made to correspond to one button, many buttons will need to be configured, which will affect the appearance of the product and its volume.

因此,本發明之一目的是在提供一種電子裝置,用以電子裝置之嵌入式控制器對應按鍵之不同按壓組合方式,產生不同之事件訊號,並使電子裝置因應不同事件訊號執行不同功能。電子裝置包含一第一按鍵、一第二按鍵、一嵌入式控制器以及一處理單元。嵌入式控制器包含一第一輸入輸出接腳與一第二輸入輸出接腳。第一按鍵與第二按鍵於被按壓時分別電性連接第一輸入輸出接腳與第二輸入輸出接腳。嵌入式控制器分別偵測兩輸入輸出接腳之電位差並判斷第一按鍵與第二按鍵是否被按壓。處理單元電性連接嵌入式控制器。當嵌入式控制器判斷第一按鍵與第二按鍵均被按壓時,送出一第一事件訊號至處理單元,處理單元對應第一事件訊號執行一第一功能。當嵌入式控制器判斷第一按鍵被按壓,而第二按鍵未被按壓時,送出一第二事件訊號至處理單元,處理單元對應該第二事件訊號執行一第二功能。Therefore, an object of the present invention is to provide an electronic device for generating different event signals by using different pressing combinations of corresponding buttons of an embedded controller of an electronic device, and causing the electronic device to perform different functions according to different event signals. The electronic device includes a first button, a second button, an embedded controller, and a processing unit. The embedded controller includes a first input and output pin and a second input and output pin. The first button and the second button are electrically connected to the first input and output pins and the second input and output pins, respectively, when being pressed. The embedded controller detects the potential difference between the two input and output pins and determines whether the first button and the second button are pressed. The processing unit is electrically connected to the embedded controller. When the embedded controller determines that both the first button and the second button are pressed, a first event signal is sent to the processing unit, and the processing unit performs a first function corresponding to the first event signal. When the embedded controller determines that the first button is pressed and the second button is not pressed, a second event signal is sent to the processing unit, and the processing unit performs a second function corresponding to the second event signal.

本發明之另一目的是在提供一種功能執行方法,應用於一電子裝置。電子裝置包含一第一按鍵、一第二按鍵以及一嵌入式控制器。嵌入式控制器具有一第一輸入輸出接腳與一第二輸入輸出接腳。第一按鍵與第二按鍵於被按壓時分別電性連接第一輸入輸出接腳與第二輸入輸出接腳。功能執行方法使嵌入式控制器對應按鍵之不同按壓組合方式,產生不同之事件訊號,並使電子裝置因應不同事件訊號執行不同功能。功能執行方法包含以下步驟:偵測第一輸入輸出接腳之一電位差。偵測第二輸入輸出接腳之一電位差。若第一輸入輸出接腳與第二輸入輸出接腳之電位差均被拉低,判斷第一按鍵與該第二按鍵皆被按壓,產生一第一事件訊號,並對應第一事件訊號執行第一功能。若第一輸入輸出接腳之電位差被拉低,而第二輸入輸出接腳之電位差未被拉低,判斷第一按鍵被按壓而第二按鍵未被按壓,產生一第二事件訊號,並對應第二事件訊號執行第二功能。Another object of the present invention is to provide a function performing method for use in an electronic device. The electronic device includes a first button, a second button, and an embedded controller. The embedded controller has a first input and output pin and a second input and output pin. The first button and the second button are electrically connected to the first input and output pins and the second input and output pins, respectively, when being pressed. The function execution method causes the embedded controller to press different combinations of buttons, generate different event signals, and enable the electronic device to perform different functions according to different event signals. The function execution method includes the following steps: detecting a potential difference of the first input and output pins. Detecting a potential difference between the second input and output pins. If the potential difference between the first input/output pin and the second input/output pin is both pulled down, it is determined that the first button and the second button are both pressed to generate a first event signal, and the first event signal is executed first. Features. If the potential difference of the first input/output pin is pulled low, and the potential difference of the second input/output pin is not pulled low, it is determined that the first button is pressed and the second button is not pressed, generating a second event signal, and corresponding The second event signal performs the second function.

應用本發明具有下列優點:藉由按壓單一或少數個按鍵而能執行多種功能,且可執行的功能種類較電子裝置本身設置的按鍵數量多。於是,初步可減少電子裝置上所需配置之按鍵數量,因而節省成本,進一步也可將本發明應用至目前多已不配置鍵盤的平板電腦領域中。The application of the present invention has the advantage that a plurality of functions can be performed by pressing a single or a small number of buttons, and the number of functions that can be performed is larger than the number of buttons set by the electronic device itself. Therefore, the number of buttons required to be configured on the electronic device can be initially reduced, thereby saving cost, and the present invention can be further applied to the field of tablet computers which are currently not equipped with a keyboard.

此外,由於本發明中的嵌入式控制器係直接電性連接於第一按鍵與第二按鍵,故當應用於不配置有鍵盤的電子裝置上時,可省略一般鍵盤控制器的配置,當第一按鍵與第二按鍵被按下時,亦無須重新檢索與鍵盤控制器相對應的參數對照表來執行各個鍵盤按鍵所對應的不同功能,整體上具有可節省操作時間,增進電子裝置的效能。換句話來說,本發明僅需修改嵌入式控制器上之軟體或韌體,即可應用於現有之電子裝置,在不大幅修改現有電子裝置之處理單元之程式的前提下,輕鬆的減少現有電子裝置上所需之按鍵數量,因而可減少電子裝置中配置按鍵所需之空間。因此,特別適合應用於輕薄短小,甚至不配置有鍵盤的之可攜式電子裝置。In addition, since the embedded controller in the present invention is directly electrically connected to the first button and the second button, when applied to an electronic device not equipped with a keyboard, the configuration of the general keyboard controller can be omitted. When one button and the second button are pressed, it is not necessary to re-retrieve the parameter comparison table corresponding to the keyboard controller to perform different functions corresponding to each keyboard button, thereby saving operation time and improving the performance of the electronic device as a whole. In other words, the present invention only needs to modify the software or firmware on the embedded controller, and can be applied to the existing electronic device, and can be easily reduced without greatly modifying the program of the processing unit of the existing electronic device. The number of buttons required on an existing electronic device can reduce the space required for configuring buttons in an electronic device. Therefore, it is particularly suitable for portable electronic devices that are thin and light, and are not even equipped with a keyboard.

以下將以圖式及詳細說明清楚說明本發明之精神,任何所屬技術領域中具有通常知識者在瞭解本發明之較佳實施例後,當可由本發明所教示之技術,加以改變及修飾,其並不脫離本發明之精神與範圍。The spirit and scope of the present invention will be apparent from the following description of the preferred embodiments of the invention. The spirit and scope of the invention are not departed.

請參照第1圖,其繪示依照本發明一實施方式的一種電子裝置之功能方塊圖。電子裝置之嵌入式控制器對應按鍵之不同按壓組合方式,產生不同之事件訊號,並使電子裝置因應不同事件訊號執行不同功能。Please refer to FIG. 1 , which is a functional block diagram of an electronic device according to an embodiment of the invention. The embedded controller of the electronic device generates different event signals according to different pressing combinations of the buttons, and causes the electronic device to perform different functions according to different event signals.

電子裝置100包含一第一按鍵110、一第二按鍵120、一嵌入式控制器(Embedded Controller,EC)130以及一處理單元140。嵌入式控制器130分別電性連接第一按鍵110、第二按鍵120以及處理單元140。其中,嵌入式控制器130可為鍵盤控制器(Keyboard Controller,KBC)或其他類型之嵌入式控制器。嵌入式控制器130包含一第一輸入輸出接腳131與一第二輸入輸出接腳132。第一輸入輸出接腳131與第二輸入輸出接腳132為嵌入式控制器130上兩相異之通用輸入輸出(General Purpose Input/Output,GPIO)接腳。第一按鍵110與第二按鍵120於被按壓時分別電性連接第一輸入輸出接腳131與第二輸入輸出接腳132。需說明的是,第1圖中為求說明之便,僅繪示第一按鍵110與第二按鍵120電性連接至第一輸入輸出接腳131與第二輸入輸出接腳132,然而本發明中,上述兩按鍵係於被按壓時電性連接至上述兩接腳。再者,任何電路設計能達到本發明所欲強調之效果者,亦可為之。另外,在其他實施例中,第一按鍵110以及第二按鍵120可電性連接於嵌入式控制器130上其他類型之接腳,並不限於本揭露。此外,嵌入式控制器130可透過一晶片組150(如南橋晶片或北橋晶片),與處理單元140電性連接。此處之處理單元140所指為中央處理器,然而目前亦有將晶片組與中央處理器整合為一體者,本發明並不欲以上述實施例為限,合先述明。The electronic device 100 includes a first button 110, a second button 120, an embedded controller (EC) 130, and a processing unit 140. The embedded controller 130 is electrically connected to the first button 110, the second button 120, and the processing unit 140, respectively. The embedded controller 130 can be a keyboard controller (KBC) or other type of embedded controller. The embedded controller 130 includes a first input and output pin 131 and a second input and output pin 132. The first input/output pin 131 and the second input/output pin 132 are two different general purpose input/output (GPIO) pins on the embedded controller 130. The first button 110 and the second button 120 are electrically connected to the first input/output pin 131 and the second input/output pin 132 respectively when being pressed. It should be noted that, in FIG. 1 , for the sake of explanation, only the first button 110 and the second button 120 are electrically connected to the first input and output pin 131 and the second input and output pin 132 , but the present invention The two buttons are electrically connected to the two pins when pressed. Furthermore, any circuit design that achieves the effects emphasized by the present invention may also be used. In addition, in other embodiments, the first button 110 and the second button 120 can be electrically connected to other types of pins on the embedded controller 130, and are not limited to the disclosure. In addition, the embedded controller 130 can be electrically connected to the processing unit 140 through a chip set 150 such as a south bridge wafer or a north bridge wafer. The processing unit 140 is referred to herein as a central processing unit. However, the present invention is not intended to be limited to the above embodiments.

於一較佳實施例中,當第一按鍵110以及第二按鍵120被按壓時,因分別電性連接至第一輸入輸出接腳131與第二輸入輸出接腳132將使其所連接之輸入輸出接腳131、132電位差被拉低。在本發明之一實施例中,第一按鍵110以及第二按鍵120可為相同類型之兩按鍵,嵌入式控制器130依據其接收到訊號之接腳為131或132,而將其辨識為來自第一按鍵110或第二按鍵120。在本發明之另一實施例中,第一按鍵110以及第二按鍵120也可為產生不同訊號之兩相異按鍵。In a preferred embodiment, when the first button 110 and the second button 120 are pressed, the input is electrically connected to the first input/output pin 131 and the second input/output pin 132, respectively. The potential difference between the output pins 131 and 132 is pulled low. In an embodiment of the present invention, the first button 110 and the second button 120 can be two buttons of the same type, and the embedded controller 130 recognizes the pin as 131 or 132 according to the received signal, and recognizes it as coming from The first button 110 or the second button 120. In another embodiment of the present invention, the first button 110 and the second button 120 may also be two different buttons for generating different signals.

嵌入式控制器130分別偵測第一輸入輸出接腳131、第二輸入輸出接腳132之電位差並判斷第一按鍵110與第二按鍵120是否被按壓。其中,第一輸入輸出接腳131、第二輸入輸出接腳132之電位差,可作為第一按鍵110與第二按鍵120是否被按壓之判斷依據。因此,嵌入式控制器130更可包含一偵測模組133以及一處理模組134。偵測模組133分別偵測第一輸入輸出接腳131與第二輸入輸出接腳132之電位差。當偵測模組133偵測第一輸入輸出接腳131之電位差被拉低時,處理模組134判斷第一按鍵110被按壓,當偵測模組133偵測第二輸入輸出接腳132之電位差被拉低時,處理模組134判斷第二按鍵被按壓。The embedded controller 130 detects the potential difference between the first input/output pin 131 and the second input/output pin 132 and determines whether the first button 110 and the second button 120 are pressed. The potential difference between the first input/output pin 131 and the second input/output pin 132 can be used as a basis for determining whether the first button 110 and the second button 120 are pressed. Therefore, the embedded controller 130 further includes a detection module 133 and a processing module 134. The detecting module 133 detects the potential difference between the first input/output pin 131 and the second input/output pin 132, respectively. When the detecting module 133 detects that the potential difference between the first input/output pin 131 is pulled down, the processing module 134 determines that the first button 110 is pressed, and when the detecting module 133 detects the second input/output pin 132 When the potential difference is pulled low, the processing module 134 determines that the second button is pressed.

當嵌入式控制器130判斷第一按鍵110與第二按鍵120均被按壓時,嵌入式控制器130送出一第一事件訊號至處理單元140。處理單元140對應第一事件訊號執行一第一功能。當嵌入式控制器130判斷第一按鍵110被按壓,而第二按鍵120未被按壓時,嵌入式控制器130送出一第二事件訊號至處理單元140。處理單元140對應第二事件訊號執行一第二功能。此外,在第二按鍵120單獨被按壓時,處理單元140仍能執行一第三功能,本發明並不欲限定其所能送出之事件訊號以及所能執行功能的數目。When the embedded controller 130 determines that both the first button 110 and the second button 120 are pressed, the embedded controller 130 sends a first event signal to the processing unit 140. The processing unit 140 performs a first function corresponding to the first event signal. When the embedded controller 130 determines that the first button 110 is pressed and the second button 120 is not pressed, the embedded controller 130 sends a second event signal to the processing unit 140. The processing unit 140 performs a second function corresponding to the second event signal. In addition, when the second button 120 is pressed alone, the processing unit 140 can still perform a third function, and the present invention is not intended to limit the number of event signals that can be sent and the number of functions that can be performed.

其中,第一事件訊號與第二事件訊號包含一系統控制中斷協定或一掃瞄碼。此外,在第二按鍵120單獨被按壓時,處理單元140仍能執行一第三功能。另外,嵌入式控制器130可遵循先進組態與電力介面(Advanced Configuration and Power Interface,ACPI)、系統控制中斷(System Control Interrupt,SCI)或其他協定,產生第一事件訊號以及第二事件訊號。也就是說,於較佳實施例中,當判斷第一按鍵110被按壓,而第二按鍵120未被按壓時,嵌入式控制器130可送出訊號使電子裝置開始進行關機動作。另一較佳實施例中,當判斷第一按鍵110與第二按鍵120均被按壓時,嵌入式控制器130可送出一系統控制中斷協定(SCI Event),此時電子裝置的作業系統收到此SCI event後會呼叫BIOS提供對應的SCI Handle以執行相對應的功能。然而,上述各實施例均為說明第一事件訊號或第二事件訊號所可能對應的功能,本發明所能實施的方式並不欲以此為限。The first event signal and the second event signal include a system control interrupt protocol or a scan code. In addition, the processing unit 140 can still perform a third function when the second button 120 is individually pressed. In addition, the embedded controller 130 can generate a first event signal and a second event signal according to an Advanced Configuration and Power Interface (ACPI), a System Control Interrupt (SCI), or other protocol. That is, in the preferred embodiment, when it is determined that the first button 110 is pressed and the second button 120 is not pressed, the embedded controller 130 can send a signal to cause the electronic device to start the shutdown action. In another preferred embodiment, when it is determined that both the first button 110 and the second button 120 are pressed, the embedded controller 130 can send a system control interrupt protocol (SCI Event), and the operating system of the electronic device is received. After this SCI event, the BIOS is called to provide the corresponding SCI Handle to perform the corresponding function. However, the foregoing embodiments are all illustrative of the functions that the first event signal or the second event signal may correspond to. The manner in which the present invention can be implemented is not limited thereto.

如此一來,藉由按壓單一或少數個按鍵而能執行多種功能,且可執行的功能種類較電子裝置本身設置的按鍵數量多。於是,可減少電子裝置上所需配置之按鍵數量,因而節省成本。此外,僅需修改嵌入式控制器130上之軟體或韌體,即可應用於現有之電子裝置。換言之,可在不大幅修改現有電子裝置之處理單元之程式的前提下,輕鬆的減少現有電子裝置上所需之按鍵數量,因而可減少電子裝置中配置按鍵所需之空間。因此,特別適合應用於輕薄短小之可攜式電子裝置。In this way, a plurality of functions can be performed by pressing a single or a small number of buttons, and the types of functions that can be performed are larger than the number of buttons set by the electronic device itself. Thus, the number of keys required to be configured on the electronic device can be reduced, thereby saving costs. In addition, the software or firmware on the embedded controller 130 can be modified to be applied to existing electronic devices. In other words, the number of keys required on the existing electronic device can be easily reduced without greatly modifying the program of the processing unit of the existing electronic device, thereby reducing the space required for configuring the buttons in the electronic device. Therefore, it is particularly suitable for use in a portable device that is light and thin.

在本發明之一實施例中,嵌入式控制器130也可在第一按鍵110被按壓時,等待一預設時間,並在等待時判斷第二按鍵120是否被按壓。因此,嵌入式控制器130更可包含一等待模組135。當處理模組134判斷第一按鍵被按壓時,等待模組135通知偵測模組133於一預設時間內持續偵測第二按鍵120是否被按壓。若偵測模組133於預設時間內偵測到第二輸入輸出接腳132之電位差被拉低,處理模組134判斷第二按鍵120被按壓而送出第一事件訊號。若偵測模組133於預設時間內未偵測到第二輸入輸出接腳132之電位差被拉低,處理模組134判斷第二按鍵120未被按壓而送出第二事件訊號。如此一來,使用者可藉由依序按壓第一按鍵110以及第二按鍵120,而使電子裝置100執行第一按鍵110以及第二按鍵120對應功能以外的功能。In an embodiment of the present invention, the embedded controller 130 may also wait for a preset time when the first button 110 is pressed, and determine whether the second button 120 is pressed while waiting. Therefore, the embedded controller 130 can further include a waiting module 135. When the processing module 134 determines that the first button is pressed, the waiting module 135 notifies the detecting module 133 to continuously detect whether the second button 120 is pressed within a predetermined time. If the detection module 133 detects that the potential difference of the second input/output pin 132 is pulled down within a preset time, the processing module 134 determines that the second button 120 is pressed to send the first event signal. If the detection module 133 does not detect that the potential difference of the second input/output pin 132 is pulled down within a preset time, the processing module 134 determines that the second button 120 is not pressed to send the second event signal. In this way, the user can press the first button 110 and the second button 120 in sequence to cause the electronic device 100 to perform functions other than the functions corresponding to the first button 110 and the second button 120.

在本發明之另一實施例中,嵌入式控制器130可藉由計數值以及旗幟(flag),判斷第一按鍵110以及第二按鍵120是否被按壓。因此,嵌入式控制器130更可包含一儲存模組136、一第一旗幟設定模組137、一第二旗幟設定模組138以及一計數值檢查模組139。儲存模組136儲存一計數值,且計數值預設為一預設數值。當處理模組134判斷第一按鍵120被按壓時,第一旗幟設定模組137於儲存模組136設置一第一旗幟,並將計數值更動為預設數值以外之值。當處理模組134判斷第二按鍵120被按壓時,第二旗幟設定模組138於儲存模組136設置一第二旗幟,並將計數值更動為預設數值以外之值。計數值檢查模組139持續檢查計數值是否為預設數值。在計數值不為預設數值時,處理模組134判斷儲存模組內是否存有第一旗幟以及第二旗幟。若儲存模組136內存有第一旗幟以及第二旗幟時,嵌入式控制器130產生第一事件訊號。若儲存模組136內存有第一旗幟但不存有第二旗幟時,嵌入式控制器130產生第二事件訊號。如此一來,可藉由較少之按鍵數目,操作電子裝置100較多之功能數目。In another embodiment of the present invention, the embedded controller 130 can determine whether the first button 110 and the second button 120 are pressed by the count value and the flag. Therefore, the embedded controller 130 further includes a storage module 136, a first flag setting module 137, a second flag setting module 138, and a count value checking module 139. The storage module 136 stores a count value, and the count value is preset to a preset value. When the processing module 134 determines that the first button 120 is pressed, the first flag setting module 137 sets a first flag in the storage module 136, and changes the count value to a value other than the preset value. When the processing module 134 determines that the second button 120 is pressed, the second flag setting module 138 sets a second flag in the storage module 136, and changes the count value to a value other than the preset value. The count value checking module 139 continuously checks whether the count value is a preset value. When the count value is not the preset value, the processing module 134 determines whether the first flag and the second flag are stored in the storage module. If the first flag and the second flag are stored in the storage module 136, the embedded controller 130 generates a first event signal. If the first flag is stored in the storage module 136 but the second flag is not present, the embedded controller 130 generates a second event signal. In this way, the number of functions of the electronic device 100 can be operated by a small number of buttons.

請參照第2圖,其係依照本發明一實施方式的一種功能執行方法之流程圖。功能執行方法應用於一電子裝置。電子裝置包含一第一按鍵、一第二按鍵以及一嵌入式控制器。嵌入式控制器具有一第一輸入輸出接腳與一第二輸入輸出接腳。第一按鍵與第二按鍵於被按壓時分別電性連接嵌入式控制器之第一輸入輸出接腳與第二輸入輸出接腳。功能執行方法使嵌入式控制器對應按鍵之不同按壓組合方式,產生不同之事件訊號,並使電子裝置因應不同事件訊號執行不同功能。功能執行方法可實作為一電腦程式,並儲存於一電腦可讀取記錄媒體中,而使電腦讀取此記錄媒體後執行功能執行方法。電腦可讀取記錄媒體可為唯讀記憶體、快閃記憶體、軟碟、硬碟、光碟、隨身碟、磁帶、可由網路存取之資料庫或熟悉此技藝者可輕易思及具有相同功能之電腦可讀取紀錄媒體。Please refer to FIG. 2, which is a flowchart of a function execution method according to an embodiment of the present invention. The function execution method is applied to an electronic device. The electronic device includes a first button, a second button, and an embedded controller. The embedded controller has a first input and output pin and a second input and output pin. The first button and the second button are electrically connected to the first input and output pins and the second input and output pins of the embedded controller respectively when being pressed. The function execution method causes the embedded controller to press different combinations of buttons, generate different event signals, and enable the electronic device to perform different functions according to different event signals. The function execution method can be implemented as a computer program and stored in a computer readable recording medium, and the computer executes the function execution method after reading the recording medium. Computer-readable recording media can be read-only memory, flash memory, floppy disk, hard disk, optical disk, flash drive, tape, network accessible database or familiar with the art can easily think of the same The function of the computer can read the recording media.

功能執行方法200包含以下步驟:The function execution method 200 includes the following steps:

在步驟210中,偵測第一輸入輸出接腳之電位差以及第二輸入輸出接腳之電位差。In step 210, the potential difference between the first input and output pins and the potential difference of the second input and output pins are detected.

在步驟220中,若第一輸入輸出接腳與第二輸入輸出接腳之電位差均被拉低,判斷第一按鍵與第二按鍵皆被按壓。接下來,在步驟230中,嵌入式控制器產生一第一事件訊號,以使電子裝置執行一第一功能(步驟240)。In step 220, if the potential difference between the first input/output pin and the second input/output pin is pulled low, it is determined that both the first button and the second button are pressed. Next, in step 230, the embedded controller generates a first event signal to cause the electronic device to perform a first function (step 240).

在步驟250中,若第一輸入輸出接腳之電位差被拉低,而第二輸入輸出接腳之電位差未被拉低,判斷第一按鍵被按壓,而該第二按鍵未被按壓。於是,在步驟260中,嵌入式控制器產生一第二事件訊號,以使電子裝置執行一第二功能(步驟270)。In step 250, if the potential difference of the first input/output pin is pulled low and the potential difference of the second input/output pin is not pulled low, it is determined that the first button is pressed and the second button is not pressed. Thus, in step 260, the embedded controller generates a second event signal to cause the electronic device to perform a second function (step 270).

其中,產生第一事件訊號(步驟230)或產生第二事件訊號(步驟260)係根據先進組態與電力介面來執行。第一事件訊號與第二事件訊號包含一系統控制中斷協定或一掃瞄碼。此外,功能執行方法200更可包含以下步驟:在判斷第一按鍵未被按壓且第二按鍵被按壓時,嵌入式控制器產生一第三事件訊號,以使電子裝置執行一第三功能。如此一來,藉由按壓單一或少數個按鍵而能執行多種功能,且可執行的功能種類較電子裝置本身設置的按鍵數量多。於是,可減少電子裝置上所需配置之按鍵數量,因而節省成本。此外,僅需修改嵌入式控制器上之軟體或韌體,即可應用於現有之電子裝置。換言之,可在不大幅修改現有電子裝置之處理單元之程式的前提下,輕鬆的減少現有電子裝置上所需之按鍵數量,因而可減少電子裝置中配置按鍵所需之空間。因此,特別適合應用於輕薄短小之可攜式電子裝置。The generating the first event signal (step 230) or generating the second event signal (step 260) is performed according to the advanced configuration and the power interface. The first event signal and the second event signal comprise a system control interrupt protocol or a scan code. In addition, the function execution method 200 further includes the following steps: when determining that the first button is not pressed and the second button is pressed, the embedded controller generates a third event signal to enable the electronic device to perform a third function. In this way, a plurality of functions can be performed by pressing a single or a small number of buttons, and the types of functions that can be performed are larger than the number of buttons set by the electronic device itself. Thus, the number of keys required to be configured on the electronic device can be reduced, thereby saving costs. In addition, you only need to modify the software or firmware on the embedded controller to apply to existing electronic devices. In other words, the number of keys required on the existing electronic device can be easily reduced without greatly modifying the program of the processing unit of the existing electronic device, thereby reducing the space required for configuring the buttons in the electronic device. Therefore, it is particularly suitable for use in a portable device that is light and thin.

在本發明之一實施例中,步驟210之各接腳之電位差偵測步驟間,更可包含等待一預設時間之步驟。其中,可在偵測道第一輸入輸出接腳之電位差拉低時時,等待一預設時間,並在等待時持續偵測第二輸入輸出接腳之電位差是否被拉低。在預設時間內第二輸入輸出接腳之電位差未被拉低時,步驟210判斷第一按鍵被按壓,且第二按鍵未被按壓(步驟250),以使嵌入式控制器產生第二事件訊號(步驟260)。在預設時間內第二輸入輸出接腳之電位差被拉低時,步驟210判斷第二按鍵被按壓,以使嵌入式控制器產生第一事件訊號(步驟230)。如此一來,使用者可藉由依序按壓第一按鍵以及第二按鍵,而使電子裝置執行第一按鍵以及第二按鍵對應功能以外的功能。In an embodiment of the present invention, the step of detecting the potential difference of each pin of step 210 may further include the step of waiting for a preset time. Wherein, when the potential difference of the first input/output pin is detected to be low, it waits for a preset time, and continuously detects whether the potential difference of the second input/output pin is pulled down while waiting. When the potential difference of the second input/output pin is not pulled down within the preset time, step 210 determines that the first button is pressed, and the second button is not pressed (step 250), so that the embedded controller generates the second event. Signal (step 260). When the potential difference of the second input/output pin is pulled down within a preset time, step 210 determines that the second button is pressed to cause the embedded controller to generate the first event signal (step 230). In this way, the user can cause the electronic device to perform functions other than the first button and the second button corresponding function by sequentially pressing the first button and the second button.

在本發明之另一實施例中,嵌入式控制器可藉由計數值以及旗幟,判斷第一按鍵以及第二按鍵是否被按壓。因此,功能執行方法200更可包含:提供一計數值,且計數值預設為一預設數值。嵌入式控制器若判斷第一按鍵被按壓時,設置一第一旗幟,並將計數值更動為預設數值以外之值。嵌入式控制器若判斷第二按鍵被按壓時,設置一第二旗幟,並將計數值更動為預設數值以外之值。於是,步驟210可包含:持續檢查計數值是否為預設數值。在計數值不為預設數值時,步驟210藉由判斷是否存有第一旗幟以判斷第一按鍵是否被按壓,並藉由判斷是否存有第二旗幟以判斷第二按鍵是否被按壓。若存有第一旗幟時,判定第一按鍵已被按壓。若在存有第二旗幟時,判定第二按鍵已被按壓。In another embodiment of the present invention, the embedded controller can determine whether the first button and the second button are pressed by the count value and the flag. Therefore, the function execution method 200 may further include: providing a count value, and the count value is preset to a preset value. When the embedded controller determines that the first button is pressed, it sets a first flag and changes the count value to a value other than the preset value. When the embedded controller determines that the second button is pressed, it sets a second flag and changes the count value to a value other than the preset value. Thus, step 210 may include continuously checking whether the count value is a preset value. When the count value is not the preset value, step 210 determines whether the first button is pressed by determining whether the first flag is present, and determines whether the second button is pressed by determining whether the second flag is present. If the first flag is stored, it is determined that the first button has been pressed. If the second flag is stored, it is determined that the second button has been pressed.

由上述本發明實施方式可知,應用本發明具有下列優點。藉由按壓按鍵而執行之功能數目可較按鍵數量多。於是,可減少電子裝置上所需配置之按鍵數量,因而節省成本。It will be apparent from the above-described embodiments of the present invention that the application of the present invention has the following advantages. The number of functions performed by pressing a button can be more than the number of buttons. Thus, the number of keys required to be configured on the electronic device can be reduced, thereby saving costs.

此外,由於本發明中的嵌入式控制器係直接電性連接於第一按鍵與第二按鍵,故當應用於不配置有鍵盤的電子裝置上時,可省略一般鍵盤控制器的配置,當第一按鍵與第二按鍵被按下時,亦無須重新檢索與鍵盤控制器相對應的參數對照表來執行各個鍵盤按鍵所對應的不同功能,整體上具有可節省操作時間,增進電子裝置的效能。換言之,本發明僅需修改嵌入式控制器上之軟體或韌體,即可應用於現有之電子裝置,可在不大幅修改現有電子裝置之處理單元之程式的前提下,輕鬆的減少現有電子裝置上所需之按鍵數量,因而可減少電子裝置中配置按鍵所需之空間。因此,特別適合應用於輕薄短小之可攜式電子裝置。In addition, since the embedded controller in the present invention is directly electrically connected to the first button and the second button, when applied to an electronic device not equipped with a keyboard, the configuration of the general keyboard controller can be omitted. When one button and the second button are pressed, it is not necessary to re-retrieve the parameter comparison table corresponding to the keyboard controller to perform different functions corresponding to each keyboard button, thereby saving operation time and improving the performance of the electronic device as a whole. In other words, the present invention can be applied to an existing electronic device only by modifying the software or firmware on the embedded controller, and can easily reduce the existing electronic device without greatly modifying the program of the processing unit of the existing electronic device. The number of keys required on the screen reduces the space required to configure the buttons in the electronic device. Therefore, it is particularly suitable for use in a portable device that is light and thin.

雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and the present invention can be modified and modified without departing from the spirit and scope of the present invention. The scope is subject to the definition of the scope of the patent application attached.

100...電子裝置100. . . Electronic device

110...第一按鍵110. . . First button

120...第二按鍵120. . . Second button

130...嵌入式控制器130. . . Embedded controller

131...第一輸入輸出接腳131. . . First input and output pin

132...第二輸入輸出接腳132. . . Second input and output pin

133...偵測模組133. . . Detection module

134...處理模組134. . . Processing module

135...等待模組135. . . Waiting module

136...儲存模組136. . . Storage module

137...第一旗幟設定模組137. . . First flag setting module

138...第二旗幟設定模組138. . . Second flag setting module

139...計數值檢查模組139. . . Count value check module

140...處理單元140. . . Processing unit

150...晶片組150. . . Chipset

200...功能執行方法200. . . Function execution method

210~270...步驟210~270. . . step

為讓本發明之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:The above and other objects, features, advantages and embodiments of the present invention will become more apparent and understood.

第1圖繪示依照本發明一實施方式的一種電子裝置之功能方塊圖。FIG. 1 is a functional block diagram of an electronic device according to an embodiment of the invention.

第2圖係依照本發明一實施方式的一種功能執行方法之流程圖。2 is a flow chart of a function execution method according to an embodiment of the present invention.

100...電子裝置100. . . Electronic device

110...第一按鍵110. . . First button

120...第二按鍵120. . . Second button

130...嵌入式控制器130. . . Embedded controller

131...第一輸入輸出接腳131. . . First input and output pin

132...第二輸入輸出接腳132. . . Second input and output pin

133...偵測模組133. . . Detection module

134...處理模組134. . . Processing module

135...等待模組135. . . Waiting module

136...儲存模組136. . . Storage module

137...第一旗幟設定模組137. . . First flag setting module

138...第二旗幟設定模組138. . . Second flag setting module

139...計數值檢查模組139. . . Count value check module

140...處理單元140. . . Processing unit

150...晶片組150. . . Chipset

Claims (7)

一種電子裝置,包含:一第一按鍵;一第二按鍵;一嵌入式控制器,包含一第一輸入輸出接腳與一第二輸入輸出接腳,該第一按鍵與該第二按鍵於被按壓時分別電性連接該第一輸入輸出接腳與該第二輸入輸出接腳,該嵌入式控制器分別偵測該兩輸入輸出接腳之電位差並判斷該第一按鍵與該第二按鍵是否被按壓;以及一處理單元,電性連接該嵌入式控制器,其中,當該嵌入式控制器判斷該第一按鍵與該第二按鍵均被按壓時,送出一第一事件訊號至該處理單元,該處理單元對應該第一事件訊號執行一第一功能,當該嵌入式控制器判斷該第一按鍵被按壓,而該第二按鍵未被按壓時,送出一第二事件訊號至該處理單元,該處理單元對應該第二事件訊號執行一第二功能,其中該嵌入式控制器更包含:一偵測模組,分別偵測該第一輸入輸出接腳與該第二輸入輸出接腳之該電位差;一處理模組,當該偵測模組偵測該第一輸入輸出接腳之該電位差被拉低時,該處理模組判斷該第一按鍵被按壓,當該偵測模組偵測該第二輸入輸出接腳之該電位差被拉低時,該處理模組判斷該第二按鍵被按壓;一儲存模組,儲存一計數值,且該計數值預設為一預設 數值;一第一旗幟設定模組,當該處理模組判斷該第一按鍵被按壓時,於該儲存模組設置一第一旗幟,並將該計數值更動為該預設數值以外之值;一第二旗幟設定模組,當該處理模組判斷該第二按鍵被按壓時,於該儲存模組設置一第二旗幟,並將該計數值更動為該預設數值以外之值;以及一計數值檢查模組,持續檢查該計數值是否為該預設數值,其中在該計數值不為該預設數值時,該處理模組判斷該儲存模組內是否存有該第一旗幟以及該第二旗幟,若該儲存模組內存有該第一旗幟以及該第二旗幟時產生該第一事件訊號,若該儲存模組內存有該第一旗幟但不存有該第二旗幟時產生該第二事件訊號。 An electronic device comprising: a first button; a second button; an embedded controller comprising a first input and output pin and a second input and output pin, the first button and the second button being The first input/output pin and the second input/output pin are electrically connected to each other when pressed, and the embedded controller respectively detects a potential difference between the two input and output pins and determines whether the first button and the second button are Pressed; and a processing unit electrically connected to the embedded controller, wherein when the embedded controller determines that both the first button and the second button are pressed, sending a first event signal to the processing unit The processing unit performs a first function corresponding to the first event signal. When the embedded controller determines that the first button is pressed and the second button is not pressed, sending a second event signal to the processing unit. The processing unit performs a second function corresponding to the second event signal, wherein the embedded controller further includes: a detecting module, respectively detecting the first input/output pin and the second input and output a potential difference of the pin; a processing module, when the detecting module detects that the potential difference of the first input/output pin is pulled down, the processing module determines that the first button is pressed, when the detecting When the module detects that the potential difference of the second input/output pin is pulled down, the processing module determines that the second button is pressed; and a storage module stores a count value, and the count value is preset to a preset Assume a first flag setting module, when the processing module determines that the first button is pressed, setting a first flag in the storage module, and changing the count value to a value other than the preset value; a second flag setting module, when the processing module determines that the second button is pressed, setting a second flag in the storage module, and changing the count value to a value other than the preset value; The counting value checking module continuously checks whether the counting value is the preset value, wherein when the counting value is not the preset value, the processing module determines whether the first flag is stored in the storage module and the a second flag, if the first flag and the second flag are stored in the storage module, the first event signal is generated, and if the first flag is stored in the storage module but the second flag is not stored, the second flag is generated. The second event signal. 如請求項1所述之電子裝置,更包含:一晶片組,其中該嵌入式控制器透過該晶片組,與該處理單元電性連接。 The electronic device of claim 1, further comprising: a chip set, wherein the embedded controller is electrically connected to the processing unit through the chip set. 如請求項1所述之電子裝置,其中該嵌入式控制器更包含:一等待模組,當該處理模組判斷該第一按鍵被按壓時,該等待模組通知該偵測模組於一預設時間內持續偵測 該第二按鍵是否被按壓,其中若該偵測模組於該預設時間內偵測到該第二輸入輸出接腳之該電位差被拉低,該處理模組判斷該第二按鍵被按壓而送出該第一事件訊號,若該偵測模組於該預設時間內未偵測到該第二輸入輸出接腳之該電位差被拉低,該處理模組判斷該第二按鍵未被按壓而送出該第二事件訊號。 The electronic device of claim 1, wherein the embedded controller further comprises: a waiting module, wherein when the processing module determines that the first button is pressed, the waiting module notifies the detecting module to Continuous detection within a preset time Whether the second button is pressed, and if the detecting module detects that the potential difference of the second input/output pin is pulled down within the preset time, the processing module determines that the second button is pressed Sending the first event signal, if the detecting module does not detect that the potential difference of the second input/output pin is pulled down within the preset time, the processing module determines that the second button is not pressed Send the second event signal. 如請求項1所述之電子裝置,其中該第一事件訊號與該第二事件訊號包含一系統控制中斷協定或一掃瞄碼。 The electronic device of claim 1, wherein the first event signal and the second event signal comprise a system control interrupt protocol or a scan code. 一種功能執行方法,應用於一電子裝置,該電子裝置包含一第一按鍵、一第二按鍵以及一嵌入式控制器,且該嵌入式控制器具有一第一輸入輸出接腳與一第二輸入輸出接腳,該第一按鍵與該第二按鍵於被按壓時分別電性連接該第一輸入輸出接腳與該第二輸入輸出接腳,該功能執行方法包含:偵測該第一輸入輸出接腳之一電位差;偵測該第二輸入輸出接腳之一電位差;若該第一輸入輸出接腳之該電位差被拉低,判斷該第一按鍵被按壓;若該第二輸入輸出接腳之該電位差被拉低,判斷該第二按鍵被按壓;提供一計數值,且該計數值預設為一預設數值;若判斷該第一按鍵被按壓時,設置一第一旗幟,並將 該計數值更動為該預設數值以外之值,若判斷該第二按鍵被按壓時,設置一第二旗幟,並將該計數值更動為該預設數值以外之值;持續檢查該計數值是否為該預設數值;在該計數值不為該預設數值時,判斷是否存有該第一旗幟以及該第二旗幟,若存有該第一旗幟以及該第二旗幟時,產生一第一事件訊號,若存有該第一旗幟但不存有該第二旗幟時,產生一第二事件訊號;對應該第一事件訊號執行一第一功能;以及對應該第二事件訊號執行一第二功能。 A function execution method is applied to an electronic device, the electronic device includes a first button, a second button, and an embedded controller, and the embedded controller has a first input and output pin and a second input and output The first button and the second button are electrically connected to the first input and output pins and the second input and output pins respectively when the second button is pressed, and the function execution method includes: detecting the first input and output a potential difference of the foot; detecting a potential difference of the second input/output pin; if the potential difference of the first input/output pin is pulled down, determining that the first button is pressed; if the second input/output pin is The potential difference is pulled down, determining that the second button is pressed; providing a count value, and the count value is preset to a preset value; if it is determined that the first button is pressed, setting a first flag, and The counter value is changed to a value other than the preset value. If it is determined that the second button is pressed, a second flag is set, and the count value is changed to a value other than the preset value; continuously check whether the count value is For the preset value; when the count value is not the preset value, determining whether the first flag and the second flag are present, and if the first flag and the second flag are stored, generating a first The event signal, if the first flag is stored but the second flag is not present, generating a second event signal; performing a first function corresponding to the first event signal; and performing a second corresponding to the second event signal Features. 如請求項5所述之功能執行方法,於該偵測該第一輸入輸出接腳之該電位差的步驟與該偵測該第二輸入輸出接腳之該電位差的步驟間,更包含下列步驟:等待一預設時間。 The function execution method of claim 5, wherein the step of detecting the potential difference of the first input/output pin and the step of detecting the potential difference of the second input/output pin further comprises the following steps: Wait for a preset time. 如請求項5所述之功能執行方法,其中該產生該第一事件訊號或產生該第二事件訊號的步驟係根據先進組態與電力介面來執行,且該第一事件訊號與該第二事件訊號包含一系統控制中斷協定或一掃瞄碼。The function execution method of claim 5, wherein the step of generating the first event signal or generating the second event signal is performed according to an advanced configuration and a power interface, and the first event signal and the second event are The signal contains a system control interrupt protocol or a scan code.
TW100111336A 2011-03-31 2011-03-31 Electrical device and function executing method applying thereof TWI451289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100111336A TWI451289B (en) 2011-03-31 2011-03-31 Electrical device and function executing method applying thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100111336A TWI451289B (en) 2011-03-31 2011-03-31 Electrical device and function executing method applying thereof

Publications (2)

Publication Number Publication Date
TW201239680A TW201239680A (en) 2012-10-01
TWI451289B true TWI451289B (en) 2014-09-01

Family

ID=47599584

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100111336A TWI451289B (en) 2011-03-31 2011-03-31 Electrical device and function executing method applying thereof

Country Status (1)

Country Link
TW (1) TWI451289B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW510113B (en) * 1999-06-09 2002-11-11 Inventec Corp Device and method for externally connecting keyboard to mobile phone
US20080079611A1 (en) * 2006-10-03 2008-04-03 Nec Electronics Corporation Key input device and key scan method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW510113B (en) * 1999-06-09 2002-11-11 Inventec Corp Device and method for externally connecting keyboard to mobile phone
US20080079611A1 (en) * 2006-10-03 2008-04-03 Nec Electronics Corporation Key input device and key scan method

Also Published As

Publication number Publication date
TW201239680A (en) 2012-10-01

Similar Documents

Publication Publication Date Title
US10409482B2 (en) Electronic system, touch sensitive processing apparatus and method thereof for switching to normal operation mode upon receiving touch gesture in power saving mode
TWI581139B (en) Touch display device and control system thereof
WO2019062471A1 (en) Display screen, mobile terminal, and display method
CN110869929A (en) Earphone with fingerprint authentication
CN105700732A (en) Apparatus, system and method for communication of touch sensor information
CN106502461B (en) Restore the method, device and mobile terminal of touch screen state before electrostatic resets
US11809646B1 (en) System and method for obtaining user input in portable systems
CN108647047A (en) A kind of awakening method and system based on mobile terminal
CN103150209A (en) Portable type tablet computer with double operation systems and control method thereof
TW201403448A (en) Method for improving touch recognition and electronic device thereof
TW201617777A (en) Electronic apparatus and wake-up method thereof
KR102396736B1 (en) Binding of an apparatus to a computing device
CN102736734A (en) Electronic device and function execution method applied thereto
TWI709876B (en) Electronic device and switch method and system for inputting
CN106249874B (en) A kind of report method of sensing data, processor and mobile terminal
EP2972714A1 (en) Providing hybrid touchpad in computing device
TWI451289B (en) Electrical device and function executing method applying thereof
TW201445378A (en) Touch device and measuring voltage dynamic adjustment method thereof
CN106843601A (en) The implementation method of laser projection Touch screen, wearable device and mobile terminal
US20200050314A1 (en) Touch sensing method, electronic device and non-transitory computer readable recording medium device
TWI673634B (en) Electronic system, touch sensitive processing apparatus and method thereof, and host and method thereof
US11003259B2 (en) Modifier key input on a soft keyboard using pen input
TW201643631A (en) Touch apparatus and touch detecting method thereof
TW201721371A (en) An electronic device and method for controlling a smart soundable keyboard
TWI425397B (en) Touch pad module and method for controlling the same

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees