丨-CI-0124-TWXX 21316twf.doc/e 九、發明說明: 【發明所屬之技術領域】 本發明是關於一種偵測電池電量系統及其手持式電子 裝置,且特別是有關於一種可多段偵測手持式電子穿置之 電池電量,並可提升電路設計使用彈性及可降低製^成 的4貞測電池電量系統及其手持式電子襄置。 【先前技術】丨-CI-0124-TWXX 21316twf.doc/e IX. Description of the Invention: [Technical Field] The present invention relates to a battery power detection system and a handheld electronic device thereof, and more particularly to a multi-segment detection Measure the battery power of the handheld electronic device, and improve the flexibility of the circuit design and reduce the system's 4 贞 battery power system and its handheld electronic device. [Prior Art]
(hand-held electronic device) 的蓬勃發展,例如:手持式個人電腦、電子字典、pDA、 iPod...等’其通常需要電池(battei7)來做為其系統電力的主 要來源’故制電池電量便成為各手持式電子I置必須要 ^工^ ’以提醒使驗所使狀手持式電子打的電池 =里狀悲。-般*言,#手持式電子裝置制完電池電量 :「除了可以將偵測結果顯示給使用者觀看外(例如可以顯 =「電力尚存50%」)’或者當躺結果騎手持式電子(hand-held electronic device) booming, such as: handheld personal computers, electronic dictionaries, pDA, iPod, etc. 'It usually requires a battery (battei7) as the main source of its system power' It has become a hand-held electronic I must be ^ ^ ^ to remind the inspection office to make the handheld electronic battery = sorrow. -General *, #Handheld electronic device to complete the battery power: "In addition to the detection results can be displayed to the user to see (for example, can be = "power is still 50%") or when lying down to ride handheld electronic
1置之電池電量過低時’更可以禁止或限制使用者繼續使 用手持式電子裝置。 以現今手持式電子裝置來用以偵測其電池電量狀態之 ,術手段而言,大致可分為下列二種技術手段來偵測^其 G括.1.使用類比數位轉換器(anak)g t〇 digital c〇nverter, )以及2.使用電愿偵測器(v〇〗tage detect〇r)。而為了 ,更清楚地制上述所提及侧手持式電子裝置之電池電 1的二種技術手段,叮義職明其電路運制理以及 如何偵測手持式電子裝置之電池電量。 5 i3〇im -CI-0124-TWXX 21316twf.doc/e 圖1繪不為習知使用類比數位轉換器(ADC)來偵測手 持式電子I置之電池電量的電路圖。請參照圖J,由圖i 所揭路的手持式電子裳置100可看出,電池1〇3係用以輸 出一電$ V-BATT,以提供手持式電子裝置系統1〇1當作 其系統電力,而其偵測手持式電子裝置1〇〇之電池1〇3電 量V—BATT之電路動作原理係為下列所述: 首先,假使設計者所選用的類比數位轉換器1〇5係為 η位元(n為正整數),故可得知的是,此類比數位轉換器1〇5 之解析度係為1/2Λη。而為了要便於偵測電池1〇3之電量 V—ΒΑΤΤ狀態,必須先在類比數位轉換器1〇5設定一參考 電壓Vref,此參考電壓Vref係為手持式電子裝置系統ι〇ι . 之系統電力。 . 故依據上述可知,類比數位轉換器105會把參考電壓1 When the battery is too low, the user can be prohibited or restricted from continuing to use the handheld electronic device. In today's hand-held electronic devices, the state of the battery is used to detect the state of the battery. The following two technical means can be used to detect the condition of the battery. 1. Use an analog-to-digital converter (anak) gt 〇digital c〇nverter, ) and 2. Use the power detector (v〇〗 tage detect〇r). In order to more clearly determine the two technical means of the battery power of the above-mentioned side-handheld electronic device, it is said that its circuit operation and how to detect the battery power of the handheld electronic device. 5 i3〇im -CI-0124-TWXX 21316twf.doc/e Figure 1 shows a circuit diagram for not using the analog digital converter (ADC) to detect the battery power of the handheld electronic I. Referring to FIG. J, it can be seen from the handheld electronic device 100 disclosed in FIG. i that the battery 1〇3 is used to output a $V-BATT to provide the handheld electronic device system 1〇1 as its The system power, and the circuit operation principle of detecting the battery of the handheld electronic device 1〇3 battery V-BATT is as follows: First, if the designer selects the analog digital converter 1〇5 is The η bit (n is a positive integer), it can be known that the resolution of the digital converter 1〇5 is 1/2Λη. In order to facilitate the detection of the battery V〇 state of the battery 1〇3, a reference voltage Vref must be first set in the analog digital converter 1〇5, which is a system of the handheld electronic device system ι〇ι. electric power. Therefore, according to the above, the analog digital converter 105 will use the reference voltage.
Vref分成2Λη部份,而電池1〇3之電量V—BATT會透過電 阻R1與R2的分壓後,提供一偵測電壓ΒΑΤΤ_〇至類比 數位轉換器1〇5。之後,類比數位轉換器105會分析上述 _ 偵測電壓BATT—D係屬於上述參考電壓Vref的哪一部份 後’即可知悉電池1〇3電量V—BATT狀態。 而為了要更清楚說明上述利用類比數位轉換器1〇5來 债測手持式電子裝置100之電池1〇3電量V ΒΑττ的技術 手段,以下將例舉一例來說明: 假使上述所選用之類比數位轉換器1〇5係為8位元, 故其解析度係為1/256,且預設手持式電子裝置系統ι〇ι, 歹】如為手持式個人電腦所需之系統電壓為3.0V(亦即電池 6 I30im Q-CI-0124-TWXX 213l6tw£d〇c/e 103之電量VJBATT),故類比數位轉換器i〇5所設定的來 考電壓Vref亦為3.0V。 多 依據上述可知,參考電壓Vref會被分為356個部份, 故當電池103電量V—BATT經由電阻R1與R2分壓後, 假使所得的偵測電壓BATT—D為15V時,此時再由類比 數位轉換器105分析後,亦即可分析出電池1〇3電量 V 一 BATT係於參考電壓Vref的帛128個部份,所以類比 數位轉換器105所輸出的數位訊號DS之數值可表示為 80H,故而可推知此時電池1〇3電量v—BATT狀態尚% %的電力。此外,電阻RUR2ji_定要使狀元件, 設計者只要確認電A1G3電量V—BATT不超過類比數位轉 換器1〇5之參考電壓Vref,即可不需使用電阻R1及 之分壓處理。 。而值得-提的是,手持式電子裝置刚係可依據數位 訊號DS之邏輯狀態,而告知使用者當下電池· V_BATT狀態’或者當電池1G3電量v—ΒΑπ過低時,除 了可關閉S耗電力關邊硬體線料,更可㈣止或限制 使用者繼續仙手料電子裝置⑽。❹卜,類比數 位轉換器1G5之技術手段㈣測手持式電子裝置刚 池1〇3電量V_BATT狀態時,其必須透過手持式電子裝置 100之CPU才能债測其電池103電量ν—ΒΑττ狀態。 圖2緣示為習知使用電壓俄測器來债測手持式。電子裝 置之電池電量的電路圖。請參照圖2,由圖 持式電子裝置2〇_如為手持_人電腦)可看出,電池 i3〇im -CI-0124-TWXX 21316twf.doc/e 203係用以輸出一電量VJBATT,以提供手持式電子裝置 系統201當作其系統電力,而其偵測手持式電子裝置2〇〇 之電池203電量V—BATT之電路動作原理係為下列所述: 首先,電池203電量V—BATT係透過電阻^、们及 R3之阻值分壓設計後,藉此而決定電壓偵測器2〇5之高臨 限電壓值vHTH與低臨限電壓值Vlth。故當電池2〇3電量 V一BATT低於低臨限電壓值vLTH時,電壓偵測器205所輸 出的數位號DS係例如為邏輯低準位狀態,並致使手持 式電子I置200自動關閉南耗電力的周邊硬體線路,或者 禁止使用者繼續使用手持式電子裝置2〇〇 ;反之,當電池 203電量V一ΒΑΤΤ高於高臨限電壓值Vhth時,電H則 器205所輸出的數位訊號DS係例如為邏輯高準位狀態, 並致使手持式電子裝置200係處於一般工作模式。^ 而值得一提的是,於圖2所揭露的電路圖中,電阻R4 及R5係用以避免電壓偵測器2〇5之邏輯高準位高於cpu 的邏輯高準位而所採取的分壓處理,但設計者只要確認電 壓偵測器205之邏輯高準位不會高於cpu的邏輯高準2 時,電阻R4及R5係為非限定使用的元件。此外,運用電 壓偵測裔205之技術手段來偵測手持式電子裝置2〇〇之電 池203電置V—BATT狀態時,其不需要透過手持式電子裝 置200之CPU就能偵測其電池2〇3電量v—BATT狀態。 綜上所述,上述所描述偵測手持式電子裝置之電I也電 量的二種技術手段巾,假使顧舰數位轉換⑽叫之 技術,其雖可準確侧手持式電子I置之電池電量,但製 8 CI-0124-TWXX 21316twf.doc/e 作成本亦隨之提升。此外,假使選用電壓偵測器(v〇ltage detector)之技術,其雖製作成本較為低廉,但一經手持式 電子裝置之硬體確認後便無法修改,所以設計使用彈性並 不高。 【發明内容】 有鑑於此,本發明的目的就是提供了一種偵測電池電 里系統及其手持式電子裝置,其藉由利用控制判斷模組以 控制手持式電子裝置系統之脈波寬度調變(PWM)訊號,並 配合一充放電單元及一比較單元,來達到多段偵測手持式 電子裝置之電池電量狀態,如此不但可以降低其製作成 本’並且無碰更其硬體線路,僅需經由改變控制判斷模 組之程式碼(code)後,即可應用於現今的手持式電子裝 置,而大大的提升設計使用彈性。 又 本發明所提供的偵測電池電量系統,其適用於 電子裝置,且此手持式電子裝置包含手持式電子事置^ 統,其具有脈波寬度調變訊號,而本發明之偵測電ς電量 =統包括充放電單元、比較單元,以及控制酬模电 =電單元侧贿據脈波寬度霞訊餘態,而對麻 】或放電並輸出-充放,其中脈波寬度調變^ 作週期係小於充放電單元之充放電時間週期。^ 比#父單7〇耦接充放電單元,此比較單元 ^電子裝置純之彡統與級電單搞 ^ 電壓後’貞彳電壓。控侧斷 ^1 見又心。域狀怨,並依據比較單元所輪出之偵測電 CI-0124-TWXX 21316twf.doc/e 壓,以判定手持式電子裝置之電池電量狀態。 從另一觀點來看,本發明提供一種手持式電子裝置, 其包含一手持式電子裝置糸統,且此手持式電子裝置系統 具有脈波寬度調變訊號,而本發明之手持式電子裝置包括 電池與偵測電池電量系統。其中,電池係用以提供手持式 電子裝置系統之系統電壓,而細彳電池電量系統則輕接該 電池,用以偵測該電池電量狀態,且此備測電池電量系= ,括充放料元、比鮮元,以及控侧喃組。充放電 單元係用以依據脈波寬度調變訊號狀態,而對應的充電或 放電並輸出-充放電壓,其中脈波寬度調變訊號之工作週 期係小於充放電單元之充放電時間週期。 比較單元柄接充放電單元,此比較單元係用以比較手 ^式電子裝置之系統電壓與充放電單元所輸出之充放電壓 而輸出-偵測電壓。控制判斷模組仙以控制脈波寬 度調變訊聽態’並依據比較單元所輸出之躺電壓,以 判定手持式電子裝置之電池電量狀態。 、' 在上述本發明較佳實施例中,充放電單元包括第一電 2第-電容。其中,第—電阻具有第—端與第二端,其 =-端係用以接收脈波寬度調變訊號,而第二端則用以 =出充放單元所輸出之充放霞。第—電容具有第一端與 其中第—端係_第—電阻之第二端,而第二端 ,上述本發明較佳實施例中,比較單元包括一比較 D Ί人端収接收電池所提供之系統電壓,其負輸 21316twf.doc/eVref is divided into 2Λη parts, and the battery V〇BATT of the battery 1〇3 transmits a detection voltage ΒΑΤΤ_〇 to the analog digital converter 1〇5 after the voltage division of the resistors R1 and R2. Thereafter, the analog-to-digital converter 105 analyzes which portion of the reference voltage Vref the _detection voltage BATT-D belongs to, and then knows the state of the battery 〇3 power V_BATT. In order to more clearly explain the above-mentioned technical means for measuring the battery 1 〇 3 electric quantity V ΒΑττ of the handheld electronic device 100 by using the analog digital converter 1 〇 5, an example will be described below: Suppose the analogy number selected above is used. The converter 1〇5 is 8-bit, so the resolution is 1/256, and the preset handheld electronic device system ι〇ι, 歹] the system voltage required for a handheld personal computer is 3.0V ( That is, the battery 6 I30im Q-CI-0124-TWXX 213l6tw£d〇c/e 103 power supply VJBATT), so the reference voltage Vref set by the analog converter i〇5 is also 3.0V. According to the above, the reference voltage Vref will be divided into 356 parts, so when the battery 103 power V-BATT is divided by the resistors R1 and R2, if the obtained detection voltage BATT-D is 15V, then at this time After being analyzed by the analog-to-digital converter 105, it is also possible to analyze that the battery 1〇3 electric quantity V-BATT is 帛128 parts of the reference voltage Vref, so the value of the digital signal DS output by the analog digital converter 105 can be expressed. It is 80H, so it can be inferred that the battery has a power of 1% of the power v_BATT state. In addition, the resistor RUR2ji_ is required to make the component. The designer only needs to confirm that the electric A1G3 electric quantity V_BATT does not exceed the reference voltage Vref of the analog digital converter 1〇5, and the voltage dividing process of the resistor R1 and the resistor R1 can be omitted. . It is worth mentioning that the handheld electronic device can immediately inform the user of the current battery · V_BATT state according to the logic state of the digital signal DS or when the battery 1G3 power v-ΒΑ π is too low, in addition to turning off the S power consumption. The hard-wired material can be turned off, and the user can continue to limit the electronic device (10). ❹ , , , 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类 类Figure 2 shows the conventional use of a voltage detector to measure the handheld. A circuit diagram of the battery level of an electronic device. Referring to FIG. 2, it can be seen that the battery i3〇im -CI-0124-TWXX 21316twf.doc/e 203 is used to output a power amount VJBATT, as shown by the handheld electronic device 2 _ _ for the handheld computer. The handheld electronic device system 201 is provided as its system power, and the circuit operation principle of detecting the battery 203 power V-BATT of the handheld electronic device 2 is as follows: First, the battery 203 is electrically V-BATT The voltage threshold of the voltage detector 2〇5 and the low threshold voltage value Vlth are determined by the voltage divider design of the resistors, R3 and R3. Therefore, when the battery 2〇3 power V_BATT is lower than the low threshold voltage value vLTH, the digital signal DS output by the voltage detector 205 is, for example, a logic low level state, and causes the handheld electronic I to automatically turn off 200. The peripheral hardware circuit of the south power consumption, or prohibiting the user from continuing to use the handheld electronic device 2; conversely, when the battery 203 power V is higher than the high threshold voltage value Vhth, the electric H is output by the device 205 The digital signal DS is, for example, in a logic high level state, and causes the handheld electronic device 200 to be in a normal operating mode. ^ It is worth mentioning that, in the circuit diagram disclosed in Figure 2, the resistors R4 and R5 are used to avoid the logic high level of the voltage detector 2〇5 being higher than the logic high level of the cpu. The voltage is processed, but the designer only needs to confirm that the logic high level of the voltage detector 205 is not higher than the logic level 2 of the cpu, and the resistors R4 and R5 are unqualified components. In addition, when the battery 203 of the handheld electronic device is used to detect the V-BATT state of the handheld electronic device 2, the battery of the handheld electronic device 200 can be detected by the CPU of the handheld electronic device 200. 〇3 power v-BATT status. In summary, the above-mentioned two technical means for detecting the electric quantity of the electric power of the handheld electronic device, if the technology of the digital conversion (10) is called, can accurately charge the battery power of the handheld electronic I. However, the cost of the system 8 CI-0124-TWXX 21316twf.doc/e has also increased. In addition, if the technology of the voltage detector is used, the manufacturing cost is relatively low, but once the hardware of the handheld electronic device is confirmed, it cannot be modified, so the design flexibility is not high. SUMMARY OF THE INVENTION In view of the above, an object of the present invention is to provide a battery-detecting system and a handheld electronic device thereof, which utilizes a control judging module to control pulse width modulation of a handheld electronic device system. (PWM) signal, combined with a charge and discharge unit and a comparison unit, to achieve multi-stage detection of the battery state of the handheld electronic device, so that not only can reduce its production cost 'and no touch on its hardware line, only through By changing the code of the control judging module, it can be applied to today's handheld electronic devices, and greatly enhances the flexibility of design. The present invention provides a battery power detection system suitable for use in an electronic device, and the handheld electronic device includes a handheld electronic device having a pulse width modulation signal, and the detection device of the present invention The electric quantity=includes the charging and discharging unit, the comparison unit, and the control mode electric=electric unit side bribe according to the pulse width of the Xiayun state, and the hemp] or discharge and output-charge and discharge, wherein the pulse width modulation The period is less than the charge and discharge time period of the charge and discharge unit. ^ than the #父单7〇 coupled to the charge and discharge unit, this comparison unit ^ electronic device pure system and the level of electricity single ^ voltage after the '贞彳 voltage. Controlled side break ^1 See also heart. The domain is resentful and based on the detection power CI-0124-TWXX 21316twf.doc/e of the comparison unit, to determine the battery state of the handheld electronic device. From another point of view, the present invention provides a handheld electronic device including a handheld electronic device system, and the handheld electronic device system has a pulse width modulation signal, and the handheld electronic device of the present invention includes Battery and battery power detection system. The battery is used to provide the system voltage of the handheld electronic device system, and the battery power system is lightly connected to the battery to detect the battery state, and the battery power is measured, including charging and discharging. Yuan, than fresh yuan, and control side group. The charging and discharging unit is configured to adjust the signal state according to the pulse width, and correspondingly charge or discharge and output-charge and discharge voltage, wherein the working period of the pulse width modulation signal is smaller than the charging and discharging time period of the charging and discharging unit. The comparison unit handle is connected to the charge and discharge unit, and the comparison unit is configured to compare the system voltage of the manual electronic device with the charge and discharge voltage outputted by the charge and discharge unit to output a detection voltage. The control judging module controls the pulse width to adjust the listening state and determines the battery state of the handheld electronic device according to the lying voltage output by the comparing unit. In the above preferred embodiment of the invention, the charge and discharge unit comprises a first electrical second capacitor. The first resistor has a first end and a second end, wherein the =-end is used to receive the pulse width modulation signal, and the second end is used to output the charge and discharge output of the charging and discharging unit. The first capacitor has a first end and a second end of the first end of the first resistor, and the second end. In the preferred embodiment of the present invention, the comparing unit includes a comparison D. System voltage, its negative input 21316twf.doc/e
13 Ο 1 3"tt§-CI-〇124-TWXX =用以接收纽單元所輸出之充放賴,而其輸出端則 輸出偵測電壓。 j明所提供的偵啦池電量系統,可q應用於現今 電子裝置中’因為此偵測電池電量系統係藉由控 組控财持式電奸衫獻脈錢賴變訊號 、週=’並且將充放單元之充放電時間週期設計必須 波寬度觀訊制工作職,如此制由比較單元 ^^式好1置系統之系統電壓與充放單元所輸出之 j壓後’而輸出一债測電壓,接著再利肋制判斷模 、=旦制電壓之狀態’以得知手持式電子裝置之電池 错此;^但可以達到多段偵測手持式電池電量之狀 二心並可叫低其製作成本,且無須變更其硬體線路, 改變姉崎模組之程式碼後,即可應用於現今 于待式電子袈置’而大大的提升設計使用彈性。 為讓本發明之上述和其他目的、特徵和優點能更明顯 重’下文特舉本發明之較佳實補,並配 作詳細說明如下。 【實施方式】 持mUf 本㈣較佳實闕之手持式電子裝置的方 /二、&圖3’由圖3所揭露的手持式電子裝置300(例 二以為手持式個人電腦、電子字典、PDA、iPod…等)中 =括手持式電子裂置系統3〇1、電池3〇3、债測電池電量系 301且5右以及!員不單元3〇7。其中’手持式電子裝置系統 ’、脈波 I度調變訊號(pulse width modulation,PWM) 1301205 Q-CI-0124-TWXX 213l6twf.d〇c/e PWM—IN ’而電池303貝彳用以提供電量v—至手持式 電子裝置系統301,以當作手持式電子裝置系統則之系 統電壓。 谓測電池電量系統305係用以偵測電池3〇3電量 V—ΒΑΤΤ狀態’並輸出一偵測電壓Ds至手持式電子裝置 f統301後’手持式電子裝置系統301再據以提供至顯示 單元307,使其顯示偵測電池電量系統3〇5所偵測之結果, 如此以告知使用手持式電子裝£ 3〇〇白勺使用者知悉當下電 池303電量V—BATT狀態。 圖4繪示為本實施例之偵測電池電量系統3〇5的電路 圖。請合併參照圖3及圖4,偵測電池電量系統3〇5包括 充放電單元401、電壓隨耦器U0P、第二電容(32、電壓限 制單元403、比較單元405,以及控制判斷模組4〇7。其中, 充放電單元401係由第一電阻rj與第一電容C1所組成, 且此充放電單元401係依據脈波寬度調變訊號 工作週期,而據以對應的充電或放電並輸出充放電壓 PWM一RC 〇 承接上述更清楚的說,當脈波寬度調變訊號PWm_in 在一工作週期(duty cycle)内為高準位時會充電,以得到— 充電的充放電壓PWM-RC,而在波寬度調變訊號pW]VI 在一工作週期(duty cycle)内為低準位時會放電,以得到— 放電的充放電壓PWM_RC。 於本實施例中,脈波寬度調變訊號PWM一IN之工作週 期必須小於電阻R1與電容C1所構成的充放電時間週期, 12 孤 -CI-0124-TWXX 21316twf.doc/e 故可推知的是,在脈波寬度調變訊號pwM-IN於一工作週 ,内為高準位而經由電阻R1向電容C1進行充電時,其會 導致電容C1尚未絲電荷就放t,且在脈波寬度調變訊 號P W Μ-1N於-J1作週_為低準位而電容c丨經由電阻 R1進行放電時,其會導致電容C1尚未放完電荷就充電。 “此外,於本實施例中,電阻R1例如可以為1〇〇Κω, ,谷C 1例如可以為〇· lujp ,但在此並不限制其電阻^ =電阻值與電容C1之電容值,設計者當可視實際需求並 符合上述之限定條件(亦即脈波寬度調變訊號PWM-IN之 工作週期必須小於電阻幻與電容C1所構成的充放電時間 週期)’而採用其它阻值的電阻R1與其它容值的電容ci 來替代之。 且更值得一提的是,本實施例之手持式電子裝置系統 301所提供的脈波寬度調變訊號PWM-IN,其頻率大小係 為超過ΙΚΗζ即可,但假使其頻率愈高時,例如為1MHz, 其以手持式電子裝置系統3〇1所能提供的最高頻率值為 限,充放電單元401所輸出之充放電壓PWM—RC的漣波 (ripple)現象將會被大大的降低。 圖5及圖6繪示為本實施例之手持式電子裝置系統 3〇1所提供的脈波寬度調變訊號pwMJ[N及其對應的充放 屯壓PWM—RC的波形圖,其中波形圖之橫座標與縱座標 分別代表時間與電壓。請合併參照圖3〜6,圖5及圖6所 揭路的波形圖500與600中,其包括充放電單元4〇1所輪 出之充放電壓PW]VLRC的波形圖,以及手持式電子裝置 13 丨-CI-0124-TWXX 21316twf.doc/e 系統301所提供的脈波寬度調變訊號pwM—IN波形圖。首 先,請先合併參照圖3〜圖5,其係為手持式電子裝置系統 301所提供的脈波寬度調變訊號pwM—IN之工作週期d係 維持在100%時,再經由充放電單元4〇1後,充放電單元 4〇1所對應輸出的充放電壓PWM_RC波形圖。 凡 接著,請合併參照圖3、圖4及圖6,其係為手持式電 子裝置系統3 01所提供的脈波寬度調變訊號p w Μ—[ N之】 作週期D係維持在33%時,再經由充放電單元4〇1後,充 放電單元401所對應輸出的充放電壓pWM—RC波形圖。 其中,上述所說的脈波寬度調變訊號pWM—IN之工作週期 D,其係為脈波寬度調變訊號PWMjN於一週期時間内的 高準位時間,在整個脈波寬度調變訊號pWMJN之工作 期時間所佔據之比例數值。 ° 舉例來說,由圖6所揭露的脈波寬度調變訊號 PWM一IN之波形圖可看出,在一個脈波寬度調變訊號 PWM—IN的完紅作週期τ内,可分為高準位卫作週期日^ 間丁1與低準位工作週期時間T2,故可知的是,將高準位 工作週期時間Τ1除以作週期τ後(亦即Τ1/Τ),即可知 悉脈波寬度調變訊號PWMJN之工作週期D。 請繼續參照圖3及圖4,電壓隨耦器u〇p之接收端( 係用以接收充放電單元4〇1所輸出的充放電壓 PWM一RC ’如此再經由電容C2後便可將充放電壓 PWM—RC變成-個趨近直流電壓準位的電壓值。於本實施 例中上it之趨近:!:>&電壓準偏纟充放電壓pWM—,其 CI-0124-TWXX 21316twf.doc/e 電壓值大小係依據脈波寬度調變訊號PWM—IN之工作週 期而決定,亦即當脈波寬度調變訊號PWMJN於一工作週 期内處在高準位時間越長時,其趨近直流電壓準位的充放 電壓PWM_RC的電壓值就會越大。 此外,於本實施例中,電容C2的電容值例如可以為 O.luF,但在此並不限定其容值大小,設計者當可視實際需 求,而以不同容值的電容C2來代替之,只是值得一提的 疋,假若將電容C2的容值增加時,其抑制充放電單元4〇1 所輸出之充放電壓PWM一RC的漣波(ripple)現象效果也會 越好。 而值得一提的是,電壓隨耦器UOP與電容C2係為選 擇性元件,亦即非本發明之限定使用元件。更清楚的來說, 充放電單元4〇1所輸出之充放電壓PWM一RC可直接提供 至比較單元405,如此亦可使本實施例之偵測電池電量系 統305處於正常工作狀態。而加入電壓隨耦器u〇p之原 因’其係為了使充放電單元4〇1與比較單元4〇5間的阻抗 達到匹配,且在搭配電容C2後,可以使偵測電池電量系 統305在運作時更為穩定。 接著’電壓限制單元403係由第二電阻R2與第三電 阻R3所組成,其以該發明領域具有通常知識者當可知悉, 此電壓限制單元4〇3之目的係為抑制電池3〇3電量 V一BATT不能超過手持式電子裝置系統3〇1之系統電壓里 所作的分壓保護處理。於本實施例中,電阻R2例如可以 為360ΚΩ,而電阻R3例如可以為1ΜΩ,但在此並不限定 15 1301 與 '-CI.0124-TWXX 21316twf.doc/e /、電阻R2與R3之阻值大小’設計者可依據實際需求,以 不,阻值之電阻R2與R3來代替之,但值得—提的是,當 所選用的電阻R2與R3之阻值越大時,其可以避免盔謂 ^毛掉電池303電量V一BATT。此外,假若當電池;^ 1 V—BATT不超過手持式電子裝置系統3〇1之系統電壓 時,電阻R2與R3亦非為限定使用的元件。 比較單元4G5係包括-比較器c〇p,其制以比較手 持式電子裝置系統301 H統電壓(亦即電池3()3電量 V_BATT)與充放電單元4〇1所輸出之充放電壓 後,而輸出摘測電壓DS。於本實施例中,比較單元-4〇5 所輸出的侧訊號DS ♦了用以提供至控制判斷模組術 以供其判斷電池303電量V_BATT狀態,以及提供至手持 ,電子裝置系統3。1後’手持式電子裝置系統3。;、再據以 提供至顯不單元307,使其顯示偵測電池電量系統所 债測之結果外,更可以將其轉換為類比電壓(anak)gv〇itage) 後輸出,以作為需要類比電壓輸入控制的周邊硬體線路之 用途。 而值彳于一挺的疋,於本貫施例中,當電池303電旦 V—BATT低於充放電單元4()1所輸出之充放電壓pwM & 時,會致使比較單元405所輸出的偵測電壓Ds狀態為低 準位電壓,但於另-觀點來看,假若設計者欲想當電、、也地 電量V_BATT低於充放電單元4〇1所輸出之充放電壓 PWM_RC ’會致使比較單元405所輸出的偵測電壓D 態為高準位電壓時’僅需將電壓隨耦器U〇P之輸出端耦接 I30im, Cl-o 124-TWXX 21316twf.doc/e 比車父态cop之正輸入端,並將手持式電子裝置系統 之系統電壓(亦即電池303電量V—BATT)提供至比較器 COP之負輸入端即可。 控制判斷模組407係用以控制手持式電子裝置系統 3〇1所提供的脈波寬度調變訊號PWM—IN狀態,並依據比 較單元405所輸出之偵測電壓DS,以判定手持式電子裝置 3〇〇之電池303電量V_BATT狀態。而為了要更清楚賴 明控制判斷模組407之動作流程,以下將舉其控制判斷模 組4〇7係為-軟體(software)為例來說明,但在此並不依此 $限,設計者當可依據實際需求,並符合以下例舉之精神 時,對下述實施例稍作修飾或運用其它可實行之方式替 代,惟其仍屬於本發明之範圍·· 首先,依本實施例之手持式電子裝置300之架構,並 控制判斷模、组407須先由實驗決定當手持式電子裝置系統 301所提供的脈波寬度調變訊號PWM—IN之工作 X%時’其充放電單元401所輸出的充放電壓PWM一Rc係 i二1伏特’且當手持式電子裝置系統3G1所提供的脈波 1 =凋變訊號PWM—in之工作週期D為¥%時,其充放 ,單元401戶;f輸出的充放電廢pWM—係為乂2伏特,並 ρλχΓ持式電子衣置系統3〇1所提供的脈波寬度調變訊號 φ」Ν之工作週期D # Ζ%時,其充放電單元·所輸 出的充放電壓PWM〜RC係為V3伏特。其中,上述之ρ ,及Z係小於等於100之正數。 故依據上述之條件設定後,控制判斷模組407係可將 17 1301 職 -CI-0124-TWXX 21316twf.doc/e 電池303電量V—BATT «分為三個臨界點,以供顯示單元 307顯示其電池303電量V—BATT狀態。接著,假若將上 述X、Y,及Z值分別設定為75、5〇,及乃時,控制判 斷模組4 〇 7首先會控制手持式電子裝置系統3 0 i所提供的 脈波寬度調變訊號PWM—IN之工作週期D維持在25%, 且、,’二偵測電池電里系統3〇5線路穩定後,控制判斷模組 係會讀取侧f壓DS,關定錄態是否為鱗位、,若是 的話,則表示目前電池303電量V-BATT狀態低於挪。 承接上述,若不是的話,亦即偵測電壓Ds係處在高 準=狀態’則表示目前電池303電量v—ΒΑπ狀態高於 25/,並且控制判斷模組4〇7會再控制手持式電子裝置 統3 01所提供的脈波寬度調變訊號p wm—in之工作週期d 維持在50%,且經制電池電量系、統奶線路穩定後中13 Ο 1 3"tt§-CI-〇124-TWXX=Receives the charge and discharge output of the button unit, and the output detects the voltage at the output. j Ming provides the detection pool power system, which can be used in today's electronic devices. 'Because this detection battery power system is controlled by the control group, the electronic system is controlled by the money, and the weekly =' The charging and discharging time period of the charging and discharging unit must be designed in accordance with the wave width perception system. The system is controlled by the system voltage of the system and the output voltage of the charging and discharging unit. The voltage, and then the ribbed judgment mode, the state of the voltage of the system is 'to know that the battery of the handheld electronic device is wrong; ^ but can achieve the multi-section detection of the handheld battery power and can be called low production Cost, and without changing the hardware circuit, changing the code of the Miyazaki module, it can be applied to today's electronic devices, and greatly enhance the flexibility of design. The above and other objects, features and advantages of the present invention will become more apparent. [Embodiment] Holding a mUf (4) A preferred embodiment of the handheld electronic device / 2, &3; FIG. 3 is a handheld electronic device 300 disclosed in FIG. 3 (Example 2 is a handheld personal computer, an electronic dictionary, PDA, iPod, etc.) = including the handheld electronic splicing system 3 〇 1, the battery 3 〇 3, the debt measurement battery power system 301 and 5 right and the occupant not unit 3 〇 7. Among them, 'handheld electronic device system', pulse wave width modulation (PWM) 1301205 Q-CI-0124-TWXX 213l6twf.d〇c/e PWM-IN 'and battery 303 is used to provide The power v-to the handheld electronic device system 301 is used as the system voltage for the handheld electronic device system. The battery power system 305 is used to detect the battery 3 〇 3 power V ΒΑΤΤ state ' and output a detection voltage Ds to the handheld electronic device 301 after the handheld electronic device system 301 is provided to display The unit 307 displays the result of detecting the battery power system 3〇5, so as to inform the user who uses the handheld electronic device that the current battery 303 is in the V-BATT state. FIG. 4 is a circuit diagram of the battery power detecting system 3〇5 of the present embodiment. Referring to FIG. 3 and FIG. 4 together, the detection battery power system 3〇5 includes a charge and discharge unit 401, a voltage follower U0P, a second capacitor (32, a voltage limiting unit 403, a comparison unit 405, and a control determination module 4). 〇 7. The charge and discharge unit 401 is composed of a first resistor rj and a first capacitor C1, and the charge and discharge unit 401 adjusts the signal duty cycle according to the pulse width, and accordingly outputs and discharges according to the pulse width. Charge-and-discharge voltage PWM-RC 〇 Accepting the above, it is clear that when the pulse width modulation signal PWm_in is at a high level within a duty cycle, it will be charged to obtain the charging and discharging voltage PWM-RC. When the wave width modulation signal pW]VI is at a low level within a duty cycle, it is discharged to obtain a discharge charge voltage PWM_RC. In this embodiment, the pulse width modulation signal The duty cycle of PWM-IN must be less than the charge-discharge time period formed by resistor R1 and capacitor C1, 12 l-CI-0124-TWXX 21316twf.doc/e, so it can be inferred that the pulse width modulation signal pwM-IN In a working week, the internal high level and the resistance R When charging capacitor C1, it will cause capacitor C1 to discharge t without the wire charge, and the pulse width modulation signal PW Μ-1N is at the low level of -J1 and the capacitor c is via resistor R1. When discharging, it causes the capacitor C1 to be charged without discharging the charge. Further, in the present embodiment, the resistor R1 may be, for example, 1 〇〇Κ ω, and the valley C 1 may be, for example, 〇· lujp, but not here. Limiting the resistance ^ = resistance value and the capacitance value of the capacitor C1, the designer can meet the above-mentioned qualification conditions according to the actual demand (that is, the duty cycle of the pulse width modulation signal PWM-IN must be smaller than the resistance phantom and the capacitance C1 The charge and discharge time period is replaced by the resistor R1 of other resistance values and the capacitance ci of other capacitance values. Moreover, it is worth mentioning that the pulse width of the handheld electronic device system 301 of the present embodiment provides The modulation signal PWM-IN has a frequency exceeding ΙΚΗζ, but if the frequency is higher, for example, 1 MHz, it is limited by the maximum frequency value that the handheld electronic device system 3〇1 can provide. The charging and discharging of the discharge unit 401 The ripple phenomenon of the voltage PWM-RC will be greatly reduced. Figures 5 and 6 illustrate the pulse width modulation signal pwMJ[N provided by the handheld electronic device system 3〇1 of the present embodiment. And the waveform diagram of the corresponding charging and discharging voltage PWM-RC, wherein the horizontal coordinate and the vertical coordinate of the waveform diagram respectively represent time and voltage. Please refer to FIG. 3 to FIG. 6 and the waveform diagram 500 of the road disclosed in FIG. 5 and FIG. And 600, which comprise a waveform diagram of the charge and discharge voltage PW]VLRC rotated by the charge and discharge unit 4〇1, and the pulse provided by the handheld electronic device 13 丨-CI-0124-TWXX 21316twf.doc/e system 301 Wave width modulation signal pwM-IN waveform diagram. First, please refer to FIG. 3 to FIG. 5, which is a mode in which the duty cycle d of the pulse width modulation signal pwM_IN provided by the handheld electronic device system 301 is maintained at 100%, and then the charging and discharging unit 4 is used. After 〇1, the charge and discharge voltage PWM_RC waveform of the output corresponding to the charge and discharge unit 4〇1. Referring to FIG. 3, FIG. 4 and FIG. 6 together, the pulse width modulation signal pw [—[N] provided by the handheld electronic device system 3 01 is maintained at 33%. And after the charge and discharge unit 4〇1, the charging/discharging unit 401 outputs a charging/discharging voltage pWM_RC waveform diagram. Wherein, the working period D of the pulse width modulation signal pWM_IN is the high level time of the pulse width modulation signal PWMjN in one cycle time, and the whole pulse width modulation signal pWMJN The proportion of the working period time. ° For example, the waveform of the pulse width modulation signal PWM-IN disclosed in FIG. 6 can be seen as being high in the red cycle τ of a pulse width modulation signal PWM_IN. The duty cycle period is 1 and the low duty cycle time T2. Therefore, it can be known that the high-level duty cycle time Τ1 is divided by the cycle τ (ie, Τ1/Τ), and the pulse can be known. The duty cycle D of the wave width modulation signal PWMJN. Please continue to refer to FIG. 3 and FIG. 4, the receiving end of the voltage follower u〇p (for receiving the charging and discharging voltage PWM-RC of the charging and discharging unit 4〇1), and then charging the capacitor C2. The discharge voltage PWM-RC becomes a voltage value that approaches the DC voltage level. In this embodiment, the approach of it is closer:::>& voltage quasi-bias 纟 charge-discharge voltage pWM-, its CI-0124- TWXX 21316twf.doc/e The voltage value is determined according to the duty cycle of the pulse width modulation signal PWM_IN, that is, when the pulse width modulation signal PWMJN is at a high level for a working period, the longer the time is. The voltage value of the charging and discharging voltage PWM_RC which is close to the DC voltage level is larger. In this embodiment, the capacitance value of the capacitor C2 can be, for example, O.luF, but the capacitance is not limited herein. The size, the designer can replace the capacitor C2 with different capacitance values according to the actual needs, but it is worth mentioning. If the capacitance of the capacitor C2 is increased, it suppresses the charging of the charging and discharging unit 4〇1. The effect of the voltage ripple PWM-RC ripple phenomenon will be better. It is worth mentioning that The voltage follower UOP and the capacitor C2 are selective components, that is, the components not used in the invention. More specifically, the charging and discharging voltage PWM-RC outputted by the charging and discharging unit 4〇1 can be directly provided for comparison. The unit 405 can also make the detected battery power system 305 of the embodiment in a normal working state. The reason for adding the voltage follower u〇p is to make the charging and discharging unit 4〇1 and the comparing unit 4〇5 The impedance between the two is matched, and after the capacitor C2 is matched, the detected battery power system 305 can be made more stable during operation. Next, the voltage limiting unit 403 is composed of a second resistor R2 and a third resistor R3. It is known to those skilled in the art that the purpose of the voltage limiting unit 4〇3 is to suppress the voltage limitation of the battery voltage of the handheld electronic device system 3〇1. In this embodiment, the resistor R2 may be, for example, 360 Ω, and the resistor R3 may be, for example, 1 ΜΩ, but here is not limited to 15 1301 and '-CI.0124-TWXX 21316 twf.doc/e /, resistors R2 and R3 Resistance value' According to the actual demand, the meter can replace the resistance R2 and R3 with the resistance value, but it is worth mentioning that when the resistance of the selected resistors R2 and R3 is larger, it can avoid the helmet. The battery 303 is charged with a BATT. In addition, if the battery; ^ 1 V-BATT does not exceed the system voltage of the handheld electronic device system 3〇1, the resistors R2 and R3 are not limited components. The comparison unit 4G5 is Including a comparator c〇p, which compares the voltage of the hand-held electronic device system 301 H (that is, the battery 3 () 3 power V_BATT) and the charge and discharge voltage outputted by the charge and discharge unit 4〇1, and outputs the output Measure the voltage DS. In this embodiment, the side signal DS ♦ output by the comparing unit -4 〇 5 is used to provide a control judgment module for determining the battery 303 power V_BATT state, and providing it to the handheld, electronic device system 3. 1 After the 'handheld electronic device system 3. And then provided to the display unit 307 to display the result of detecting the battery power system, and can be converted into an analog voltage (anak) gv〇itage) and output as the analog voltage required. Enter the purpose of the controlled peripheral hardware circuit. However, in the present embodiment, when the battery 303 is less than the charge and discharge voltage pwM & output of the charge and discharge unit 4 () 1, the comparison unit 405 is caused. The output detection voltage Ds state is a low level voltage, but from another point of view, if the designer wants to be powered, the power quantity V_BATT is lower than the charge and discharge voltage PWM_RC of the charge and discharge unit 4〇1. When the detection voltage D state outputted by the comparison unit 405 is a high level voltage, 'only need to couple the output end of the voltage follower U 〇 P to I30im, Cl-o 124-TWXX 21316twf.doc/e The positive input of the parent cop and the system voltage of the handheld electronic device system (ie, the battery 303 power V-BATT) are provided to the negative input terminal of the comparator COP. The control judging module 407 is configured to control the pulse width modulation signal PWM_IN state provided by the handheld electronic device system 3〇1, and determine the handheld electronic device according to the detection voltage DS output by the comparison unit 405. 3〇〇 Battery 303 power V_BATT status. In order to better understand the operation flow of the Lai Ming control judging module 407, the following description will be made by taking the control judging module 4〇7 as a software, but it is not limited thereto. The following embodiments may be modified or used in other practicable manners depending on the actual needs and in accordance with the following exemplary embodiments, but still fall within the scope of the present invention. The structure of the electronic device 300, and the control mode and group 407 must be determined experimentally. When the operation of the pulse width modulation signal PWM_IN provided by the handheld electronic device system 301 is X%, the output of the charging and discharging unit 401 is outputted. The charging and discharging voltage PWM-Rc system i 2 volts' and when the duty cycle D of the pulse wave 1 = fading signal PWM-in provided by the handheld electronic device system 3G1 is ¥%, its charging and discharging, unit 401 The output and discharge waste pWM of the f output is 乂2 volt, and the pulse width modulation signal φ" provided by the ρλ holding electronic clothing system 3〇1 is charged and discharged when the duty cycle D # Ζ% The charging and discharging voltage of the unit · output PWM ~ RC is V3 voltsWherein, the above ρ and Z are less than or equal to 100. Therefore, after setting according to the above conditions, the control judging module 407 can divide the 17 1301 job-CI-0124-TWXX 21316twf.doc/e battery 303 power V_BATT « into three critical points for the display unit 307 to display. Its battery 303 is in a V-BATT state. Then, if the X, Y, and Z values are set to 75, 5, and respectively, the control determination module 4 首先 7 first controls the pulse width modulation provided by the handheld electronic device system 3 0 i. The duty cycle D of the signal PWM-IN is maintained at 25%, and, after the second detection battery system is stable, the control judgment module will read the side f pressure DS, and determine whether the recording state is scale. If yes, it means that the battery 303 power V-BATT status is lower than the current. Undertake the above, if not, that is, the detection voltage Ds is in the high level = state 'is that the current battery 303 power v - ΒΑ π state is higher than 25 /, and the control judgment module 4 〇 7 will control the handheld electronic The duty cycle d of the pulse width modulation signal p wm-in provided by the device system 101 is maintained at 50%, and the battery power system and the milk line are stabilized.
組407係會再讀取偵測電壓ds,以判定其狀態i 否為低準位,若是的話,則表示目前電池303電量V BATT =係介於辦〜啊之間;反之,若不是的話,亦即偵 壓DS係處在高準位狀態,則表示目前電池 量 V—BATT狀態高於50%。 电里 士接著,當目前電池303電量V_BATT狀態高於 會接續控制手持式電子裝置系統301 的脈波寬度調變訊號PWM_IN之卫作週期D維持 0 ’且經偵測電池電量系統305線路穩定後,控制判 再讀取偵測電壓DS,以欺其狀態^ - 右疋的治,則表不目前電池303電量V—BATT狀 18 •-CI-0124-TWXX 21316twf.doc/e 悲係介於50%〜75%之間,反之’若不是的話,亦即偵測 電壓DS係處在高準位狀態,則表示目前電池3〇3電量 V_BATT狀態高於75%。 依據上述舉例,其可知顯示單元307係可顯示4種不 同的電池303電量VJBATT狀態,其包括:電量 ¥—;8八1:1>75%、75%〉電量乂一:8八丁1>50%、50%>電量 V—BATT>25%,以及電量V-BATT<25%,以告知使用手Group 407 will read the detection voltage ds again to determine whether its state i is low level. If it is, it means that the current battery 303 power V BATT = is between the office and the ah; otherwise, if not, That is to say, the detection DS system is in a high-level state, indicating that the current battery quantity V-BATT state is higher than 50%. After the current battery 303 power V_BATT state is higher than the current control period of the pulse width modulation signal PWM_IN of the hand-held electronic device system 301, the maintenance cycle D is maintained at 0' and the detected battery power system 305 is stabilized. The control judges to read the detection voltage DS again to deceive its state ^ - the right 治 governance, the current battery 303 battery V-BATT shape 18 •-CI-0124-TWXX 21316twf.doc/e sorrow 50%~75%, and vice versa, if the detection voltage DS is in the high level state, it means that the current battery 3V3 power V_BATT state is higher than 75%. According to the above example, it can be seen that the display unit 307 can display four different battery 303 power VJBATT states, including: power ¥ -; 8 eight 1:1 > 75%, 75% > power 乂 one: eight eight butyl 1 > 50 %, 50%> power V-BATT> 25%, and power V-BATT<25% to inform the user
持式電子裝置300之使用者知悉其電池303電量v BATT 狀態。 一 而值得一提的是,本實施例之偵測電池電量系統3〇5 亚不需要一直控制手持式電子裝置系統3〇1所提供之脈波 ,度調變訊號PWM—IN之工作週期D,以偵測電池3〇3電 里V—BATT,設計者可於一段預設時間内測試,例如可以 為每分鐘測試一次即可,如此並不會佔用手持式電子裝置 系統301空間。除此之外,當設計者欲想偵測更多段電池 電里V—BATT狀_時’並不需在更改其内部電路之硬 版線路’且僅需更改控制判斷模組4〇7之程式碼(⑺如)後, 即可^成此目的外,便大大的提升設計使用彈性。 絲^所述,本發明是提供一種偵測電池電量系統及其 持式電子裝置。依據本發明的精神,會有下列幾點優點 來敛述: 1·猎由採用本發明之偵測電池電量系統,以取代習知 雷if ί類比數位轉換11 (ADC)來彳貞測手持式電子裝置之 里’故以製作成本的考量,其可降低製作成本。 19 130·_ 21316twf.doc/e 所祐田猎由採用本發明之_電池電量系統,以取代習知 =㈣t _ _ (VGltage detee㈣來制手持式 ft電池電量’並利用控制判斷模組控制_電池電量 判二、域ΐ更改其内部硬體線路,僅需經由改變控制 二 ==所以不但可咖 才、电于衣置之電池電置外,且更可以提升設計使用彈性。 3甘述手持式電子農置系、统所提供的脈波寬度調變訊 ^ 係除了搭配本發明之偵測電池電量系統,以偵測 t式電子裝置之電池電量外,更可骑其轉換為類比電壓 (亦即經由數鋪轉鋪DAC之雜),以料需要類比 黾壓輸入控制的周邊硬體線路之用途。 雖然本發明已以較佳實施例揭露如上,然复並非用以 限定本發明’任何熟胃此技藝者,在不脫離本發明之精神 ^圍内,當可作些許之更動额飾,因此本發明之保護 範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 圖1繪示為習知使用類比數位轉換器來摘測手持式電 子裝置之電池電量的電路圖。 圖2繪示為習知使用電壓债測器來偵測手持式電子裝 置之電池電量的電路圖。 t 圖3繪示為本發明較佳實施例之手持式電子裝置的方 塊圖。 圖4繪示為本發明較佳實施例之偵測電池電量系統的 電路圖。 20 CI-0124-TWXX 21316twf.doc/e 圖5及圖6繪示為本發明較佳實施例之手持式電子裝 置系統所提供的脈波寬度調變訊號及其對應的充放電壓 波形圖。、 【主要元件符號說明】 ( 100、200、300 :手持式電子裝置 1(Π、2G卜301 :手持式電子裝置系統 103、203、303 :電池 105 :類比數位轉換器 205 :電壓偵測器 305 :偵測電池電量系統 307 :顯示單元 4〇1 :充放電單元 403 ··電壓限制單元 405 :比較單元 4〇7:控制判斷模組 UOP ·電壓隨輕器 COP :比較器 R5 :電阻 R 卜 R2、R3、R4 C1 ' C2 z電容The user of the electronic device 300 knows the battery 303 power v BATT state. It is worth mentioning that the detection battery power system of the present embodiment does not need to control the pulse wave provided by the handheld electronic device system 3〇1, and the duty cycle of the PWM signal PWM-IN is D. In order to detect the V-BATT of the battery within 3〇3, the designer can test for a preset time, for example, it can be tested once every minute, so that the space of the handheld electronic device system 301 is not occupied. In addition, when the designer wants to detect more V-BATT _ in the battery, it does not need to change the hard circuit of its internal circuit and only need to change the control judgment module 4〇7. After the code ((7)), it can be used for this purpose, which greatly enhances the flexibility of design. According to the wire, the present invention provides a battery power detecting system and a holding electronic device. In accordance with the spirit of the present invention, there are several advantages to be clarified: 1. Hunting uses the detection battery power system of the present invention to replace the conventional mine-like analog digital conversion 11 (ADC) to detect hand-held In the case of electronic devices, the cost of production can be reduced. 19 130·_ 21316twf.doc/e Yusuke Hunting uses the battery power system of the present invention to replace the conventional = (four) t _ _ (VGltage detee (four) to make the handheld ft battery power' and control with the control judging module _ battery The power is judged by two, and the domain ΐ changes its internal hardware circuit. It only needs to change the control two == so it can not only be used for the coffee, but also for the battery of the clothing, and it can also improve the flexibility of design. In addition to the battery power detection system of the present invention, the pulse width modulation system provided by the electronic farm system and the system can detect the battery power of the t-type electronic device, and can also convert it into an analog voltage (also That is, the DAC is turned over by the number of tiles, and the material needs to be analogous to the use of the peripheral hardware circuit controlled by the input control. Although the present invention has been disclosed in the preferred embodiment as above, it is not intended to limit the invention to any The technical scope of the present invention is defined by the scope of the appended claims, which is defined by the scope of the appended claims. 】 figure 1 It is shown as a circuit diagram for extracting the battery power of a handheld electronic device using an analog digital converter. Figure 2 is a circuit diagram showing the use of a voltage debt detector to detect the battery power of a handheld electronic device. 4 is a block diagram of a handheld electronic device according to a preferred embodiment of the present invention. Figure 4 is a circuit diagram of a battery power detecting system according to a preferred embodiment of the present invention. 20 CI-0124-TWXX 21316twf.doc/e 5 and FIG. 6 are diagrams showing a pulse width modulation signal and a corresponding charging and discharging voltage waveform thereof provided by the handheld electronic device system according to a preferred embodiment of the present invention. [Main component symbol description] (100, 200, 300: Handheld electronic device 1 (Π, 2G Bu 301: Handheld electronic device system 103, 203, 303: Battery 105: Analog digital converter 205: Voltage detector 305: Detection battery power system 307: Display unit 4 〇1: charge and discharge unit 403 · voltage limiting unit 405: comparison unit 4〇7: control judgment module UOP · voltage with light COP: comparator R5: resistance R Bu R2, R3, R4 C1 'C2 z capacitance