[go: up one dir, main page]

TWI855654B - Voltage detector device having trimming mechanism and voltage detection method - Google Patents

Voltage detector device having trimming mechanism and voltage detection method Download PDF

Info

Publication number
TWI855654B
TWI855654B TW112115634A TW112115634A TWI855654B TW I855654 B TWI855654 B TW I855654B TW 112115634 A TW112115634 A TW 112115634A TW 112115634 A TW112115634 A TW 112115634A TW I855654 B TWI855654 B TW I855654B
Authority
TW
Taiwan
Prior art keywords
signal
voltage
bits
detection
clock
Prior art date
Application number
TW112115634A
Other languages
Chinese (zh)
Other versions
TW202443161A (en
Inventor
薛建鋒
張祥
陳准
王威評
王志亮
Original Assignee
大陸商星宸科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商星宸科技股份有限公司 filed Critical 大陸商星宸科技股份有限公司
Priority to TW112115634A priority Critical patent/TWI855654B/en
Application granted granted Critical
Publication of TWI855654B publication Critical patent/TWI855654B/en
Publication of TW202443161A publication Critical patent/TW202443161A/en

Links

Images

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

A voltage detection method includes: outputting a corresponding one of voltages to be an input voltage according to a clock signal, a first detection signal, a reset signal, and first bits; generating the reset signal according to the clock signal and currents, in which the voltages and the currents are generated based on a power voltage; comparing the input voltage with a reference voltage to generate a second detection signal, and generating the first detection signal according to the second detection signal and an enable signal; and adjusting, by a digital circuit, the first bits according to the second detection signal during a trimming phase to determine the first bits, outputting, by the digital circuit, the first bits and resetting the digital circuit according to the first detection signal during a voltage detection phase.

Description

具有修整機制的電壓偵測裝置與電壓偵測方法 Voltage detection device and voltage detection method with trimming mechanism

本案是關於電壓偵測裝置,尤其是關於具有修整機制的電壓偵測裝置與電壓偵測方法。 This case is about a voltage detection device, and in particular, about a voltage detection device and a voltage detection method with a trimming mechanism.

在現有的電子裝置中,若電源電壓或其內部電壓因為突然的開關機等原因產生瞬間的電壓壓降,該電子裝置中的電路可能出現故障或操作錯誤。在現有的技術中,電壓偵測裝置藉由比較參考電壓與電源電壓(或是基於電源電壓產生的一電壓)來確認電源電壓是否出現過度壓降。由於參考電壓可能會因為製程變異而產生偏移,在該些技術中,電壓偵測裝置會使用高精度的偏壓電路來產生參考電壓或是額外的校正電路來校正參考電壓,如此,將使得電路成本明顯增加。 In existing electronic devices, if the power supply voltage or its internal voltage drops momentarily due to sudden power on/off, the circuit in the electronic device may fail or operate incorrectly. In existing technologies, a voltage detection device compares a reference voltage with the power supply voltage (or a voltage generated based on the power supply voltage) to confirm whether the power supply voltage has excessive voltage drop. Since the reference voltage may be offset due to process variation, in these technologies, the voltage detection device uses a high-precision bias circuit to generate a reference voltage or an additional correction circuit to correct the reference voltage, which will significantly increase the circuit cost.

於一些實施態樣中,本案的目的之一在於提供一種具有修整機制的電壓偵測裝置與電壓偵測方法,以改善先前技術之不足。 In some implementations, one of the purposes of this case is to provide a voltage detection device and a voltage detection method with a trimming mechanism to improve the deficiencies of the prior art.

於一些實施態樣中,電壓偵測裝置包含參考電壓選擇電路、重置訊號產生電路、電壓偵測器以及數位電路。參考電壓選擇電路根據一時脈訊號、一第一偵測訊號、重置訊號與複數個第一位元將一預設電壓複數個第一電壓中之一對應電壓輸出為一輸入電壓,其中該些第一電壓是基於一電源電壓產生。重置訊號產生電路根據該時脈訊號以及複數個電流產生該重置訊號,其中該些電流是基於該電源電壓產生。電壓偵測器比較該輸入電壓與一參考電壓以產生一第二偵測訊號,並根據該第二偵測訊號與一致能訊號產生該第一偵測訊號。數位電路在一修整期間根據該第二偵測訊號調整該些第一位元以決定該些第一位元的數值,並在一電壓偵測期間輸出該些第一位元並根據該第一偵測訊號選擇性地進行重置。 In some embodiments, the voltage detection device includes a reference voltage selection circuit, a reset signal generation circuit, a voltage detector, and a digital circuit. The reference voltage selection circuit outputs a voltage corresponding to one of a plurality of first voltages of a preset voltage as an input voltage according to a clock signal, a first detection signal, a reset signal, and a plurality of first bits, wherein the first voltages are generated based on a power supply voltage. The reset signal generation circuit generates the reset signal according to the clock signal and a plurality of currents, wherein the currents are generated based on the power supply voltage. The voltage detector compares the input voltage with a reference voltage to generate a second detection signal, and generates the first detection signal according to the second detection signal and an enable signal. The digital circuit adjusts the first bits according to the second detection signal during a trimming period to determine the values of the first bits, and outputs the first bits during a voltage detection period and selectively resets them according to the first detection signal.

於一些實施態樣中,電壓偵測方法包含下列操作:根據一時脈訊號、一第一偵測訊號、一重置訊號與複數個第一位元將複數個第一電壓中之一對應電壓輸出為一輸入電壓,其中該些第一電壓是基於一電源電壓產生;根據該時脈訊號以及複數個電流產生該重置訊號,其中該些電流是基於該電源電壓產生;比較該輸入電壓與一參考電壓以產生一第二偵測訊號,並根據該第二偵測訊號與一致能訊號產生該第一偵測訊號;以及藉由一數位電路在一修整期間根據該第二偵測訊號調整該些第一位元以決定該些第一位元的數值,並在一電壓偵測期間輸出該些第一位元並根據該第一偵測訊號選擇性地進行重置。 In some embodiments, the voltage detection method includes the following operations: outputting a voltage corresponding to one of a plurality of first voltages as an input voltage according to a clock signal, a first detection signal, a reset signal and a plurality of first bits, wherein the first voltages are generated based on a power voltage; generating the reset signal according to the clock signal and a plurality of currents, wherein the currents are generated based on the power voltage; ; compare the input voltage with a reference voltage to generate a second detection signal, and generate the first detection signal according to the second detection signal and an enable signal; and adjust the first bits according to the second detection signal during a trimming period by a digital circuit to determine the values of the first bits, and output the first bits during a voltage detection period and selectively reset them according to the first detection signal.

有關本案的特徵、實作與功效,茲配合圖式作較佳實施例詳細說明如下。 The features, implementation and effects of this case are described in detail below with reference to the diagrams for a preferred embodiment.

100:晶片系統 100: Chip system

110:電壓偵測裝置 110: Voltage detection device

111:參考電壓選擇電路 111: Reference voltage selection circuit

112:重置訊號產生電路 112: Reset signal generating circuit

113:電壓偵測器 113: Voltage detector

114:數位電路 114: Digital Circuits

120:低壓差穩壓器 120: Low voltage differential regulator

130:時脈產生器 130: Pulse generator

140:偏壓產生器 140: Bias generator

301:觸發器 301: Trigger

301A:邏輯閘 301A: Logical Gate

301B:反相器 301B: Inverter

302[0]~302[M-1]:正反器 302[0]~302[M-1]: Flip-flop

303,304:多工器 303,304:Multiplexer

401:時脈旗標產生器 401: Clock flag generator

402:上電旗標產生器 402: Power-on flag generator

402A:緩衝器 402A: Buffer

403:邏輯閘 403:Logical Gate

411:延遲電路 411: Delay circuit

412:邏輯閘 412:Logical Gate

413:切換式電容電路 413: Switching capacitor circuit

413A:反相器 413A: Inverter

501:比較器 501: Comparator

502:邏輯閘 502:Logical Gate

800:電壓偵測方法 800: Voltage detection method

B1[0]~B1[M-1],B2[0]~B2[M-1]:位元 B1[0]~B1[M-1],B2[0]~B2[M-1]: bits

C1,C2:電容 C1,C2: Capacitors

CKD:訊號 CKD:Signal

CKF:時脈旗標訊號 CKF: Clock flag signal

CLK:時脈訊號 CLK: clock signal

EN:致能訊號 EN: Enable signal

I1,I2:電流 I1,I2: current

N1,N2:節點 N1, N2: Node

PSF:上電旗標訊號 PSF: Power-on flag signal

S1:訊號 S1:Signal

S610,S620,S630,S640,S650:操作 S610, S620, S630, S640, S650: Operation

S710,S720,S730,S740:操作 S710, S720, S730, S740: Operation

S810,S820,S830,S840:操作 S810, S820, S830, S840: Operation

SD1:重置訊號 SD1: Reset signal

SP1,SPT:偵測訊號 SP1, SPT: Detection signal

SS:切換訊號 SS: Switching signal

ST:觸發訊號 ST: trigger signal

SW1:開關 SW1: switch

VD:預設電壓 VD: Default voltage

VDD:電源電壓 VDD: power supply voltage

VDD[0]~VDD[N-1],VDD[i]:電壓 VDD[0]~VDD[N-1],VDD[i]: voltage

VIN:輸入電壓 VIN: Input voltage

VREF:參考電壓 VREF: reference voltage

〔圖1〕為根據本案一些實施例繪製一種晶片系統的示意圖;〔圖2〕為根據本案一些實施例繪製圖1中的電壓偵測裝置的示意圖;〔圖3〕為根據本案一些實施例繪製圖2中的參考電壓選擇電路的示意圖;〔圖4A〕為根據本案一些實施例繪製圖2中的重置訊號產生電路的示意圖;〔圖4B〕為根據本案一些實施例繪製圖4A中的時脈旗標產生器的示意圖;〔圖4C〕為根據本案一些實施例繪製圖4A中的上電旗標產生器的示意圖;〔圖5〕為根據本案一些實施例繪製圖2中的電壓偵測器的示意圖;〔圖6〕為根據本案一些實施例繪製圖2的電壓偵測裝置在修整期間執行的多個操作的流程圖;〔圖7〕為根據本案一些實施例繪製圖2的電壓偵測裝置在電壓偵測期間執行的多個操作的流程圖;以及〔圖8〕為根據本案一些實施例繪製一種電壓偵測方法的流程圖。 FIG. 1 is a schematic diagram of a chip system according to some embodiments of the present invention; FIG. 2 is a schematic diagram of a voltage detection device in FIG. 1 according to some embodiments of the present invention; FIG. 3 is a schematic diagram of a reference voltage selection circuit in FIG. 2 according to some embodiments of the present invention; FIG. 4A is a schematic diagram of a reset signal generation circuit in FIG. 2 according to some embodiments of the present invention; FIG. 4B is a schematic diagram of a clock flag generator in FIG. 4A according to some embodiments of the present invention; FIG. 4C is a schematic diagram of a clock signal generator in FIG. 4B according to some embodiments of the present invention; FIG. 〔FIG. 5〕is a schematic diagram of the power-on flag generator in FIG. 2 according to some embodiments of the present invention; 〔FIG. 6〕is a flow chart of multiple operations performed by the voltage detection device in FIG. 2 during the trimming period according to some embodiments of the present invention; 〔FIG. 7〕is a flow chart of multiple operations performed by the voltage detection device in FIG. 2 during the voltage detection period according to some embodiments of the present invention; and 〔FIG. 8〕is a flow chart of a voltage detection method according to some embodiments of the present invention.

本文所使用的所有詞彙具有其通常的意涵。上述之詞彙在普遍常用之字典中之定義,在本案的內容中包含任一於此討論的詞彙之使用例子僅為示例,不應限制到本案之範圍與意涵。同樣地,本案亦不僅以於此說明書所示出的各種實施例為限。 All terms used in this article have their usual meanings. The definitions of the above terms in commonly used dictionaries and the use examples of any term discussed herein in the content of this case are only examples and should not limit the scope and meaning of this case. Similarly, this case is not limited to the various embodiments shown in this specification.

關於本文中所使用之『耦接』或『連接』,均可指二或多個元件相互直接作實體或電性接觸,或是相互間接作實體或電性接觸,亦可指二或 多個元件相互操作或動作。如本文所用,用語『電路』可為由至少一個電晶體與/或至少一個主被動元件按一定方式連接以處理訊號的裝置。 As used herein, "coupling" or "connection" may refer to two or more components making physical or electrical contact directly or indirectly, or two or more components operating or acting on each other. As used herein, the term "circuit" may refer to a device that is composed of at least one transistor and/or at least one active and passive component connected in a certain manner to process signals.

圖1為根據本案一些實施例繪製一種晶片系統100的示意圖。在一些實施例中,晶片系統100可使用在即時時脈(real-time clock,RTC)產生器與/或電源致能控制等應用,但本案並不以此為限。晶片系統100可包含電壓偵測裝置110、低壓差穩壓器(low-drop output regulator,LDO)120、時脈產生器130以及偏壓產生器140。 FIG1 is a schematic diagram of a chip system 100 according to some embodiments of the present invention. In some embodiments, the chip system 100 can be used in applications such as a real-time clock (RTC) generator and/or power enable control, but the present invention is not limited thereto. The chip system 100 can include a voltage detection device 110, a low-drop output regulator (LDO) 120, a clock generator 130, and a bias generator 140.

低壓差穩壓器120、時脈產生器130以及偏壓產生器140可由電源電壓VDD供電,以提供相應訊號。例如,低壓差穩壓器120可經由電源電壓VDD供電而提供電流I1與電流I2給電壓偵測裝置110。在一些實施例中,低壓差穩壓器120可基於電源電壓VDD產生電壓(未示出),並提供此電壓來對電壓偵測裝置110、時脈產生器130與/或偏壓產生器140進行供電。時脈產生器130可經由電源電壓VDD(或低壓差穩壓器120基於電源電壓VDD所產生的電壓)供電而提供時脈訊號CLK。偏壓產生器140可經由電源電壓VDD(或低壓差穩壓器120基於電源電壓VDD所產生的電壓)供電而產生參考電壓VREF,並對電源電壓VDD分壓而產生多個電壓VDD[0]~VDD[N-1],其中數值N可為大於1的正整數。 The low voltage difference regulator 120, the clock generator 130, and the bias generator 140 may be powered by the power voltage VDD to provide corresponding signals. For example, the low voltage difference regulator 120 may be powered by the power voltage VDD to provide current I1 and current I2 to the voltage detection device 110. In some embodiments, the low voltage difference regulator 120 may generate a voltage (not shown) based on the power voltage VDD, and provide this voltage to power the voltage detection device 110, the clock generator 130, and/or the bias generator 140. The clock generator 130 can be powered by the power voltage VDD (or the voltage generated by the low voltage difference regulator 120 based on the power voltage VDD) to provide the clock signal CLK. The bias generator 140 can be powered by the power voltage VDD (or the voltage generated by the low voltage difference regulator 120 based on the power voltage VDD) to generate a reference voltage VREF, and divide the power voltage VDD to generate multiple voltages VDD[0]~VDD[N-1], where the value N can be a positive integer greater than 1.

電壓偵測裝置110可接收電流I1、電流I2、時脈訊號CLK、參考電壓VREF、多個電壓VDD[0]~VDD[N-1]與致能訊號EN。在一些實施例中,當致能訊號EN具有第一邏輯值(例如為,但不限於,邏輯值1)時,電壓偵測裝置110操作在修整(trimming)期間,以使用多個位元B1[0]~B1[M-1](如圖2所 示)來挑選多個電壓VDD[0]~VDD[N-1]中之一對應電壓,其中數值M可為大於1的正整數。在挑選出該對應電壓後,電壓偵測裝置110儲存挑選出此對應電壓的多個位元B1[0]~B1[M-1]的數值。當致能訊號EN具有不同於第一邏輯值的第二邏輯值(例如為,但不限於,邏輯值0)時,電壓偵測裝置110操作在電壓偵測期間,以使用先前儲存的多個位元B1[0]~B1[M-1]來產生該對應電壓,從而根據此對應電壓與參考電壓VREF來偵測電源電壓VDD是否有出現異常。關於修整期間與電壓偵測期間之相關操作將依序如後參照各圖式說明。 The voltage detection device 110 can receive the current I1, the current I2, the clock signal CLK, the reference voltage VREF, a plurality of voltages VDD[0]~VDD[N-1] and the enable signal EN. In some embodiments, when the enable signal EN has a first logic value (such as, but not limited to, logic value 1), the voltage detection device 110 operates in a trimming period to select a voltage corresponding to one of the plurality of voltages VDD[0]~VDD[N-1] using a plurality of bits B1[0]~B1[M-1] (as shown in FIG. 2 ), wherein the value M can be a positive integer greater than 1. After selecting the corresponding voltage, the voltage detection device 110 stores the values of the multiple bits B1[0]~B1[M-1] selected for the corresponding voltage. When the enable signal EN has a second logic value different from the first logic value (for example, but not limited to, logic value 0), the voltage detection device 110 operates in the voltage detection period to use the previously stored multiple bits B1[0]~B1[M-1] to generate the corresponding voltage, thereby detecting whether the power supply voltage VDD is abnormal based on the corresponding voltage and the reference voltage VREF. The related operations during the trimming period and the voltage detection period will be described in sequence with reference to the various figures below.

圖2為根據本案一些實施例繪製圖1中的電壓偵測裝置110的示意圖。電壓偵測裝置110包含參考電壓選擇電路111、重置訊號產生電路112、電壓偵測器113以及數位電路114。參考電壓選擇電路111根據時脈訊號CLK、偵測訊號SP1、重置訊號SD1及多個位元B1[0]~B1[M-1]輸出一輸入電壓VIN。例如,參考電壓選擇電路111可根據上述多個訊號輸出多個電壓VDD[0]~VDD[N-1]中的一對應電壓為輸入電壓VIN或是輸出預設電壓VD為輸入電壓VIN。關於參考電壓選擇電路111的設置方式將於後參照圖3說明。 FIG2 is a schematic diagram of the voltage detection device 110 in FIG1 according to some embodiments of the present invention. The voltage detection device 110 includes a reference voltage selection circuit 111, a reset signal generation circuit 112, a voltage detector 113, and a digital circuit 114. The reference voltage selection circuit 111 outputs an input voltage VIN according to the clock signal CLK, the detection signal SP1, the reset signal SD1, and a plurality of bits B1[0]~B1[M-1]. For example, the reference voltage selection circuit 111 can output a corresponding voltage among a plurality of voltages VDD[0]~VDD[N-1] as the input voltage VIN or output a preset voltage VD as the input voltage VIN according to the plurality of signals. The setting method of the reference voltage selection circuit 111 will be described later with reference to FIG. 3 .

重置訊號產生電路112根據時脈訊號CLK與多個電流I1及I2產生重置訊號SD1,其中多個電流I1及I2是圖1的低壓差穩壓器120基於電源電壓VDD產生。關於重置訊號產生電路112的設置方式將於後參照圖4A至圖4C說明。 The reset signal generating circuit 112 generates a reset signal SD1 according to the clock signal CLK and multiple currents I1 and I2, wherein the multiple currents I1 and I2 are generated by the low voltage difference regulator 120 of FIG. 1 based on the power supply voltage VDD. The setting method of the reset signal generating circuit 112 will be described later with reference to FIG. 4A to FIG. 4C.

電壓偵測器113可比較輸入電壓VIN與參考電壓VREF以產生偵測訊號SPT,並根據偵測訊號SPT與致能訊號EN產生偵測訊號SP1。在電壓偵測期間,電壓偵測器113可比較輸入電壓VIN與參考電壓VREF來確認電源電壓VDD是否已穩定位於目標位準,從而偵測電源電壓VDD是否有出現異常壓降。關於電壓偵測器113的設置方式將於後參照圖5說明。 The voltage detector 113 can compare the input voltage VIN with the reference voltage VREF to generate a detection signal SPT, and generate a detection signal SP1 according to the detection signal SPT and the enable signal EN. During the voltage detection period, the voltage detector 113 can compare the input voltage VIN with the reference voltage VREF to confirm whether the power supply voltage VDD has been stabilized at the target level, thereby detecting whether the power supply voltage VDD has an abnormal voltage drop. The setting method of the voltage detector 113 will be described later with reference to FIG. 5.

數位電路114在修整期間可根據偵測訊號SPT調整多個位元B1[0]~B1[M-1]以決定多個位元B1[0]~B1[M-1]的數值,並在電壓偵測期間輸出多個個位元B1[0]~B1[M-1]並根據偵測訊號SP1選擇性地進行重置。例如,在修整期間,數位電路114可根據偵測訊號SPT執行二元搜索(binary search)演算法並依序調整多個位元B1[0]~B1[M-1],進而決定多個位元B1[0]~B1[M-1]的數值。在電壓偵測期間,數位電路114可輸出在修整期間內決定好的多個位元B1[0]~B1[M-1],以使得參考電壓選擇電路111可輸出相應的輸入電壓VIN給電壓偵測器113。如此,電壓偵測器113可利用此輸入電壓VIN來與參考電壓VREF進行比較,從而偵測電源電壓VDD是否已達到目標位準。若電源電壓VDD出現異常壓降而使得輸入電壓VIN過低,偵測訊號SP1將會轉態,以指示數位電路114進行重置。於此條件下,數位電路114可進行重置(例如,清除內部電路設定),以避免內部電路因異常壓降出現錯誤。在一些實施例中,數位電路114可受控於系統中的軟體與/或硬體,以執行上述的相關操作。在一些實施例中,數位電路114可設置於系統中的控制電路、中央處理器等等。關於數位電路114的相關操作將於後參照圖6與圖7分別說明。 The digital circuit 114 may adjust the multiple bits B1[0]~B1[M-1] according to the detection signal SPT during the trimming period to determine the values of the multiple bits B1[0]~B1[M-1], and output the multiple bits B1[0]~B1[M-1] during the voltage detection period and selectively reset them according to the detection signal SP1. For example, during the trimming period, the digital circuit 114 may perform a binary search algorithm according to the detection signal SPT and sequentially adjust the multiple bits B1[0]~B1[M-1] to determine the values of the multiple bits B1[0]~B1[M-1]. During the voltage detection period, the digital circuit 114 can output a plurality of bits B1[0]~B1[M-1] determined during the trimming period, so that the reference voltage selection circuit 111 can output the corresponding input voltage VIN to the voltage detector 113. In this way, the voltage detector 113 can use the input voltage VIN to compare with the reference voltage VREF to detect whether the power supply voltage VDD has reached the target level. If the power supply voltage VDD has an abnormal voltage drop and the input voltage VIN is too low, the detection signal SP1 will change state to instruct the digital circuit 114 to reset. Under this condition, the digital circuit 114 can be reset (for example, clearing the internal circuit settings) to prevent the internal circuit from erroneously causing an abnormal voltage drop. In some embodiments, the digital circuit 114 can be controlled by software and/or hardware in the system to perform the above-mentioned related operations. In some embodiments, the digital circuit 114 can be set in a control circuit, a central processing unit, etc. in the system. The related operations of the digital circuit 114 will be described later with reference to FIG. 6 and FIG. 7, respectively.

藉由上述設置方式,電壓偵測裝置110可在修整期間內挑選出一個適合用來與參考電壓VREF比對的輸入電壓VIN,以確保電壓偵測裝置110在電壓偵測期間可具有更準確的偵測結果,從而提高整體系統的操作可靠度。由於參考電壓會受到製程變異等影響而產生偏移,在一些相關技術中的電壓偵測裝置是利用具有高精度的偏壓電路來產生參考電壓與/或利用額外校正機制來校正參考電壓的位準,以提高電壓偵測的準確度。換言之,在該些技術中,該電壓偵測裝置需使用額外的校正電路與/或高精度的偏壓電路,將使得整體成本明 顯增加。不同於上述技術,在本案的一些實施例中,電壓偵測裝置110不校正參考電壓VREF,而是改為修整與參考電壓VREF進行比對的輸入電壓VIN,其中調整輸入電壓VIN的電路部分與偵測電源電壓VDD的電路部分為共同電路(例如為參考電壓選擇電路111及電壓偵測器113),故不需使用高精度的偏壓電路或是額外使用校正電路。如此,可降低整體電路成本。 By means of the above configuration, the voltage detection device 110 can select an input voltage VIN suitable for comparison with the reference voltage VREF during the trimming period to ensure that the voltage detection device 110 can have a more accurate detection result during the voltage detection period, thereby improving the operational reliability of the overall system. Since the reference voltage may be offset due to the influence of process variation, the voltage detection device in some related technologies uses a bias circuit with high precision to generate a reference voltage and/or uses an additional correction mechanism to correct the level of the reference voltage to improve the accuracy of voltage detection. In other words, in these technologies, the voltage detection device needs to use an additional calibration circuit and/or a high-precision bias circuit, which will significantly increase the overall cost. Different from the above-mentioned technologies, in some embodiments of the present case, the voltage detection device 110 does not calibrate the reference voltage VREF, but instead trims the input voltage VIN that is compared with the reference voltage VREF, wherein the circuit portion for adjusting the input voltage VIN and the circuit portion for detecting the power supply voltage VDD are a common circuit (for example, the reference voltage selection circuit 111 and the voltage detector 113), so there is no need to use a high-precision bias circuit or an additional calibration circuit. In this way, the overall circuit cost can be reduced.

圖3為根據本案一些實施例繪製圖2中的參考電壓選擇電路111的示意圖。參考電壓選擇電路111包含觸發器301、多個正反器302[0]~302[M-1]、多工器303以及多工器304。觸發器301根據時脈訊號CLK以及偵測訊號SP1產生觸發訊號ST。詳細而言,在一些實施例中,觸發器301包含邏輯閘301A以及反相器301B。在一些實施例中,邏輯閘301A可為,但不限於,反及閘,其可根據時脈訊號CLK以及偵測訊號SP1產生訊號S1。反相器301B可根據訊號S1產生觸發訊號ST。 FIG3 is a schematic diagram of the reference voltage selection circuit 111 in FIG2 according to some embodiments of the present invention. The reference voltage selection circuit 111 includes a trigger 301, a plurality of flip-flops 302[0] to 302[M-1], a multiplexer 303, and a multiplexer 304. The trigger 301 generates a trigger signal ST according to a clock signal CLK and a detection signal SP1. Specifically, in some embodiments, the trigger 301 includes a logic gate 301A and an inverter 301B. In some embodiments, the logic gate 301A may be, but is not limited to, an NAND gate, which may generate a signal S1 according to the clock signal CLK and the detection signal SP1. Inverter 301B can generate a trigger signal ST according to signal S1.

多個正反器302[0]~302[M-1]可為,但不限於,D型正反器。多個正反器302[0]~302[M-1]可根據觸發訊號ST分別將多個位元B1[0]~B1[M-1]輸出為多個位元B2[0]~B2[M-1],並可根據重置訊號SD1重置多個位元B2[0]~B2[M-1]。以正反器302[0]為例,正反器302[0]可根據觸發訊號ST將位元B1[0]輸出為位元B2[0]。或者,當重置訊號SD1具有預設值(例如為,但不限於,邏輯值0),正反器302[0]可將位元B2[0]重置為邏輯值0。其餘的正反器302[1]~302[M-1]、其餘位元B1[1]~B1[M-1]與其餘位元B2[1]~B2[M-1]之間的對應關係與操作可參照正反器302[0],故不在重複贅述。 The plurality of flip-flops 302[0]~302[M-1] may be, but are not limited to, D-type flip-flops. The plurality of flip-flops 302[0]~302[M-1] may output the plurality of bits B1[0]~B1[M-1] as the plurality of bits B2[0]~B2[M-1] according to the trigger signal ST, and may reset the plurality of bits B2[0]~B2[M-1] according to the reset signal SD1. Taking the flip-flop 302[0] as an example, the flip-flop 302[0] may output the bit B1[0] as the bit B2[0] according to the trigger signal ST. Alternatively, when the reset signal SD1 has a preset value (such as, but not limited to, a logical value 0), the flip-flop 302[0] may reset the bit B2[0] to the logical value 0. The corresponding relationship and operation between the remaining flip-flops 302[1]~302[M-1], the remaining bits B1[1]~B1[M-1] and the remaining bits B2[1]~B2[M-1] can refer to the flip-flop 302[0], so it will not be repeated here.

多工器303根據多個位元B2[0]~B2[M-1]中的部分位元(例如可為,但不限於,多個位元B2[0]~B2[M-2])自多個電壓VDD[0]~VDD[N-1]中選 出一對應電壓VDD[i],其中數值i可為數值0至數值N-1之間的任一正整數。多工器304根據多個位元B2[0]~B2[M-1]中的剩餘位元(例如可為,但不限於,位元B2[M-2])選擇輸出該對應電壓VDD[i]或預設電壓VD為輸入電壓VIN。 The multiplexer 303 selects a corresponding voltage VDD[i] from a plurality of voltages VDD[0]~VDD[N-1] according to some bits in the plurality of bits B2[0]~B2[M-1] (for example, but not limited to, a plurality of bits B2[0]~B2[M-2]), wherein the value i can be any positive integer between the value 0 and the value N-1. The multiplexer 304 selects to output the corresponding voltage VDD[i] or the preset voltage VD as the input voltage VIN according to the remaining bits in the plurality of bits B2[0]~B2[M-1] (for example, but not limited to, the bit B2[M-2]).

圖4A為根據本案一些實施例繪製圖2中的重置訊號產生電路112的示意圖。在一些實施例中,重置訊號產生電路112可包含時脈旗標產生器401、上電旗標產生器402以及邏輯閘403。時脈旗標產生器401根據時脈訊號CLK與電流I1產生時脈旗標訊號CKF。上電旗標產生器402根據電流I2產生上電旗標訊號PSF。邏輯閘403可根據時脈旗標訊號CKF與上電旗標訊號PSF產生重置訊號SD1。在一些實施例中,邏輯閘403可為,但不限於,及閘。在一些實施例中,重置訊號SD1可用來指示圖1的時脈產生器130是否在上電後已操作在穩定狀態(即可穩定產生具有預設週期的時脈訊號CLK)。時脈產生器130在電源電壓VDD上電後會開始震盪而開始產生時脈訊號CLK。時脈訊號CLK在電源電壓VDD上電後的一短暫期間內可能會處於不穩定狀態,使得時脈旗標訊號CKF於該期間內也具有不穩定狀態。因此,藉由使用邏輯閘403根據時脈旗標訊號CKF與上電旗標訊號PSF來產生重置訊號SD1,可避免重置訊號SD1在電源電壓VDD的上電過程開始後的一段期間內受到不穩定的時脈旗標訊號CKF影響而不正確地持續具有同一邏輯值。 FIG4A is a schematic diagram of the reset signal generating circuit 112 in FIG2 according to some embodiments of the present invention. In some embodiments, the reset signal generating circuit 112 may include a clock flag generator 401, a power-on flag generator 402, and a logic gate 403. The clock flag generator 401 generates a clock flag signal CKF according to the clock signal CLK and the current I1. The power-on flag generator 402 generates a power-on flag signal PSF according to the current I2. The logic gate 403 may generate a reset signal SD1 according to the clock flag signal CKF and the power-on flag signal PSF. In some embodiments, the logic gate 403 may be, but is not limited to, an AND gate. In some embodiments, the reset signal SD1 can be used to indicate whether the clock generator 130 of FIG. 1 has been operating in a stable state after power-on (i.e., can stably generate a clock signal CLK with a preset period). The clock generator 130 will start to oscillate and start to generate the clock signal CLK after the power voltage VDD is powered on. The clock signal CLK may be in an unstable state for a short period of time after the power voltage VDD is powered on, so that the clock flag signal CKF also has an unstable state during this period. Therefore, by using the logic gate 403 to generate the reset signal SD1 according to the clock flag signal CKF and the power-on flag signal PSF, it is possible to prevent the reset signal SD1 from being affected by the unstable clock flag signal CKF and incorrectly continuing to have the same logic value during a period after the power-on process of the power voltage VDD begins.

圖4B為根據本案一些實施例繪製圖4A中的時脈旗標產生器401的示意圖。時脈旗標產生器401包含延遲電路411、邏輯閘412與切換式電容電路413。延遲電路411可延遲時脈訊號CLK來產生訊號CKD(其相當於時脈訊號CLK的一延遲)。在一些實施例中,延遲電路411可由數個串聯耦接的數位電路實施。邏輯閘412根據時脈訊號CLK與訊號CKD產生切換訊號SS。在一些實施 例中,邏輯閘412可為,但不限於,互斥或閘。切換式電容電路413根據電流I1與切換訊號SS調整節點N1的位準,並根據節點N1的位準產生該時脈旗標訊號CKF。例如,切換式電容電路413包含電容C1、開關SW1以及反相器413A。電容C1耦接於節點N1與地之間,並經由電流I1充電以提高節點N1的位準。開關SW1耦接於節點N1與地之間,並根據切換訊號SS選擇性導通,以旁路電流I1至地並使得電容C經由開關SW1進行放電,從而降低節點N1的位準。反相器413A耦接至節點N1並根據節點N1的位準產生時脈旗標訊號CKF。 FIG4B is a schematic diagram of the clock flag generator 401 in FIG4A according to some embodiments of the present invention. The clock flag generator 401 includes a delay circuit 411, a logic gate 412, and a switching capacitor circuit 413. The delay circuit 411 can delay the clock signal CLK to generate a signal CKD (which is equivalent to a delay of the clock signal CLK). In some embodiments, the delay circuit 411 can be implemented by a plurality of digital circuits coupled in series. The logic gate 412 generates a switching signal SS according to the clock signal CLK and the signal CKD. In some embodiments, the logic gate 412 can be, but is not limited to, a mutex or gate. The switching capacitor circuit 413 adjusts the level of the node N1 according to the current I1 and the switching signal SS, and generates the clock flag signal CKF according to the level of the node N1. For example, the switching capacitor circuit 413 includes a capacitor C1, a switch SW1, and an inverter 413A. The capacitor C1 is coupled between the node N1 and the ground, and is charged by the current I1 to increase the level of the node N1. The switch SW1 is coupled between the node N1 and the ground, and is selectively turned on according to the switching signal SS to bypass the current I1 to the ground and discharge the capacitor C through the switch SW1, thereby reducing the level of the node N1. The inverter 413A is coupled to the node N1 and generates the clock flag signal CKF according to the level of the node N1.

詳細而言,在電源電壓VDD上電後,低壓差穩壓器120開始產生電流I1,使得電容C1經由電流I1充電而提高節點N1的位準。於此條件下,反相器413A輸出具有低位準的時脈旗標訊號CKF。接著,當邏輯閘412輸出具有高位準的切換訊號SS時,開關SW1導通而降低節點N1的位準。隨著開關SW1導通次數的增加,節點N1的位準會越來越低。當節點N1的位準低於一臨界值時,反相器413A的輸出會轉態而產生具有高位準的時脈旗標訊號CKF。 In detail, after the power supply voltage VDD is powered on, the low-voltage difference regulator 120 starts to generate current I1, so that the capacitor C1 is charged by the current I1 and the level of the node N1 is increased. Under this condition, the inverter 413A outputs a clock flag signal CKF with a low level. Then, when the logic gate 412 outputs a switching signal SS with a high level, the switch SW1 is turned on to reduce the level of the node N1. As the number of times the switch SW1 is turned on increases, the level of the node N1 will become lower and lower. When the level of the node N1 is lower than a critical value, the output of the inverter 413A will transition to generate a clock flag signal CKF with a high level.

圖4C為根據本案一些實施例繪製圖4A中的上電旗標產生器402的示意圖。在一些實施例中,上電旗標產生器402包含電容C2以及緩衝器402A。電容C2耦接於節點N2與地之間,並經由電流I2充電而提高節點N2的位準。緩衝器402A耦接至節點N2,並根據節點N2的位準產生上電旗標訊號PSF。在一些實施例中,緩衝器402A可由,但不限於,偶數個串接的反相器實施。當電源電壓VDD上電後,低壓差穩壓器120開始產生電流I2,使得電容C2經由電流I2充電而提高節點N2的位準。當節點N2的位準仍低於一臨界值時,緩衝器402A將產生具有低位準的上電旗標訊號PSF。或者,當節點N2的位準開始高於該臨界值時,緩衝器402A將改為持續產生具有高位準的上電旗標訊號PSF。 FIG4C is a schematic diagram of the power-on flag generator 402 in FIG4A according to some embodiments of the present invention. In some embodiments, the power-on flag generator 402 includes a capacitor C2 and a buffer 402A. The capacitor C2 is coupled between the node N2 and the ground, and is charged by the current I2 to increase the level of the node N2. The buffer 402A is coupled to the node N2, and generates a power-on flag signal PSF according to the level of the node N2. In some embodiments, the buffer 402A can be implemented by, but not limited to, an even number of inverters connected in series. When the power supply voltage VDD is powered on, the low voltage difference regulator 120 starts to generate the current I2, so that the capacitor C2 is charged by the current I2 to increase the level of the node N2. When the level of node N2 is still below a critical value, buffer 402A will generate a power-on flag signal PSF with a low level. Alternatively, when the level of node N2 begins to be higher than the critical value, buffer 402A will switch to continuously generate a power-on flag signal PSF with a high level.

圖5為根據本案一些實施例繪製圖2中的電壓偵測器113的示意圖。在一些實施例中,電壓偵測器113包含比較器501與邏輯閘502。比較器501比較輸入電壓VIN與參考電壓VREF以產生偵測訊號SPT。邏輯閘502可根據偵測訊號SPT與致能訊號產生偵測訊號SP1。在一些實施例中,邏輯閘502可為,但不限於,或閘,其可在當致能訊號EN具有邏輯值1時(即修整期間)輸出會持續具有邏輯值1的偵測訊號SP1,從而避免數位電路114進行重置。另一方面,在致能訊號EN具有邏輯值0時(即電壓偵測期間),邏輯閘502可響應此致能訊號EN而將偵測訊號SPT輸出為偵測訊號SP1。 FIG5 is a schematic diagram of the voltage detector 113 in FIG2 according to some embodiments of the present invention. In some embodiments, the voltage detector 113 includes a comparator 501 and a logic gate 502. The comparator 501 compares the input voltage VIN with the reference voltage VREF to generate a detection signal SPT. The logic gate 502 can generate a detection signal SP1 according to the detection signal SPT and an enable signal. In some embodiments, the logic gate 502 may be, but is not limited to, a gate or a gate, which may output a detection signal SP1 that continues to have a logic value of 1 when the enable signal EN has a logic value of 1 (i.e., during the trimming period), thereby preventing the digital circuit 114 from being reset. On the other hand, when the enable signal EN has a logic value of 0 (i.e., during the voltage detection period), the logic gate 502 may respond to the enable signal EN and output the detection signal SPT as the detection signal SP1.

圖6為根據本案一些實施例繪製圖2的電壓偵測裝置110在修整期間執行的多個操作的流程圖。在操作S610,接收具有第一邏輯值的致能訊號EN,以產生具有第一邏輯值的偵測訊號SP1。如前所述,在修整期間,致能訊號EN具有邏輯值1(相當於前述的第一邏輯值)。於此條件下,電壓偵測器113響應此致能訊號EN而產生具有邏輯值1的偵測訊號SP1,從而避免數位電路114被重置。 FIG6 is a flow chart of multiple operations performed by the voltage detection device 110 of FIG2 during the trimming period according to some embodiments of the present invention. In operation S610, an enable signal EN having a first logic value is received to generate a detection signal SP1 having a first logic value. As mentioned above, during the trimming period, the enable signal EN has a logic value of 1 (equivalent to the aforementioned first logic value). Under this condition, the voltage detector 113 responds to the enable signal EN and generates a detection signal SP1 having a logic value of 1, thereby preventing the digital circuit 114 from being reset.

在操作S620,調整電源電壓VDD至目標位準。例如,若電源電壓VDD的正常工作位準約為1.6伏特至3.63伏特,則目標位準可設置約為1.5伏特。在一些實施例中,此目標位準為足以讓圖1的時脈產生器130進行震盪而可開始產生時脈訊號CLK的一位準。在一些實施例中,數位電路114可發出至少一訊號給其他電路(例如,低壓差穩壓器120)或是系統中的電源管理電路(未示出),以執行操作S620。 In operation S620, the power voltage VDD is adjusted to a target level. For example, if the normal operating level of the power voltage VDD is approximately 1.6 volts to 3.63 volts, the target level can be set to approximately 1.5 volts. In some embodiments, this target level is a level sufficient to allow the clock generator 130 of FIG. 1 to oscillate and start generating the clock signal CLK. In some embodiments, the digital circuit 114 can send at least one signal to other circuits (e.g., the low voltage difference regulator 120) or a power management circuit (not shown) in the system to perform operation S620.

在操作S630,根據觸發訊號ST將多個位元B1[0]~B1[M-1]輸出為多個位元B2[0]~B2[M-1]。如前所述,時脈產生器130可在具有目標位準的電 源電壓VDD開始產生時脈訊號CLK。因此,圖3中的觸發器301可產生會隨著時脈訊號CLK切換的觸發訊號ST。於此條件下,多個正反器302[0]~302[M-1]將根據觸發訊號ST將多個位元B1[0]~B1[M-1]分別輸出為多個位元B2[0]~B2[M-1]。 In operation S630, the multiple bits B1[0]~B1[M-1] are output as multiple bits B2[0]~B2[M-1] according to the trigger signal ST. As described above, the clock generator 130 can start to generate the clock signal CLK at the power supply voltage VDD with the target level. Therefore, the trigger 301 in Figure 3 can generate the trigger signal ST that switches with the clock signal CLK. Under this condition, the multiple flip-flops 302[0]~302[M-1] will output the multiple bits B1[0]~B1[M-1] as multiple bits B2[0]~B2[M-1] according to the trigger signal ST.

在操作S640,根據偵測訊號SPT執行二元搜索演算法,以決定多個位元B1[0]~B1[M-1]的數值。舉例而言,數位電路114可先產生第一組位元B1[0]~B1[M-1](其對應於多個電壓VDD[0]~VDD[N-1]中具有中間位準的一者),且參考電壓選擇電路111可根據此組位元B1[0]~B1[M-1]自多個電壓VDD[0]~VDD[N-1]選出具有中間位準的該者(即對應電壓VDD[i])以作為輸入電壓VIN,參考電壓選擇電路111可將此輸入電壓VIN與參考電壓VREF進行比較。若輸入電壓VIN高於該參考電壓VREF,偵測訊號SPT具有邏輯值1。接著,數位電路114可改為輸出第二組位元B1[0]~B1[M-1],以使參考電壓選擇電路111可從多個電壓VDD[0]~VDD[N-1]中選出具有低於前述中間位準的次一電壓,並輸出該次一電壓為該輸入電壓VIN。若輸入電壓VIN變為低於該參考電壓VREF,偵測訊號SPT將切換為具有邏輯值0。如此,數位電路114可判定適合此參考電壓VREF的一組位元B1[0]~B1[M-1]的數值可能為前述的第一組位元或第二組位元。 In operation S640, a binary search algorithm is executed according to the detection signal SPT to determine the values of the plurality of bits B1[0]~B1[M-1]. For example, the digital circuit 114 may first generate a first group of bits B1[0]~B1[M-1] (which corresponds to one of the multiple voltages VDD[0]~VDD[N-1] with an intermediate level), and the reference voltage selection circuit 111 may select the one with the intermediate level (i.e., the corresponding voltage VDD[i]) from the multiple voltages VDD[0]~VDD[N-1] according to the group of bits B1[0]~B1[M-1] as the input voltage VIN, and the reference voltage selection circuit 111 may compare the input voltage VIN with the reference voltage VREF. If the input voltage VIN is higher than the reference voltage VREF, the detection signal SPT has a logical value of 1. Then, the digital circuit 114 can change to output the second group of bits B1[0]~B1[M-1], so that the reference voltage selection circuit 111 can select a next voltage lower than the aforementioned middle level from multiple voltages VDD[0]~VDD[N-1], and output the next voltage as the input voltage VIN. If the input voltage VIN becomes lower than the reference voltage VREF, the detection signal SPT will switch to have a logical value of 0. In this way, the digital circuit 114 can determine that the value of a group of bits B1[0]~B1[M-1] suitable for this reference voltage VREF may be the aforementioned first group of bits or the second group of bits.

或者,若對應於第一組位元B1[0]~B1[M-1]之輸入電壓VIN低於該參考電壓VREF,偵測訊號SPT具有邏輯值0。接著,數位電路114可改為輸出第三組位元B1[0]~B1[M-1],以使參考電壓選擇電路111可從多個電壓VDD[0]~VDD[N-1]中選出具有高於前述中間位準的次一電壓,並輸出該次一電壓為該輸入電壓VIN。若輸入電壓VIN變為高於該參考電壓VREF,偵測訊號 SPT將切換為具有邏輯值1。如此,數位電路114可判定適合此參考電壓VREF的一組位元B1[0]~B1[M-1]的數值可能為前述的第一組位元或第三組位元。依此類推,藉由反覆執行上述流程,數位電路114可根據偵測訊號SPT來決定多個位元B1[0]~B1[M-1]的數值。應當理解,上述說明的調整方式為一種簡易的二元搜索演算法,但本案並不以此為限。各種合適的二元搜索演算法之調整方式亦為本案所涵蓋的範圍。 Alternatively, if the input voltage VIN corresponding to the first group of bits B1[0]~B1[M-1] is lower than the reference voltage VREF, the detection signal SPT has a logical value of 0. Then, the digital circuit 114 can change to output the third group of bits B1[0]~B1[M-1], so that the reference voltage selection circuit 111 can select a next voltage higher than the aforementioned middle level from a plurality of voltages VDD[0]~VDD[N-1], and output the next voltage as the input voltage VIN. If the input voltage VIN becomes higher than the reference voltage VREF, the detection signal SPT will switch to have a logical value of 1. In this way, the digital circuit 114 can determine that the value of a group of bits B1[0]~B1[M-1] suitable for the reference voltage VREF may be the aforementioned first group of bits or the third group of bits. Similarly, by repeatedly executing the above process, the digital circuit 114 can determine the values of multiple bits B1[0]~B1[M-1] according to the detection signal SPT. It should be understood that the adjustment method described above is a simple binary search algorithm, but the present case is not limited to this. Various suitable adjustment methods of binary search algorithms are also covered by the present case.

在操作S650,儲存多個位元B1[0]~B1[M-1]的數值。在一些實施例中,數位電路114可包含至少一儲存電路(例如可為,但不限於,暫存器),其可儲存在操作S640中所決定好的多個位元B1[0]~B1[M-1]的數值。 In operation S650, the values of the multiple bits B1[0]~B1[M-1] are stored. In some embodiments, the digital circuit 114 may include at least one storage circuit (such as, but not limited to, a register), which can store the values of the multiple bits B1[0]~B1[M-1] determined in operation S640.

圖7為根據本案一些實施例繪製圖2的電壓偵測裝置110在電壓偵測期間執行的多個操作的流程圖。在操作S710,在電源電壓VDD剛上電後的第一期間,重置多個位元B2[0]~B2[M-2]為邏輯值0,以輸出預設電壓VD為輸入電壓VIN。例如,在電源電壓VDD上電過程的一初始期間內,重置訊號SD1為邏輯值0(因圖3中的節點N2的位準還不夠高),使得多個正反器302[0]~302[M-1]將多個位元B2[0]~B2[M-2]重置為邏輯值0。由於位元B2[M-2]具有邏輯值0,多工器304將輸出預設電壓VD為輸入電壓VIN。 FIG. 7 is a flowchart of multiple operations performed by the voltage detection device 110 of FIG. 2 during the voltage detection period according to some embodiments of the present invention. In operation S710, in the first period after the power supply voltage VDD is powered on, multiple bits B2[0]~B2[M-2] are reset to a logical value of 0 to output a preset voltage VD as the input voltage VIN. For example, in an initial period of the power supply voltage VDD power-on process, the reset signal SD1 is a logical value of 0 (because the level of the node N2 in FIG. 3 is not high enough), so that multiple flip-flops 302[0]~302[M-1] reset multiple bits B2[0]~B2[M-2] to a logical value of 0. Since bit B2[M-2] has a logical value of 0, multiplexer 304 will output the preset voltage VD as the input voltage VIN.

在操作S720,在電源電壓VDD上電後的第二期間,多個正反器302[0]~302[M-1]將多個位元B1[0]~B1[M-1]輸出為多個位元B2[0]~B2[M-1]。例如,在電源電壓VDD上電後的一段期間內,當圖3的節點N2的位準足夠高時,重置訊號SD1將切換為邏輯值1,使得多個正反器302[0]~302[M-1]不進行重置而是開始根據觸發訊號ST將多個位元B1[0]~B1[M-1]輸出為多個位元B2[0]~B2[M-1]。 In operation S720, during the second period after the power voltage VDD is powered on, the multiple flip-flops 302[0]~302[M-1] output the multiple bits B1[0]~B1[M-1] as multiple bits B2[0]~B2[M-1]. For example, during a period after the power voltage VDD is powered on, when the level of the node N2 in FIG3 is high enough, the reset signal SD1 will switch to the logic value 1, so that the multiple flip-flops 302[0]~302[M-1] do not reset but start to output the multiple bits B1[0]~B1[M-1] as multiple bits B2[0]~B2[M-1] according to the trigger signal ST.

在操作S730,數位電路114輸出先前所儲存的多個位元B1[0]~B1[M-1],以輸出對應電壓VDD[i]為輸入電壓VIN。在操作S740,比較輸入電壓VIN與參考電壓VREF,以偵測電源電壓VDD是否出現異常壓降。例如,數位電路114可輸出在圖6的操作S650所儲存的多個位元B1[0]~B1[M-1],使得參考電壓選擇電路111可輸出適合此參考電壓VREF的輸入電壓VIN,從而可開始藉由比較參考電壓VREF與輸入電壓VIN來確認電源電壓VDD是否出現異常壓降。 In operation S730, the digital circuit 114 outputs the previously stored multiple bits B1[0]~B1[M-1] to output the corresponding voltage VDD[i] as the input voltage VIN. In operation S740, the input voltage VIN is compared with the reference voltage VREF to detect whether the power supply voltage VDD has an abnormal voltage drop. For example, the digital circuit 114 can output the multiple bits B1[0]~B1[M-1] stored in operation S650 of FIG6 , so that the reference voltage selection circuit 111 can output the input voltage VIN suitable for the reference voltage VREF, thereby starting to confirm whether the power supply voltage VDD has an abnormal voltage drop by comparing the reference voltage VREF with the input voltage VIN.

圖8為根據本案一些實施例繪製一種電壓偵測方法800的流程圖。在操作S810,根據一時脈訊號、一第一偵測訊號、一重置訊號與複數個第一位元將複數個第一電壓中之一對應電壓輸出為一輸入電壓,其中該些第一電壓是基於一電源電壓產生。在操作S820,根據該時脈訊號以及複數個電流產生該重置訊號,其中該些電流是基於該電源電壓產生。在操作S830,比較該輸入電壓與一參考電壓以產生一第二偵測訊號,並根據該第二偵測訊號與一致能訊號產生該第一偵測訊號。在操作S840,藉由一數位電路在一修整期間根據該第二偵測訊號調整該些第一位元以決定該些第一位元的數值,並在一電壓偵測期間輸出該些第一位元並根據該第一偵測訊號選擇性地進行重置。 FIG8 is a flow chart of a voltage detection method 800 according to some embodiments of the present invention. In operation S810, a voltage corresponding to one of a plurality of first voltages is output as an input voltage according to a clock signal, a first detection signal, a reset signal and a plurality of first bits, wherein the first voltages are generated based on a power supply voltage. In operation S820, the reset signal is generated according to the clock signal and a plurality of currents, wherein the currents are generated based on the power supply voltage. In operation S830, the input voltage is compared with a reference voltage to generate a second detection signal, and the first detection signal is generated according to the second detection signal and an enable signal. In operation S840, a digital circuit adjusts the first bits according to the second detection signal during a trimming period to determine the values of the first bits, and outputs the first bits during a voltage detection period and selectively resets them according to the first detection signal.

上述電壓偵測方法800的多個操作可參考前述的實施例之說明,故於此不再重複贅述。上述電壓偵測方法800的多個操作僅為示例,並非限定需依照此示例中的順序執行。在不違背本案的各實施例的操作方式與範圍下,在電壓偵測方法800下的各種操作當可適當地增加、替換、省略或以不同順序執行(例如可以是同時執行或是部分同時執行)。 The multiple operations of the voltage detection method 800 can refer to the description of the aforementioned embodiments, so they will not be repeated here. The multiple operations of the voltage detection method 800 are only examples and are not limited to be executed in the order in this example. Without violating the operation mode and scope of each embodiment of the present case, the various operations under the voltage detection method 800 can be appropriately added, replaced, omitted or executed in a different order (for example, they can be executed simultaneously or partially simultaneously).

綜上所述,本案一些實施例中的電壓偵測裝置與電壓偵測方法可利用電壓修整機制來找出適合當前參考電壓的一電壓,並使用此電壓與參考 電壓來偵測電源電壓是否出現異常。如此,可在未使用高精度的參考電壓產生器或未使用參考電壓校正機制下更為準確地進行電壓偵測,從而提高系統可靠度並減少整體電路成本。 In summary, the voltage detection device and the voltage detection method in some embodiments of the present invention can use the voltage trimming mechanism to find a voltage suitable for the current reference voltage, and use this voltage and the reference voltage to detect whether the power supply voltage is abnormal. In this way, the voltage detection can be performed more accurately without using a high-precision reference voltage generator or a reference voltage correction mechanism, thereby improving the system reliability and reducing the overall circuit cost.

雖然本案之實施例如上所述,然而該些實施例並非用來限定本案,本技術領域具有通常知識者可依據本案之明示或隱含之內容對本案之技術特徵施以變異,凡此種種變異均可能屬於本案所尋求之專利保護範疇,換言之,本案之專利保護範圍須視本說明書之申請專利範圍所界定者為準。 Although the embodiments of this case are described above, these embodiments are not used to limit this case. People with ordinary knowledge in this technical field can make variations to the technical features of this case based on the explicit or implicit content of this case. All these variations may fall within the scope of patent protection sought by this case. In other words, the scope of patent protection of this case shall be subject to the scope of patent application defined in this specification.

800:電壓偵測方法 800: Voltage detection method

S810,S820,S830,S840:操作 S810, S820, S830, S840: Operation

Claims (12)

一種電壓偵測裝置,包含: 一參考電壓選擇電路,根據一時脈訊號、一第一偵測訊號、一重置訊號及複數個第一位元將複數個第一電壓中之一對應電壓輸出為一輸入電壓,其中該些第一電壓是基於一電源電壓產生; 一重置訊號產生電路,根據該時脈訊號以及複數個電流產生該重置訊號,其中該些電流是基於該電源電壓產生; 一電壓偵測器,比較該輸入電壓與一參考電壓以產生一第二偵測訊號,並根據該第二偵測訊號與一致能訊號產生該第一偵測訊號;以及 一數位電路,在一修整期間根據該第二偵測訊號調整該些第一位元以決定該些第一位元的數值,並在一電壓偵測期間輸出該些第一位元並根據該第一偵測訊號選擇性地進行重置。 A voltage detection device comprises: A reference voltage selection circuit, which outputs a voltage corresponding to one of a plurality of first voltages as an input voltage according to a clock signal, a first detection signal, a reset signal and a plurality of first bits, wherein the first voltages are generated based on a power supply voltage; A reset signal generating circuit, which generates the reset signal according to the clock signal and a plurality of currents, wherein the currents are generated based on the power supply voltage; A voltage detector, which compares the input voltage with a reference voltage to generate a second detection signal, and generates the first detection signal according to the second detection signal and an enable signal; and A digital circuit adjusts the first bits according to the second detection signal during a trimming period to determine the values of the first bits, and outputs the first bits during a voltage detection period and selectively resets them according to the first detection signal. 如請求項1之電壓偵測裝置,其中該重置訊號產生電路包含: 一時脈旗標產生器,根據該時脈訊號與該些電流中的一第一電流產生一時脈旗標訊號; 一上電旗標產生器,根據該些電流中的一第二電流產生一上電旗標訊號;以及 一第一邏輯閘,根據該時脈旗標訊號與該上電旗標訊號產生該重置訊號。 The voltage detection device of claim 1, wherein the reset signal generating circuit comprises: a clock flag generator, generating a clock flag signal according to the clock signal and a first current among the currents; a power-on flag generator, generating a power-on flag signal according to a second current among the currents; and a first logic gate, generating the reset signal according to the clock flag signal and the power-on flag signal. 如請求項2之電壓偵測裝置,其中該時脈旗標產生器包含: 一延遲電路,延遲該時脈訊號以產生一第一訊號; 一第二邏輯閘,根據該時脈訊號及該第一訊號產生一切換訊號;以及 一切換式電容電路,根據該第一電流與該切換訊號調整一節點的位準,並根據該節點的位準產生該時脈旗標訊號。 The voltage detection device of claim 2, wherein the clock flag generator comprises: a delay circuit, delaying the clock signal to generate a first signal; a second logic gate, generating a switching signal according to the clock signal and the first signal; and a switching capacitor circuit, adjusting the level of a node according to the first current and the switching signal, and generating the clock flag signal according to the level of the node. 如請求項3之電壓偵測裝置,其中該切換式電容電路包含: 一電容,耦接該節點,並經由該第一電流充電以提高該節點的位準; 一開關,耦接於該節點與地之間,並根據該切換訊號選擇性導通,以降低該節點的位準;以及 一反相器,根據該節點的位準產生該時脈旗標訊號。 A voltage detection device as claimed in claim 3, wherein the switching capacitor circuit comprises: a capacitor coupled to the node and charged by the first current to increase the level of the node; a switch coupled between the node and ground and selectively turned on according to the switching signal to reduce the level of the node; and an inverter to generate the clock flag signal according to the level of the node. 如請求項2之電壓偵測裝置,其中該上電旗標產生器包含: 一電容,耦接一節點,並經由該第二電流充電以提高該節點的位準;以及 一緩衝器,根據該節點的位準產生該上電旗標訊號。 A voltage detection device as claimed in claim 2, wherein the power-on flag generator comprises: a capacitor coupled to a node and charged by the second current to increase the level of the node; and a buffer generating the power-on flag signal according to the level of the node. 如請求項1之電壓偵測裝置,其中該參考電壓選擇電路包含: 一觸發器,根據該時脈訊號與該第一偵測訊號產生一觸發訊號; 複數個正反器,根據該觸發訊號將該些第一位元分別輸出為複數個第二位元,並根據該重置訊號重置該些第二位元; 一第一多工器,根據該些第二位元中的一部分位元自該些第一電壓中選出該對應電壓;以及 一第二多工器,根據該些第二位元中的一剩餘位元輸出該對應電壓或一預設電壓為該輸入電壓。 The voltage detection device of claim 1, wherein the reference voltage selection circuit comprises: a trigger, generating a trigger signal according to the clock signal and the first detection signal; a plurality of flip-flops, outputting the first bits as a plurality of second bits according to the trigger signal, and resetting the second bits according to the reset signal; a first multiplexer, selecting the corresponding voltage from the first voltages according to a portion of the second bits; and a second multiplexer, outputting the corresponding voltage or a preset voltage as the input voltage according to a remaining bit of the second bits. 如請求項6之電壓偵測裝置,其中該觸發器包含: 一邏輯閘,根據該時脈訊號與該第一偵測訊號產生一第一訊號;以及 一反相器,根據該第一訊號產生該觸發訊號。 A voltage detection device as claimed in claim 6, wherein the trigger comprises: a logic gate, generating a first signal according to the clock signal and the first detection signal; and an inverter, generating the trigger signal according to the first signal. 如請求項1之電壓偵測裝置,其中該致能訊號在該修整期間具有一第一邏輯值,且該電壓偵測器在該修整期間響應該致能訊號產生具有該第一邏輯值的該第一偵測訊號,以避免該數位電路在該修整期間進行重置。A voltage detection device as claimed in claim 1, wherein the enable signal has a first logic value during the trimming period, and the voltage detector generates the first detection signal having the first logic value in response to the enable signal during the trimming period to prevent the digital circuit from being reset during the trimming period. 如請求項8之電壓偵測裝置,其中該致能訊號在該電壓偵測期間具有不同於該第一邏輯值的一第二邏輯值,且該電壓偵測器在該電壓偵測期間響應該致能訊號將該第二偵測訊號輸出為該第一偵測訊號。A voltage detection device as claimed in claim 8, wherein the enable signal has a second logical value different from the first logical value during the voltage detection period, and the voltage detector outputs the second detection signal as the first detection signal in response to the enable signal during the voltage detection period. 如請求項1之電壓偵測裝置,其中該電壓偵測器包含: 一比較器,比較該輸入電壓與該參考電壓,以產生該第二偵測訊號;以及 一邏輯閘,根據該第二偵測訊號與該致能訊號產生該第一偵測訊號。 A voltage detection device as claimed in claim 1, wherein the voltage detector comprises: a comparator, comparing the input voltage with the reference voltage to generate the second detection signal; and a logic gate, generating the first detection signal according to the second detection signal and the enable signal. 如請求項1之電壓偵測裝置,其中該數位電路在該修整期間根據該第二偵測訊號執行一二元搜索演算法,以決定該些第一位元的數值。A voltage detection device as claimed in claim 1, wherein the digital circuit executes a binary search algorithm according to the second detection signal during the trimming period to determine the values of the first bits. 一種電壓偵測方法,包含: 根據一時脈訊號、一第一偵測訊號、一重置訊號與複數個第一位元將複數個第一電壓中之一對應電壓輸出為一輸入電壓,其中該些第一電壓是基於一電源電壓產生; 根據該時脈訊號以及複數個電流產生該重置訊號,其中該些電流是基於該電源電壓產生; 比較該輸入電壓與一參考電壓以產生一第二偵測訊號,並根據該第二偵測訊號與一致能訊號產生該第一偵測訊號;以及 藉由一數位電路在一修整期間根據該第二偵測訊號調整該些第一位元以決定該些第一位元的數值,並在一電壓偵測期間輸出該些第一位元並根據該第一偵測訊號選擇性地進行重置。 A voltage detection method, comprising: Outputting a voltage corresponding to one of a plurality of first voltages as an input voltage according to a clock signal, a first detection signal, a reset signal and a plurality of first bits, wherein the first voltages are generated based on a power supply voltage; Generating the reset signal according to the clock signal and a plurality of currents, wherein the currents are generated based on the power supply voltage; Comparing the input voltage with a reference voltage to generate a second detection signal, and generating the first detection signal according to the second detection signal and an enable signal; and A digital circuit adjusts the first bits according to the second detection signal during a trimming period to determine the values of the first bits, and outputs the first bits during a voltage detection period and selectively resets them according to the first detection signal.
TW112115634A 2023-04-26 2023-04-26 Voltage detector device having trimming mechanism and voltage detection method TWI855654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW112115634A TWI855654B (en) 2023-04-26 2023-04-26 Voltage detector device having trimming mechanism and voltage detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW112115634A TWI855654B (en) 2023-04-26 2023-04-26 Voltage detector device having trimming mechanism and voltage detection method

Publications (2)

Publication Number Publication Date
TWI855654B true TWI855654B (en) 2024-09-11
TW202443161A TW202443161A (en) 2024-11-01

Family

ID=93649051

Family Applications (1)

Application Number Title Priority Date Filing Date
TW112115634A TWI855654B (en) 2023-04-26 2023-04-26 Voltage detector device having trimming mechanism and voltage detection method

Country Status (1)

Country Link
TW (1) TWI855654B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9143027B2 (en) * 2007-03-12 2015-09-22 Luciano Processing L.L.C. Intelligent power supervisor
TWI665552B (en) * 2018-08-01 2019-07-11 華邦電子股份有限公司 Circuit for recovering from power loss and electronic device using the same circuit and method thereof
US20200018782A1 (en) * 2018-07-12 2020-01-16 Texas Instruments Incorporated Voltage sensing circuit
TW202202973A (en) * 2020-07-02 2022-01-16 華邦電子股份有限公司 Power down detection circuit and semiconductor memory device
CN115541982A (en) * 2022-11-01 2022-12-30 星宸科技股份有限公司 Voltage detection device and method for preventing system failure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9143027B2 (en) * 2007-03-12 2015-09-22 Luciano Processing L.L.C. Intelligent power supervisor
US20200018782A1 (en) * 2018-07-12 2020-01-16 Texas Instruments Incorporated Voltage sensing circuit
TWI665552B (en) * 2018-08-01 2019-07-11 華邦電子股份有限公司 Circuit for recovering from power loss and electronic device using the same circuit and method thereof
TW202202973A (en) * 2020-07-02 2022-01-16 華邦電子股份有限公司 Power down detection circuit and semiconductor memory device
CN115541982A (en) * 2022-11-01 2022-12-30 星宸科技股份有限公司 Voltage detection device and method for preventing system failure

Also Published As

Publication number Publication date
TW202443161A (en) 2024-11-01

Similar Documents

Publication Publication Date Title
US7583553B2 (en) Semiconductor memory and refresh cycle control method
US7724051B2 (en) DLL circuit, semiconductor device using the same, and method for controlling DLL circuit
US20110095811A1 (en) Substrate bias control circuit for system on chip
US7233213B2 (en) Oscillator of semiconductor device
US20090058483A1 (en) Duty cycle correcting circuit and method
JPH1188071A (en) Offset voltage correcting circuit
JP2009188016A (en) Semiconductor device
JP2008079274A (en) Frequency comparator, frequency synthesizer, and associated method
WO2018057137A1 (en) Apparatus of offset voltage adjustment in input buffer
US12341497B2 (en) Power multiplexer
TWI855654B (en) Voltage detector device having trimming mechanism and voltage detection method
US20020017926A1 (en) Frequency determination circuit for a data processing unit
US8120393B2 (en) Semiconductor memory apparatus
US10684314B2 (en) System and method for testing reference voltage circuit
US6456129B1 (en) Internal clock signal generator
US20240361365A1 (en) Power detector device and power detection method
US20220209751A1 (en) Duty cycle detection circuit and duty cycle correction circuit including the same
US20240353452A1 (en) Voltage detector device having trimming mechanism and voltage detection method
US20110285419A1 (en) Semiconductor integrated circuit for generating clock signals
WO2004057449A2 (en) Power supply level monitoring and reset generation
JP2002015599A (en) Semiconductor memory
JP5262981B2 (en) Latch device and latch method
US5847584A (en) Threshold detecting device
TWI766765B (en) Clock generator device and clock generation method
JPH08274607A (en) Power voltage monitoring circuit for cpu