Γ377491 101年.09月20日修正替換頁 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及一種方向傳感電路及應用該電路的電子裝置 〇 【先前技術】 [0002] 目前,越來越多的電子裝置使用方向傳感電路來實現相 應功能。例如,在數碼相框中,所述方向傳感電路用於 控制顯示圖像的狀態,或在其他電子裝置中執行其他控 制功能》 [0003] 圖3為現有技術中方向傳感電路10的硬體架構圖。所述方 向傳感電路10包括一滾珠開關K1、一處理器U1及電阻R1 、R2。所述滾珠開關K1包括一第一引腳1、一第二引腳2 、一第三引腳3、一第四引腳4及一滾珠5。所述處理器U1 包括一第一輸入端101及一第二輸入端102。所述第一引 . 腳1電連接於所述第一輸入端101,同時經由所述電阻R1 電連接於一電源VCC ;所述第二引腳2電連接於所述第二 輸入端102,同時經由所述電阻R2電連接於所述電源VCC ;所述第三引腳3及第四引腳4接地。當所述滚珠5將所述 第一、第二、第三及第四引腳按順時針兩兩接通時,所 述第一輸入端101與第二輸入端102獲得的組合輸入狀態 為11、10、11及01,有效狀態為11、10、01。所述處理 器U1存儲一輸入端的組合輸入狀態對應的控制信號列表 ,根據檢測的組合輸入狀態及所述列表輸出對應的控制 信號,並根據該控制信號完成方向控制。然而,上述方 向傳感電路10應用於一電子裝置時,只能探測到三種放 0^02#單編號A_ 第3頁/共20頁 1013359261-0 1377491 101年09月20日按正替換頁 置方位,一般情況下電子裝置有4種放置方位,因此其無 法滿足這樣的要求。 [0004] 解決上述問題的較常用途徑是增加處理器用於連接該方 向傳感電路的引腳的輸入端(10口),這樣會佔用處理 器過多的輸入端,增加方向傳感電路設計的難度。 [0005] 鑒於上述問題,有必要發明一種方向傳感電路及運用該 方向傳感電路的電子裝置,在只使用處理器的兩個輸入 端情況下,可以探測到方向傳感電路4種放置方位,使得 方向傳感電路及運用該方向傳感電路的電子裝置可以實 現更多的應用或避免誤操作。 【發明内容】 [0006] 本發明的目的在於提供一種佔用較少輸入端的方向傳感 電路。 [0007] 所提供的方向傳感電路,包括一滾珠開關,一處理器' 所述處理器包括一第一輸入端及一第二輸入端。所述滾 珠開關具有一第一引腳、一第二引腳、一第三引腳及一 第四引腳。所述電路還包括一第一電流導通極串聯的互 補導通的第一、第二開關管,一第一電阻、一第二電阻 及一第三電阻。所述第二電阻的阻值遠大於所述第一電 阻與第三電阻的阻值。所述第一引腳接地,第二引腳電 連接於第二輸出端,第三引腳電連接於一電源,第四引 腳經由所述第二電阻電連接於所述第二引腳。第一與第 二開關管的第一電流導通極電連接於一節點,該節點電 連接於第一輸入端及第四引腳,第一開關管的第二電流 導通極經由所述第一電阻電連接於所述電源,第二開關 1013359261-0 _1〇2,單编號A〇101 第4頁/共20頁 Γ377491 [0008] [0009] s的第—電流導通極經由所述第三電阻接地,第一、二 開關營的控制極都與第二引腳電連接並回應所述第二 引腳的電f輪流導通。所述處理时儲有-第-和第二 ^入端的組合輸人㈣對應的㈣信號的列表根據所 第和第一輸入端的組合輸入狀態及所述列表輸出對 應的控^號’並根據該控制信號執行旋轉控制。 本發明的另—目的在於提供-種應用方向傳感電路的電 子裝置。 所提供的應用方向傳感電路的電子裝置,包括—滾珠開 關’-處理器。所述處理器包括一第一輸入端及一第二 輸入端。所述滾珠開關具有一第_引腳、一第二引腳、 一第三引腳及一第四引腳。所述電路還包括一第一電流 導通極串聯的互補導通的第一、第二開關管,一第一電 阻、一第二電阻及一第三電阻。所述第二電阻的阻值遠 大於所述第一電阻與第三電阻的阻值。所述第一引腳接 地,笫久引腳電連接於第二輸出端,第三引腳電連接於 一電源,第四引腳經由所述第二電阻電連接於所述第二 引腳。第一與第二開關管的第一電流導通極電連接於一 節點,该節點電連接於第一輸入端及第四引腳,第一開 關管的第二電流導通極經由所述第一電阻電連接於所述 電源,第二開關管的第二電流導通極經由所述第三電阻 接地,第一、二開關管的控制極都與第二引腳電連接, 並回應所述第一引腳的電平輪流導通。所述處理器存儲 有一第〆和第二輪入端的組合輸入狀態對應的控制信號 的列表,根據所述第一和第二輸入端的組合輪入狀態及 09811029#單編號删1 第5頁/共20頁 1013359261-0 1377491 101年09月20日修正替换頁 所述列表輸出對應的控制信號,並根據該控制信號執行 旋轉控制,實現電子裝置的相應功能。 [0010] 本發明之優點在於’所述方向傳感電路犮應用該方向傳 感電路的電子裝置’在佔用較少輸入端的情況下,可以 探測到方向傳感電路4種放置方位,使得方向傳感電路及 運用該方向傳感電路的電子裝置可以實現更多的應用或 避免誤操作》 【實施方式】 [0011]請參考圖1,圖1為本發明方向傳感電路20的硬體架構圖 。所述電路20包括滚珠開關K10、處理器U10、一第一電 阻R11、一第二電阻R13、一第三電阻R12、一第一開關 管Q1及一第二開關管Q2。所述處理器U1()包括一第一輸入 端101及一第二輸入端102。在本實施例中,所述第一、 二輸入端101和1〇2輸入信號時,被定義為高阻狀態。所 述第二電阻R13的阻值遠大於所述第一電阻Ru與第三電 阻R12的阻值。所述第二電阻R13阻值例舉為1〇〇k,所述 第一電阻Rii與第三電阻R12的阻值例舉為1〇k。所述第 一開關管Q1例舉為一 P溝道增強型金屬氧化物半導體場效 應管Q1,所述第二開關管被例舉為-N溝道耗盡型場效應 管的。在其他實旅方式中’所述第-場效應管Q1及所述 第二場效應管Q2亦可被例舉為結型場效應管。 [0012]所述滾珠開關Kl〇包括一第一引腳1、一第二引腳2、一第 三引腳3、-第四引腳4及一滾珠5。所述第一引腳】接地 ,所述第二引脚2電連接於所述處理器Ul〇的第二輸出端 Ϊ02,所述第;;弓丨腳3電連接於—雷 ι乐一 电恭Vcc,所述第四引腳 09811029^早编號A0101 第6頁/共20頁 1013359261-0 1101年09月20日修正替換頁 4經由-第二電阻r13電連接於所述第二引腳?。第一開關 管Q1的第-電流導通極即漏極與第二開關管叫的第一電 流導通極即漏極電連接,其連接點電連接於所述處理器 U10的第一輸入端101及所述第四弓丨腳4,所述第一開關管 Q1的第二電流導通極即源極經由第一電阻R1 i電連接於所 述電源Vcc β第二開關管⑽的第二電流導通極即源極經由 第三電阻R12接地;第一開關管Q1與第二開關管q2的控制 極即栅極都與所述第二引腳2電連接,第一開關管Q1與第 二開關管Q2回應所述第二引腳的電平輪流導通。 [0013] 圖2A〜2D示出了方向傳感電路20應用於一電子裝置時,所 述滾珠5與引腳1-4之間的連接關係。在本發明具體實施 方式中,電子裝置被例舉為一數碼相框,所述的方向傳 感電路20用於控制數碼相框的顯示器12顯示的圖像。當 所述顯示器12豎立時,所述滾珠5將處於以下幾種狀態.Γ 377 491 101 Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ Γ More and more electronic devices use directional sensing circuits to achieve the corresponding functions. For example, in a digital photo frame, the direction sensing circuit is used to control the state of displaying an image, or perform other control functions in other electronic devices. [0003] FIG. 3 is a hardware of the direction sensing circuit 10 in the prior art. Architecture diagram. The direction sensing circuit 10 includes a ball switch K1, a processor U1, and resistors R1 and R2. The ball switch K1 includes a first pin 1, a second pin 2, a third pin 3, a fourth pin 4, and a ball 5. The processor U1 includes a first input terminal 101 and a second input terminal 102. The first pin 1 is electrically connected to the first input terminal 101, and is electrically connected to a power source VCC via the resistor R1; the second pin 2 is electrically connected to the second input terminal 102, At the same time, it is electrically connected to the power source VCC via the resistor R2; the third pin 3 and the fourth pin 4 are grounded. When the ball 5 turns the first, second, third and fourth pins clockwise two or two, the combined input state obtained by the first input terminal 101 and the second input terminal 102 is 11 , 10, 11 and 01, the valid status is 11, 10, 01. The processor U1 stores a control signal list corresponding to the combined input state of an input terminal, outputs a corresponding control signal according to the detected combined input state and the list, and completes direction control according to the control signal. However, when the above-mentioned direction sensing circuit 10 is applied to an electronic device, only three types of 0^02# single number A_ 3rd page/total 20 pages 1013359261-0 1377491 can be detected. Orientation, in general, the electronic device has four placement orientations, so it cannot meet such requirements. [0004] A more common way to solve the above problem is to increase the input end (10 ports) of the pin used by the processor to connect the direction sensing circuit, which will occupy too many input terminals of the processor and increase the difficulty of designing the direction sensing circuit. . [0005] In view of the above problems, it is necessary to invent a direction sensing circuit and an electronic device using the same, and in the case of using only two input terminals of the processor, four orientations of the direction sensing circuit can be detected. The directional sensing circuit and the electronic device using the directional sensing circuit can realize more applications or avoid erroneous operations. SUMMARY OF THE INVENTION [0006] It is an object of the present invention to provide a directional sensing circuit that occupies fewer inputs. [0007] The provided directional sensing circuit includes a ball switch, and a processor includes a first input end and a second input end. The ball switch has a first pin, a second pin, a third pin and a fourth pin. The circuit further includes first and second switching tubes that are mutually coupled in series with the first current conducting poles, a first resistor, a second resistor, and a third resistor. The resistance of the second resistor is much larger than the resistance of the first resistor and the third resistor. The first pin is grounded, the second pin is electrically connected to the second output, the third pin is electrically connected to a power source, and the fourth pin is electrically connected to the second pin via the second resistor. The first current conducting poles of the first and second switching tubes are electrically connected to a node, the node is electrically connected to the first input end and the fourth pin, and the second current conducting pole of the first switching tube is via the first resistor Electrically connected to the power source, the second switch 1013359261-0 _1 〇 2, single number A 〇 101 page 4 / total 20 pages Γ 377491 [0008] [0009] s the first current conduction pole via the third resistor Grounding, the control poles of the first and second switch camps are electrically connected to the second pin and are electrically turned on in response to the electric f of the second pin. The processing stores a combination of the -the second and the second input terminals (four) corresponding to the (four) signal list according to the combined input state of the first and first input terminals and the corresponding output control number of the list and according to the The control signal performs a rotation control. Another object of the present invention is to provide an electronic device to which a direction sensing circuit is applied. An electronic device for applying a direction sensing circuit is provided, including a ball switch'-processor. The processor includes a first input and a second input. The ball switch has a _ pin, a second pin, a third pin and a fourth pin. The circuit further includes a first and a second switching transistor of the first conducting current conducting series connected in series, a first resistor, a second resistor and a third resistor. The resistance of the second resistor is much larger than the resistance of the first resistor and the third resistor. The first pin is grounded, the long-term pin is electrically connected to the second output terminal, the third pin is electrically connected to a power source, and the fourth pin is electrically connected to the second pin via the second resistor. The first current conducting poles of the first and second switching tubes are electrically connected to a node, the node is electrically connected to the first input end and the fourth pin, and the second current conducting pole of the first switching tube is via the first resistor Electrically connected to the power source, the second current conducting pole of the second switching transistor is grounded via the third resistor, and the control poles of the first and second switching tubes are electrically connected to the second pin, and respond to the first lead The level of the foot turns on in turn. The processor stores a list of control signals corresponding to the combined input states of the second and second round-ends, according to the combined round-in state of the first and second inputs, and the number of 09811029# single number deleted 1 page/total 20 pages 1013359261-0 1377491 On September 20, 101, the replacement page replaces the control signal corresponding to the list output, and performs rotation control according to the control signal to realize the corresponding function of the electronic device. [0010] An advantage of the present invention is that the electronic device of the direction sensing circuit 犮 applying the directional sensing circuit can detect four orientations of the directional sensing circuit when the input terminal is occupied, so that the direction is transmitted. The sensing circuit and the electronic device using the directional sensing circuit can realize more applications or avoid erroneous operations. [Embodiment] [0011] Please refer to FIG. 1. FIG. 1 is a hardware structural diagram of the directional sensing circuit 20 of the present invention. The circuit 20 includes a ball switch K10, a processor U10, a first resistor R11, a second resistor R13, a third resistor R12, a first switch Q1, and a second switch Q2. The processor U1() includes a first input terminal 101 and a second input terminal 102. In the embodiment, when the first and second input terminals 101 and 1-2 input signals, they are defined as a high impedance state. The resistance of the second resistor R13 is much larger than the resistance of the first resistor Ru and the third resistor R12. The resistance of the second resistor R13 is exemplified as 1 〇〇 k, and the resistance values of the first resistor Ri and the third resistor R12 are exemplified as 1 〇 k. The first switching transistor Q1 is exemplified by a P-channel enhancement type metal oxide semiconductor field effect transistor Q1, and the second switching transistor is exemplified as an -N channel depletion field effect transistor. In other modes of travel, the first field effect transistor Q1 and the second field effect transistor Q2 may also be exemplified as junction field effect transistors. [0012] The ball switch K10 includes a first pin 1, a second pin 2, a third pin 3, a fourth pin 4, and a ball 5. The first pin is grounded, the second pin 2 is electrically connected to the second output terminal Ϊ02 of the processor U1〇, and the first pin is electrically connected to the ray. Christine Vcc, the fourth pin 09811029^ early number A0101, page 6 / total 20 pages 1013359261-0, September 20, 1101, the replacement page 4 is electrically connected to the second pin via a second resistor r13 ? . The first current conducting terminal of the first switching transistor Q1, that is, the drain is electrically connected to the first current conducting terminal, that is, the drain of the second switching transistor, and the connection point is electrically connected to the first input terminal 101 of the processor U10 and The fourth pole pin 4, the second current conducting pole of the first switching transistor Q1, that is, the source is electrically connected to the second current conducting pole of the second switching tube (10) of the power source Vcc β via the first resistor R1 i That is, the source is grounded via the third resistor R12; the gates of the first switch transistor Q1 and the second switch transistor q2 are electrically connected to the second pin 2, and the first switch transistor Q1 and the second switch transistor Q2 The level of the second pin is turned on in turn. 2A to 2D show the connection relationship between the balls 5 and the pins 1-4 when the direction sensing circuit 20 is applied to an electronic device. In an embodiment of the invention, the electronic device is exemplified as a digital photo frame, and the directional sensing circuit 20 is for controlling an image displayed by the display 12 of the digital photo frame. When the display 12 is erected, the balls 5 will be in the following states.
[0014] 1 ·如圖2A所示,所述滚珠5將所述第一引腳1與所述第二 引腳2電連接時,所述滚珠開關K10的第二引腳2經由所述 第一引腳1接地,所述第二輸入端1〇2變為低電平。由於 所述第一開關管Q丨與第二開關管Q 2的控制極為低電平, 則所述第一場效應管w導通,所述第二場效應管Q2截止 。此時,所述第—電阻以1與第二電阻R13串聯於所述電 源Vcc與地之間。由於所述第二電阻R13遠大於所述第一 電阻R11,故所述第一輸入端101變為高電平,所述第一 、二輸入端i〇i*I〇2的組合輸入狀態為1〇 ; [0015] 2 .如圖2B所示,所述滚珠5將所述第二引腳2與所述第三 引腳3電連接時,所述滚珠開關U10的第二引腳2經由所述 09811029^早編號 A0101 第 7 頁 / 兵別頁 1013359261-0 1377491 1101年09月20日接正替换頁 第一引腳3電連接所述電源vcc,所述第二輸入端1〇2變為 N电平。所述第一開關管Qi與所述第二開關管Q2的控制 極變為高電平,則所述第-㈣管Q1截止,所述第二開 關管Q2導通。此時,第三電阻R12與第二電阻R13串聯於 所述電源VCC與地之間。由於所述第二電阻R13遠大於所 述第三電阻R12,故所述第一輸入端1〇1變為低電平,所 述第一、二輸入端101和102的組合輸入狀態為〇1 ; [0016] 3 .如圖2C所示,所述滾珠5將所述第三引腳3與所述第四 引腳4電連接時,所述滾珠開關ϋ1〇的第四引腳4經由所述 第二引腳3電連接所述電源vcc,所述第一輸入端1〇1變為 高電平《由於輸入端1〇1和102被設置為高阻狀態,所述 第二引腳2通過所述第二電阻R13和第二輸入端1〇2獲得一 高電平。所述第一開關管Q1與所述第二開關管Q2的控制 極為高電平,則所述第一開關管Q1裁止,所述第二開關 管Q2導通》所述第二輸入端1〇2變為高電平,所述第一、 二輸入端101和102的組合輸入狀態為u ; [〇〇17] 4 ·如圖2D所示,所述滾珠5將所述第一引腳丨與所述第四 引腳4電連接時,所述滾珠開關ϋ1〇的第四引腳4經由所述 第一引腳1接地,所述第一輸入端1〇1變為低電平❶所述 第一開關管Q1與所述第二開關管Q 2的控制極為低電平, 則所述第一場效應管Q1導通,所述第二場效應管q2截止 。此時,所述第二輸入端1〇2經由所述第二電阻r3接地, 故所述第二輸入端102變為低電平,所述第一、二輸入端 101和102的組合輸入狀態為〇〇。 1013359261-0 [0018]所述處理器U10存儲一列表1〇〇,所述列表1〇〇定義了所 〇9811029产單编號A01〇l 第8頁/共2〇頁 Γ377491 101年.09月20日修正巷換頁 述處理器U10的輸入端101、102的组合狀態與控制信號 的對應關係。 [0019]列表100 : 第一輸入端 第二輸入端 控制信號 1 0 S1 0 1 S2 1 1 S3 0 0 S4 如列表100所示,當輸入端101與102的組合輸入狀態為 10時,所述處理器U10根據所述列表100讀取控制信號 S1;當輪入端101與102的組合輸入狀態為01時,所述處 理器U10根據所述列表1〇〇讀取控制信號S2;當輸入端 101與102的組合輸入狀態為11時,所述處理器U10根據 所述列表100讀取控制信號S3;當輸入端101與102的組 合輸入狀態為00時,所述處理器U10根據所述列表100讀 取控制信號S4。所述處理器U10根據讀取的控制信號執行 圖像的方向控制。 [0〇21] 例如,如圖2A所示,若顯示器12正立時,所述輸入端101 、102的組合輸入狀態為1〇,所述處理器υιό根據該輸入 端的組合輸入狀態10及所述列表1〇〇讀取對應的控制信號 S1,根據該控制信號S1獲知顯示器12顯示的原始圖像的 旋轉的角度為0度,繼續顯示並維持圖像正立。 [0022]如圖2B所示,若當顯示器12逆時針或者順時針旋轉至顯 示器左邊框平行於水平面時,所述輸入端1〇1、1〇2的組 第9頁/共20頁 1013359261-0 1377491 101年09月20日梭正替换頁 合輸入狀態為01,所述處理器U10根據該輸入端的組合輸 入狀態01及所述列表100讀取對應的控制信號S2,根據該 控制信號S2獲知電子裝置20顯示的原始圖像需要順時針 旋轉90度,將旋轉後的原始圖像顯示於所述顯示器12, 並維持圖像正立。 [0023] 如圖2C所示,若當顯示器12倒立時,所述輸入端101、 102的組合輸入狀態為11,所述處理器U10根據該輸入端 的組合輸入狀態11及所述列表100讀取對應的控制信號S3 ,根據該控制信號S3獲知電子裝置20顯示的原始圖像需 要旋轉180度,將旋轉後的原始圖像顯示於所述顯示器12 ,並維持圖像正立。 [0024] 如圖2D所示,若當顯示器12逆時針或者順時針旋轉至顯 示器右邊框平行於水平面時,所述輸入端101、102的組 合輸入狀態為00,所述處理器U10根據該輸入端的組合輸 入狀態00及所述列表100讀取對應的控制信號S2,根據該 控制信號S2獲知電子裝置20顯示的原始圖像需要逆時針 旋轉90度,將旋轉後的原始圖像顯示於所述顯示器12, 並維持圖像正立。 [0025] 在其他實施方式中,所述方向傳感電路20還包括一計時 器(圖未示),用於計時所述第一及第二輸入端獲得組 合輸入狀態的時間,且在所述計時器計時時間達到一預 設時間時,所述處理器U10根據獲得的輸入端的組合輸入 狀態和關係表100輸出對應的控制信號,根據該控制信號 執行相應控制。 _魔#單編號A0101 第10頁/共20頁 1013359261-0 Γ377491 101年.09月20日修正替換頁 [0026] 綜上所述,本發明所述方向傳感電路及應用該方向傳感 電路的電子裝置,在只使用處理器的兩個輸入端情況下 ,可以探測到方向傳感電路4種放置方位,使得方向傳感 電路及運用該方向傳感電路的電子裝置可以實現更多的 應用或避免誤操作。 【圖式簡單說明】 [0027] 圖1為本發明方向傳感電路的硬體架構圖。 [0028] 圖2A〜2D示出了方向傳感電路應用於一電子裝置時,滚珠 與引腳之間的連接關係。 [0029] 圖3為現有技術中方向傳感電路的硬體架構圖。 【主要元件符號說明】 [0030] 方向傳感電路 20 [0031] 第一電阻 R11 [0032] 第二電阻 R13 [0033] 第三電阻 R12 [0034] 第一開關管 Q1 [0035] 第二開關管 Q2 [0036] 滾珠開關 K10、K1 [0037] 處理器 U10 ' U1 [0038] 電阻 Rl、R2 [0039] 方向傳感電路 10 1013359261-0 第11頁/共20頁[0014] 1 as shown in FIG. 2A, when the ball 5 electrically connects the first pin 1 and the second pin 2, the second pin 2 of the ball switch K10 passes through the first One pin 1 is grounded, and the second input terminal 1 〇2 becomes a low level. Since the control of the first switching transistor Q丨 and the second switching transistor Q 2 is extremely low, the first FET w is turned on, and the second FET Q2 is turned off. At this time, the first resistor and the second resistor R13 are connected in series between the power source Vcc and the ground. The first input terminal 101 becomes a high level, and the combined input state of the first and second input terminals i〇i*I〇2 is [0015] 2. As shown in FIG. 2B, when the ball 5 electrically connects the second pin 2 and the third pin 3, the second pin 2 of the ball switch U10 passes through The 09811029^早号 A0101 Page 7 / 兵兵页1013359261-0 1377491 On September 20, 1101, the first pin 3 is electrically connected to the power source vcc, and the second input terminal 1〇2 is changed. It is N level. When the control poles of the first switching transistor Qi and the second switching transistor Q2 become a high level, the first (four)th tube Q1 is turned off, and the second switching tube Q2 is turned on. At this time, the third resistor R12 and the second resistor R13 are connected in series between the power source VCC and the ground. Since the second resistor R13 is much larger than the third resistor R12, the first input terminal 1〇1 becomes a low level, and the combined input state of the first and second input terminals 101 and 102 is 〇1. [0016] 3. As shown in FIG. 2C, when the ball 5 electrically connects the third pin 3 and the fourth pin 4, the fourth pin 4 of the ball switch ϋ1〇 passes through The second pin 3 is electrically connected to the power source vcc, and the first input terminal 1〇1 becomes a high level. “Because the input terminals 1〇1 and 102 are set to a high-impedance state, the second pin 2 A high level is obtained by the second resistor R13 and the second input terminal 1〇2. The first switch tube Q1 and the second switch tube Q2 are controlled to be at a high level, the first switch tube Q1 is cut, and the second switch tube Q2 is turned on. 2 becomes a high level, the combined input state of the first and second input terminals 101 and 102 is u; [〇〇17] 4 · As shown in FIG. 2D, the ball 5 will be the first pin 丨When electrically connected to the fourth pin 4, the fourth pin 4 of the ball switch ϋ1〇 is grounded via the first pin 1, and the first input terminal 1〇1 becomes a low level The control of the first switching transistor Q1 and the second switching transistor Q 2 is extremely low, and the first FET Q1 is turned on, and the second FET q2 is turned off. At this time, the second input terminal 1〇2 is grounded via the second resistor r3, so the second input terminal 102 becomes a low level, and the combined input states of the first and second input terminals 101 and 102 are Why? 1013359261-0 [0018] The processor U10 stores a list 1〇〇, the list 1〇〇 defines the number 9811029 production order number A01〇l page 8 / total 2 pages Γ 377491 101 years. September On the 20th, the corresponding relationship between the combined state of the input terminals 101, 102 of the processor U10 and the control signal is changed. [0019] List 100: first input second input control signal 1 0 S1 0 1 S2 1 1 S3 0 0 S4 as shown in the list 100, when the combined input state of the input terminals 101 and 102 is 10, The processor U10 reads the control signal S1 according to the list 100; when the combined input state of the wheel terminals 101 and 102 is 01, the processor U10 reads the control signal S2 according to the list 1〇〇; When the combined input state of 101 and 102 is 11, the processor U10 reads the control signal S3 according to the list 100; when the combined input state of the input terminals 101 and 102 is 00, the processor U10 according to the list 100 reads the control signal S4. The processor U10 performs directional control of the image based on the read control signal. [0〇21] For example, as shown in FIG. 2A, when the display 12 is erected, the combined input state of the input terminals 101, 102 is 1〇, and the processor υιό inputs the state 10 according to the combination of the input terminals and the The list 1〇〇 reads the corresponding control signal S1, and according to the control signal S1, it is known that the angle of rotation of the original image displayed by the display 12 is 0 degrees, and the image is continuously displayed and maintained. [0022] As shown in FIG. 2B, if the display 12 is rotated counterclockwise or clockwise until the left border of the display is parallel to the horizontal plane, the group of the input terminals 1〇1, 1〇2 is 9th page/total 20 pages 1013359261 0 1377491 On September 20, 101, the shuttle replacement page input state is 01, the processor U10 reads the corresponding control signal S2 according to the combined input state 01 of the input terminal and the list 100, and learns according to the control signal S2. The original image displayed by the electronic device 20 needs to be rotated 90 degrees clockwise, the rotated original image is displayed on the display 12, and the image is maintained erect. [0023] As shown in FIG. 2C, if the combined input state of the input terminals 101, 102 is 11 when the display 12 is inverted, the processor U10 reads according to the combined input state 11 of the input terminal and the list 100. Corresponding control signal S3, according to the control signal S3, knows that the original image displayed by the electronic device 20 needs to be rotated by 180 degrees, and displays the rotated original image on the display 12 and maintains the image erect. [0024] As shown in FIG. 2D, if the display 12 is rotated counterclockwise or clockwise until the right border of the display is parallel to the horizontal plane, the combined input state of the input terminals 101, 102 is 00, and the processor U10 is based on the input. The combined input state 00 of the terminal and the list 100 read the corresponding control signal S2, and according to the control signal S2, it is learned that the original image displayed by the electronic device 20 needs to be rotated 90 degrees counterclockwise, and the rotated original image is displayed on the Display 12, and maintain the image erect. [0025] In other embodiments, the direction sensing circuit 20 further includes a timer (not shown) for timing the first and second inputs to obtain a combined input state, and in the When the timer time reaches a preset time, the processor U10 outputs a corresponding control signal according to the obtained combined input state and relationship table 100, and performs corresponding control according to the control signal. _魔#单号A0101 Page 10/Total 20 Page 1013359261-0 Γ377491 101. September 20th Revision Replacement Page [0026] In summary, the directional sensing circuit of the present invention and the application of the directional sensing circuit The electronic device can detect four orientations of the direction sensing circuit when only two input ends of the processor are used, so that the direction sensing circuit and the electronic device using the direction sensing circuit can realize more applications. Or avoid misuse. BRIEF DESCRIPTION OF THE DRAWINGS [0027] FIG. 1 is a hardware architecture diagram of a direction sensing circuit of the present invention. 2A to 2D illustrate the connection relationship between the balls and the pins when the direction sensing circuit is applied to an electronic device. 3 is a hardware architecture diagram of a direction sensing circuit in the prior art. [Main component symbol description] [0030] Directional sensing circuit 20 [0031] First resistor R11 [0032] Second resistor R13 [0033] Third resistor R12 [0034] First switching transistor Q1 [0035] Second switching transistor Q2 [0036] Ball Switch K10, K1 [0037] Processor U10 ' U1 [0038] Resistor R1, R2 [0039] Direction Sensing Circuit 10 1013359261-0 Page 11 of 20