1322893 本發明係揭露一種用於一電子裝置偵測一外部電源之電路裝 置。該電路裝置包含有-針腳、—訊號產生單元、—訊號接收單 元及一判斷單元。該訊號產生單元耦接於該針腳,用來產生一脈 波sfl號。邊sfL號接收單元隸接於該針腳。該判斷單元耗接於該訊 號產生單元及該汛號接收單元,用來根據該訊號產生單元所產生 之該脈波訊號及該訊號接收單元所接收之訊號,判斷該外部電源 ^ 與該電子裝置之連接狀態。 【實施方式】 請參考第2圖,第2圖為本發明用於一電子裝置2〇偵測一外 部電源VEXT2之電路裝置200之功能方塊圖。電路裝置2〇〇包含 有一針腳P2、一訊號產生單元202、一訊號接收單元2〇4及一判 斷單元206。電子裝置2b可透過針腳P2連接外部電源^又下2。 訊號產生單元202耦接於針腳P2,用來產生一脈波訊號SW2。判 • 斷單元206搞接於訊號產生單S 及訊號接收單元綱,用來根 據訊號產生單元202所產生之脈波訊號SW2及訊號接收單元2〇4 所接收之訊號,判斷外部電源VEXT2與電子裝置2〇之連接狀態。 電路裝置200另包含一整流單元208,用來轉換針腳p2所輸出之 訊號成一直流電壓訊號VDC。在外部電源MXT2透過針腳p2連 接至電子裝置20的情況下’訊號接收單元204所接收之訊號會隨 著訊號產生單元202產生之脈波訊號SW2改變,則判斷單元2〇6 可據此判斷外部電源VEXT2與電子裝置20連接;相反地,在外 7 1322893 VEXT2 f+m的情況τ’訊號接收單元204 Γ ί不讀著瓣—G2赶德_繼改 炎’則判斷早兀206可據此判斷外部電源概丁2與電子裝置% =接。因此,靖置2⑻可判斷電子裝置2〇與外部電源聰2 的連接狀態’並同時輸出直流麵訊號VDO在習知電子裝置中, 用來輸出直流電壓訊號與偵測外部電源所使用之針腳往往不同。 /也·本Uf路裝置2〇〇可彻同—針㈣時達測外部 1與輸出直流電壓訊號之目的,以節省電子裝置2〇之生產成扣 請參考第3圖,第3圖為本發明實施例用於-電子裝置30 =-外部電源VE功之電路裝請之示意圖。電路裝置3〇〇 =Γ針腳P3、一訊號產生單元302、一輸入緩衝器姻及-判 斷早7L 306。電子裝置3G係-微處嗎,其可透過詹p3,連接 外部電源VEXT3及輸出訊號以控制週邊元件。訊號產生單元搬 包含-電晶體Q3及—輸出緩衝器⑺,用來產生—脈寬調變訊號 j。電晶體Q3係-N型金屬氧化半導體電晶體,其沒極祕 二P3 ’閘極耦接輸出缓衝器忉’而源極則耦接於地端。輸出 、、衝益U3輸出脈寬調變訊號SW3至電晶體φ之問極,以控制 電晶體Q3之導通與關閉。判斷單元篇則根據訊號產生單元3〇2 =產生之脈寬調變訊號SW3及輸入緩衝器3〇4所接收之一電壓訊 =V3 ’判斷外部電源概乃與電子裝置3〇之連接狀態。由第3 Θ可知’電晶體Q3及一電阻尺形成一開汲極(〇penDrain)電路。 因此,當外部電源veXT3透過針腳π連接於電子裝置3〇時,電 輸出控制之針腳。 來作 腳。因此’本發明可擴大針叫以節:=:卜的針 以上所述僅林翻讀佳實麵,凡 圍所做之解瓶與修飾1麵本㈣之醒細申4梅 【圖式簡單說明】 第1圖為習知用於-微處理器_—外部電源之電路褒 圖 置之示意 電路裝置之功 第2圖為本發明用於—電子裝置_—外部電源之 能方塊圖。 電路裝 第3圖為本發明實施例用於一電子裝置偵測一外部電源之 置之功能示意圖。 第4圖為於該直流訊號輸出—高電壓訊號時第3圖之訊號接 收單元接收之城流單元輸出之—纽顏峨之相關訊號 波形圖。 第5圖為於該直流電壓訊號輸出一低電壓訊號時第3圖之訊號接 收單凡接收之訊號與整辟元輪出之—直流電壓訊號之相關訊號 波形圖。 。& 1322893 【主要元件符號說明】 10、20、30 100、200 PI、P2、P3 202、302 204 102、206、306 ® 208 、 308 304 U3 Q3 VEXT1 ' VEXT2 SW2、SW3 VDC、VOUT • V3 R ' R1 > R21322893 The present invention discloses a circuit arrangement for detecting an external power supply by an electronic device. The circuit device comprises a - pin, a signal generating unit, a signal receiving unit and a determining unit. The signal generating unit is coupled to the pin for generating a pulse sfl number. The receiving unit of the sfL number is attached to the pin. The determining unit is connected to the signal generating unit and the nickname receiving unit for determining the external power source and the electronic device according to the pulse signal generated by the signal generating unit and the signal received by the signal receiving unit The connection status. [Embodiment] Please refer to FIG. 2, which is a functional block diagram of a circuit device 200 for detecting an external power supply VEXT2 in an electronic device 2 of the present invention. The circuit device 2A includes a pin P2, a signal generating unit 202, a signal receiving unit 2〇4, and a determining unit 206. The electronic device 2b can be connected to the external power source ^2 via the pin P2. The signal generating unit 202 is coupled to the pin P2 for generating a pulse signal SW2. The determining unit 206 is connected to the signal generating unit S and the signal receiving unit for determining the external power source VEXT2 and the electronic signal according to the signal received by the pulse signal SW2 and the signal receiving unit 2〇4 generated by the signal generating unit 202. The connection state of the device 2〇. The circuit device 200 further includes a rectifying unit 208 for converting the signal output by the pin p2 into a DC voltage signal VDC. In the case where the external power source MXT2 is connected to the electronic device 20 through the pin p2, the signal received by the signal receiving unit 204 changes with the pulse signal SW2 generated by the signal generating unit 202, and the determining unit 2〇6 can judge the externally based on the pulse signal SW2 generated by the signal generating unit 202. The power supply VEXT2 is connected to the electronic device 20; conversely, in the case of the outer 7 1322893 VEXT2 f+m, the signal receiving unit 204 Γ ί does not read the valve - G2 _ _ _ _ _ _ _ _ _ _ _ _ _ _ The external power supply 2 is connected to the electronic device %=. Therefore, Yasushi 2(8) can judge the connection state of the electronic device 2〇 to the external power supply C2 and simultaneously output the DC surface signal VDO. In the conventional electronic device, the pin used to output the DC voltage signal and detect the external power source is often used. different. / Also · This Uf road device 2 can be the same as the needle (four) to measure the external 1 and output DC voltage signal, in order to save the production of electronic devices 2 成, please refer to Figure 3, Figure 3 DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A schematic diagram of a circuit arrangement for an electronic device 30 = external power supply VE power. The circuit device 3 〇〇 = Γ pin P3, a signal generating unit 302, an input buffer, and the decision 7L 306. The electronic device 3G is a micro-location, which can connect the external power supply VEXT3 and the output signal to control the peripheral components through the Zhan p3. The signal generating unit carries a transistor Q3 and an output buffer (7) for generating a pulse width modulation signal j. The transistor Q3 is an N-type metal oxide semiconductor transistor, which is not very secretive. The P3' gate is coupled to the output buffer 忉' and the source is coupled to the ground. The output, and the benefit U3 output the pulse width modulation signal SW3 to the transistor of the transistor φ to control the conduction and closing of the transistor Q3. The judging unit judges the connection state of the external power source and the electronic device 3 according to the pulse width modulation signal SW3 generated by the signal generating unit 3〇2 = and the voltage signal = V3 ' received by the input buffer 3〇4. It is known from the third section that the transistor Q3 and a resistor scale form an open drain (〇penDrain) circuit. Therefore, when the external power source veXT3 is connected to the electronic device 3 through the pin π, the control pin is electrically output. Come to work. Therefore, the invention can expand the needle to call the section: =: the needle of the above mentioned only the forest to read the good side, the surrounding bottle and the modified one side (four) of the wake-up Shen 4 Mei [simple figure Description of the Drawings Fig. 1 is a diagram showing the function of a schematic circuit device for a circuit diagram of an external power supply. Fig. 2 is a block diagram of an external power supply for an electronic device of the present invention. Circuit Pack FIG. 3 is a schematic diagram of the function of an electronic device for detecting an external power source according to an embodiment of the present invention. Figure 4 is a waveform diagram of the relevant signal of the New York 输出 output of the urban stream unit received by the signal receiving unit of Fig. 3 when the DC signal output-high voltage signal is output. Figure 5 is a waveform diagram of the signal related to the received signal and the DC voltage signal of the signal received by the signal received in the signal output of Figure 3 when the DC voltage signal is outputting a low voltage signal. . & 1322893 [Description of main component symbols] 10, 20, 30 100, 200 PI, P2, P3 202, 302 204 102, 206, 306 ® 208, 308 304 U3 Q3 VEXT1 'VEXT2 SW2, SW3 VDC, VOUT • V3 R ' R1 > R2
VHVH
VL 電子裝置 電路裝置 針腳 訊號產生單元 訊號接收單元 判斷單元 整流單元 輸入緩衝器 輸出緩衝器 電晶體 VEXT3 外部電源 脈波訊號 直流電壓訊號 電壓訊號 電阻 高電壓訊號 低電壓訊號 11VL electronic device circuit device pin signal generation unit signal receiving unit judgment unit rectifier unit input buffer output buffer transistor VEXT3 external power supply pulse signal DC voltage signal voltage signal resistance high voltage signal low voltage signal 11