TW200830094A - Micro controller circuit and power saving method thereof - Google Patents
Micro controller circuit and power saving method thereof Download PDFInfo
- Publication number
- TW200830094A TW200830094A TW96100981A TW96100981A TW200830094A TW 200830094 A TW200830094 A TW 200830094A TW 96100981 A TW96100981 A TW 96100981A TW 96100981 A TW96100981 A TW 96100981A TW 200830094 A TW200830094 A TW 200830094A
- Authority
- TW
- Taiwan
- Prior art keywords
- power
- mode
- microcontroller
- clock signal
- power saving
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 35
- 230000002093 peripheral effect Effects 0.000 claims abstract description 70
- 238000012545 processing Methods 0.000 claims abstract description 32
- 239000013078 crystal Substances 0.000 claims description 6
- 239000000463 material Substances 0.000 claims 1
- 230000003068 static effect Effects 0.000 claims 1
- 230000002618 waking effect Effects 0.000 claims 1
- 230000005540 biological transmission Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 7
- 206010011469 Crying Diseases 0.000 description 2
- 241000270666 Testudines Species 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 241000283973 Oryctolagus cuniculus Species 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000465 moulding Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Microcomputers (AREA)
- Power Sources (AREA)
Abstract
Description
200830094 九、發明說明: 【發明所屬之技術領域】 本發明係有關於一種微控制器電路及其省電方法,特 別有關於管理分配微控制器内時鐘訊號之電路及其方法。 【先前技術】 -般微控制器之電源管理機制,不外乎係控制系統時 鐘之速度,以達到節省電流的目的。如美國公開號 US2〇03/(K)79152之「具多重低功率模式的微處理器和用於 f 該微處理器的模擬裝置」,係揭露有關利用時鐘訊號之選 擇,而達成控制微控制器功率消耗的技術。 請參閱第-圖習知微處理器電路方塊圖。如圖所示, 選擇單元150包括四㈣擇輸人端,其中之—輸入係接收 除法器⑽之輸出151,另一輸人152係直接與地輛合, 再另-輸入係接收震盪器190產生之主系統時鐘153,最 後一輸入端係接收内部RC震盪器17〇產生之輸 154。而選擇單兀160同樣的包括四個選擇輸入端,盆中^ —輸人係接收除法器⑽之輸出151,另—輸人155、係直200830094 IX. Description of the Invention: [Technical Field] The present invention relates to a microcontroller circuit and a power saving method thereof, and particularly to a circuit for managing a clock signal in a distributed microcontroller and a method thereof. [Prior Art] - The power management mechanism of a general-purpose microcontroller is nothing more than controlling the speed of the system clock to save current. For example, US Patent Publication No. US 2 〇 03/(K) 79152, "Microprocessor with Multiple Low-Power Modes and Analog Devices for the Microprocessor", discloses the use of clock signals to achieve control micro-control The technology of power consumption. Please refer to the block diagram of the conventional microprocessor circuit. As shown, the selection unit 150 includes four (four) selection inputs, wherein the input system receives the output 151 of the divider (10), the other input 152 is directly coupled to the ground, and the other input system receives the oscillator 190. The main system clock 153 is generated, and the last input receives the input 154 generated by the internal RC oscillator 17 . The selection unit 160 also includes four selection inputs, and the input unit 151 receives the output 151 of the divider (10), and the other input 155 is straight.
接與地耦合,再另一輸入係接收震盪器19〇產生之主系統 時鐘153,最後-輸入端係接收内部R 之輸出訊號154。其中除法器刚之輪出15]^由一^ 率震盧器單元191產生其他時鐘訊號再饋人除法器18〇, 經除法器180將時鐘訊號處理後輸出至選擇單元15〇及選 擇單元160。中央處理單$ 100搭配各種低功率模式之運 作,利用執行單Α 101控制選擇單元15〇及選擇單元16〇, 使選擇單元15〇及選擇單元160挑選四種輸入時鐘其中一 種時鐘訊號,再將所選的時鐘訊號分別派送至中央處理單 6 200830094 元100及周邊單元120,130。 所以US2〇03/0079152 —案中,其中央處理單元i〇〇 及周邊單元120,130所需之時鐘訊號,係分別利用兩個選 擇單元150,160,個別於四種時鐘訊號中擇一時鐘訊號饋入 之。藉此於不同工作模式下,選擇相對應之時鐘訊號來提 供中央處理單元100及周邊單元12〇, 130工作,以控制微 控制器功率的消耗。 【發明内容】Connected to ground, the other input receives the main system clock 153 generated by the oscillator 19, and the last-input receives the output signal 154 of the internal R. The divider is just 15], and the other clock signal is generated by the voltage detector unit 191, and the divider 16 is processed. The clock signal is processed by the divider 180 and output to the selection unit 15 and the selection unit 160. . The central processing unit operates with a variety of low-power modes, and uses the execution unit 101 to control the selection unit 15 and the selection unit 16 to cause the selection unit 15 and the selection unit 160 to select one of the four input clocks, and then The selected clock signals are sent to the central processing unit 6 200830094 yuan 100 and the peripheral units 120, 130 respectively. Therefore, in US2〇03/0079152, the clock signals required by the central processing unit i〇〇 and the peripheral units 120, 130 are respectively selected by two selection units 150, 160, and one of the four clock signals. The signal is fed into it. Thereby, in different working modes, the corresponding clock signal is selected to provide the central processing unit 100 and the peripheral units 12, 130 to control the power consumption of the microcontroller. [Summary of the Invention]
而本發明係提供一種微控制器電路及其省電方法,利 用低功率省電模式中各模式的切換,配合省電開關之控 制,以控制供給中央處理單元及各周邊單元的時鐘訊號, 達成節能之功效。 ^本發明係提供一種微控制器,包括一預除器,係接收 二第一時鐘訊號,並將該第一時鐘訊號除頻後輸出複數個 第二日守釦吼號,一第二多工器,係接收一第三時鐘訊號、 該第一時鐘訊號及該些第二時鐘訊號,輸出一第四時鐘訊 =,一中央處理單元,係接收該第四時鐘訊號;一第一省 龟開關,係e又於该中央處理單元與該第二多工器間,其中 该昂四時鐘訊號係經過該第—省f _傳輸至該中央處理 ,元;一第二省電開關;一第一周邊單元,係經由該第二 ^電開關,收該第三時鐘訊號;及—執行單元,係設於該 #、处里單元内,根據该微控制器所工作的一低功率省電 模式控制该第一省電開關及該第二省電開關。 本,明再提供-種微控制器省電方法,步驟包括首先 一第一時鐘訊號及一第三時鐘訊號。接著將第一時鐘 汛〜除頻後輸出複數個第二時鐘訊號。接著設定一低功率 7 200830094 ^式暫存器以選擇—低功率省電模式。錢控制 開啟或關閉該第一時鐘訊號、該些第二時鐘訊 现/、中之一或該第三時鐘訊號輸入到該微控制器甲之一中 以及控制—第二省電開關,以開^或關閉該 弟—日守知矾號輸入到一第一周邊單元。 為了能更進-步瞭解本發明為達成預定目的所採取之 技術、手段及功效,請參閱以下有關本發明之詳細說明與 附圖,相信本發明之目的、特徵與特點,當可由此得一深 入且具體之瞭解,然而所_式僅提供參考與說明用,並 非用來對本發明加以限制者。 【實施方式】 攸節省彳政控制器之耗電,一般之方法係為管控微控制 ,内部^央處理單元及周邊單^之時鐘訊號。而本發明係 &i、較佳的管控及分配時鐘訊號之機制,以節省微控制 器之耗電。 請苓閱第二圖本發明微控制器電路較佳實施例之電路 方塊圖。如圖所示,首先由晶體震盪器71、RC震盪器π 及即時時間時鐘80(Real time clock, RTC)提供第一時鐘訊 號fM及第三時鐘訊號fRTC。其中第一時鐘訊號心係為將 曰曰體晨盪裔71及RC震盪器72之外部時鐘訊號傳送至第 一多工器10,再藉由控制第一多工器而選擇其中一時 鐘訊號而產生。然後第一多工器1〇將輸出之第一時鐘訊號 fM傳送至第二多工器11及預除器20。而預除器20接收第 一時鐘訊號心後,便將第一時鐘訊號fM除出複數個第二 時鐘訊號(fM/2、fM/4、fM/8、fM/16、fM/32、fM/64),並將 該些第二時鐘訊號(fM/2、fM/4、fM/8、fM/16、fM/32、fM/⑷ 200830094 輸t至第二/工,11。第二多工器π除了接收第-時鐘 υΜ及5玄些弟—時鐘訊號(fM/2、〜/4、&/8、〜/16、 fM/32、fM/64)外,亦接收了即時時間 三:夺細―。因此第二多工器η共有八個輸入端= ^所以第二多工器11可藉由—暫存器90之 ft,(?〇、C1、⑵來選擇-個時鐘訊號,而輸 =四時鐘喊fsYS(本實施例第二多工器11為八個輸The present invention provides a microcontroller circuit and a power saving method thereof, which utilizes the switching of each mode in the low power power saving mode, and the control of the power saving switch to control the clock signal supplied to the central processing unit and each peripheral unit to achieve The effect of energy saving. The present invention provides a microcontroller, including a pre-processor, which receives two first clock signals, and divides the first clock signal to output a plurality of second-day shackles, a second multiplex Receiving a third clock signal, the first clock signal and the second clock signals, outputting a fourth clock signal =, a central processing unit receiving the fourth clock signal; a first provincial turtle switch The e is further between the central processing unit and the second multiplexer, wherein the ang four clock signal is transmitted to the central processing via the first province f _, a second power saving switch; The peripheral unit receives the third clock signal via the second electrical switch; and the execution unit is disposed in the #, the internal unit, and is controlled according to a low power power saving mode of the microcontroller The first power saving switch and the second power saving switch. The present invention provides a power saving method for the microcontroller, and the steps include first a first clock signal and a third clock signal. Then, the first clock 汛~divide and output a plurality of second clock signals. Then set a low power 7 200830094 ^ type register to select - low power saving mode. The money control turns on or off the first clock signal, one of the second clock signals, or one of the third clock signals is input into one of the microcontrollers A and the control-second power-saving switch is turned on ^ Or close the brother - the Japanese Guardian nickname is input to a first peripheral unit. In order to further understand the techniques, means, and effects of the present invention in order to achieve the intended purpose, refer to the following detailed description of the invention and the accompanying drawings. In-depth and specific understanding is provided by way of example only, and is not intended to limit the invention. [Embodiment] The power consumption of the 控制器 控制器 controller is saved. The general method is to control the micro-control, the internal processing unit and the surrounding clock signal. The present invention is a mechanism for controlling and distributing clock signals to save power consumption of the micro controller. Please refer to the second block diagram of a circuit diagram of a preferred embodiment of the microcontroller circuit of the present invention. As shown in the figure, the first clock signal fM and the third clock signal fRTC are first provided by the crystal oscillator 71, the RC oscillator π, and the Real Time Clock (RTC). The first clock signal is to transmit the external clock signal of the corpuscles 71 and the RC oscillator 72 to the first multiplexer 10, and then select one of the clock signals by controlling the first multiplexer. produce. The first multiplexer 1 then transmits the output first clock signal fM to the second multiplexer 11 and the pre-processor 20. After receiving the first clock signal, the pre-processor 20 divides the first clock signal fM by a plurality of second clock signals (fM/2, fM/4, fM/8, fM/16, fM/32, fM /64), and the second clock signal (fM/2, fM/4, fM/8, fM/16, fM/32, fM/(4) 200830094 is lost to the second/worker, 11. The second most In addition to receiving the first clock and the five clocks (fM/2, ~/4, & /8, ~/16, fM/32, fM/64), the device π also receives the instant time. Three: shredding - so the second multiplexer η has eight inputs = ^ so the second multiplexer 11 can select - clock by the ft of the register 90 (??, C1, (2) Signal, and lose = four clocks shouting fsYS (the second multiplexer 11 in this embodiment is eight loses
i „:所以暫存器90利用三位元選擇之。實際應用視第 11之輸人數可選擇暫存器⑽所需之位元數)。而 :一予裔90之選擇控制位S (CG、C1、C2)係由中央處理 ΐ兀1〇中,一執行單元41根據低功率省電模式來設定, 藉以幸别出第四時鐘訊號fsYS供應中央處理單元40及第二 周邊單元52。 一 一 ^再者,於中央處理單元40與第二多工器11間係設有 弟省電開關31,而第二周邊單元52與第二多工器11 ^ Ϊ叹有一第二省電開關33。而第一省電開關31係由執 灯早兀/I根據低功率省電模式來控制,第三省電開關% 係2執仃單元41根據低功率省電模式及第二周邊單元52 2二之開關控制位元來控制,進而管控第四時鐘訊號fSYS 傳輸至1央處理單元40及第二周邊單元52。而上述之第 了周邊,το 52所設之開關控制位元,係為表示第二周邊單 是否於工作中之位元。其中第二周邊單元52,係可 ^元4數也類比轉換器或一脈衝寬度調變器。有關於執行 41根據低功率省電模式執行控制及設定之說明,將於 稍後再敘述。 接著即時時間時鐘80所提供之第三時鐘訊號除 9 200830094 傳輸至第二多工器11之外,亦傳輸至其他周邊單元。如 二示,第三時鐘訊號fRTC經過第二省電開關32及第— 器61—輪入至第一周邊單元51,另外也經過第四省電^關' =及第二除頻器62輸入至第三周邊單元53。其中第:小 龟,關32係由執行單元41根據低功率省電模式及第一 ^ 邊單元51之一開關控制位元來控制,而第四省電開關料 係,執行單元41根據低功率省電模式來控制。同理,上述 之=一周邊單元51所設之開關控制位元,係為表示第 ( 邊單元51是否於工作中之位元。另外,第-除頻器61係 用於將第三時鐘訊號fRTc除出第一周邊單元51工作所卷 之時鐘訊號,再傳送給第一周邊單元51。同樣的,第二^ 頻器62係用於將第三時鐘訊號fRTc除出第三周邊單元^ 工作所需之時鐘訊號,再傳送給第三周邊單元53。而上述 之第一周邊單元51係可為液晶顯示器、(Uquid Cry二i „: Therefore, the register 90 is selected by three bits. The actual application depends on the number of people in the 11th to select the number of bits required for the register (10). And: the selection control position S of a patriarch 90 (CG) , C1, C2) are centrally processed, and an execution unit 41 is set according to the low power saving mode, so that the fourth clock signal fsYS is fortunately supplied to the central processing unit 40 and the second peripheral unit 52. Further, a power saving switch 31 is disposed between the central processing unit 40 and the second multiplexer 11, and the second peripheral unit 52 and the second multiplexer 11^ sigh a second power saving switch 33. The first power-saving switch 31 is controlled by the light-saving switch/I according to the low-power power-saving mode, and the third power-saving switch 2 is configured according to the low-power power-saving mode and the second peripheral unit 52 2 The switch control bit of the second control unit controls the fourth clock signal fSYS to be transmitted to the central processing unit 40 and the second peripheral unit 52. The above-mentioned peripheral periphery, the switch control bit set by το 52 is represented by Whether the second peripheral list is a bit in the work, wherein the second peripheral unit 52 is capable of 4 yuan Also analog converter or a pulse width modulator. There are instructions for performing 41 control and setting according to the low power power saving mode, which will be described later. Then the third clock signal provided by the instant time clock 80 is divided by 9. 200830094 is transmitted to the other peripheral unit in addition to the second multiplexer 11. As shown in the second, the third clock signal fRTC passes through the second power-saving switch 32 and the first unit 61 to the first peripheral unit 51. In addition, the fourth power saving unit and the second frequency divider 62 are input to the third peripheral unit 53. The first: the small turtle, the closed 32 is executed by the executing unit 41 according to the low power saving mode and the first side One of the units 51 is controlled by a switch control bit, and the fourth power-saving switch system is controlled by the execution unit 41 according to the low-power power-saving mode. Similarly, the above-mentioned switch control bit set by the peripheral unit 51, It is a bit indicating whether the first side unit 51 is in operation. In addition, the first frequency divider 61 is configured to divide the third clock signal fRTc by the clock signal of the first peripheral unit 51, and then transmit the clock signal to the first peripheral unit 51. First peripheral unit 51. Similarly, second ^ The frequency converter 62 is configured to divide the third clock signal fRTc from the clock signal required for the operation of the third peripheral unit to be transmitted to the third peripheral unit 53. The first peripheral unit 51 can be a liquid crystal display, Uquid Cry II
Display,LCD)等裝置,另第三周邊單元53係包括看門狗 單元(Watch Dog Timer, WDT)、即時時間時鐘中斷單元 (RTC interrupt)或蜂鳴器(Buzzer)等電路。 、 藉由上述之電路方塊圖之介紹,可看出中央處理單元 40及第二周邊單元52所需之時鐘訊號,係藉由執行單元 41设定及控制第二多工器丨丨、第一省電開關31及第三省 電開關33,以於複數個時鐘訊號中選擇較佳的時鐘訊號來 提供。而第一周邊單元51及第三周邊單元53所需之時鐘 訊號,係僅由即時時間時鐘8〇所提供之第三時鐘訊號fRTc 所提供。再藉由第二省電開關32及第四省電開關34之控 制:來決定是否提供第三時鐘訊號fRTc。以及利用第一除 頻器61以及第二除頻器62處理第三時鐘訊號,以提 10 200830094 ^適^之時鐘訊號給第一周邊單元51及第三周邊單元 4 可根據本發明電路架構之特徵,進-步設置省 =及除頻器,以應用至更多的周邊單元,而不限於本 貝轭例所述之該些周邊單元。 發明之低功率省電㈣係可藉由設定—低功 =柄存器(圖未示)來切換,包括_正常模式(N_al o—e)、— k速模式(sl〇w M〇de )、1 速模式( _如) 制夂(SleePMGde)° _各模式之工作特性,控 省電in遠二一省電開關3卜第二省電開關32、第三 % Λ弟四省電開關34係為供給__之開 二,開關係由執行單元41根據低功率細^ =)早制」^ —下以——㈣各省電«讀作原理。 弟-^^31狀於巾錢理單元4Q及第二多工 〇〇 正常模式或慢速模式時,中央處理單元40 =;=號—。所:當::二 於正吊核式输速模式時,其執行單^丨 =㈣_啟(⑽)之狀態‘時 處理單元4 G工作。而於休目· /央處理單元4 G ’供中央 處理單元4G關閉以節省耗模式時,係將中央 模式或怠速模式時,·其』二所以?控制器I作於休眠The display, LCD, and the like, and the third peripheral unit 53 include circuits such as a Watch Dog Timer (WDT), an RTC interrupt, or a Buzzer. The clock signal required by the central processing unit 40 and the second peripheral unit 52 can be seen by the execution unit 41, and the second multiplexer is configured and controlled by the execution unit 41. The power-saving switch 31 and the third power-saving switch 33 are provided for selecting a better clock signal among the plurality of clock signals. The clock signals required by the first peripheral unit 51 and the third peripheral unit 53 are only provided by the third clock signal fRTc provided by the instant time clock 8〇. The control of the second power-saving switch 32 and the fourth power-saving switch 34 is used to determine whether to provide the third clock signal fRTc. And processing the third clock signal by using the first frequency divider 61 and the second frequency divider 62 to provide a clock signal to the first peripheral unit 51 and the third peripheral unit 4 according to the circuit architecture of the present invention. Features, step-by-step settings, and frequency dividers are applied to more peripheral units, and are not limited to the peripheral units described in the present yoke example. The invention of low power saving (4) can be switched by setting - low power = handle (not shown), including _ normal mode (N_al o-e), - k speed mode (sl〇w M〇de) 1 speed mode ( _如) 夂 (SleePMGde) ° _ working characteristics of each mode, control power saving in far two power saving switch 3 ⁄ second power saving switch 32, third % Λ four power saving switch 34 It is the opening of the supply __, the open relationship is performed by the execution unit 41 according to the low power fine ^ =) early "^ - down - (4) the power saving «reading principle. The younger-^^31 is in the case of the towel management unit 4Q and the second multiplexer 正常 in the normal mode or the slow mode, the central processing unit 40 =; = number -. : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在 在When the central processing unit 4G is turned off and the central processing unit 4G is turned off to save the consumption mode, when the central mode or the idle mode is used, what is the second? Controller I is sleeping
控制於關閉(0FF)之狀態=41胃將弟一省電開關31 給中央處理單元40。’"、争止供應第四時鐘訊號fsYS 11 200830094 哭61之:開關32係設於即時時間時鐘80及第-除哼 口〇 61之間,而即時時間時鐘所弟除4The state in which the power-off switch 31 is controlled to be turned off (0FF) is supplied to the central processing unit 40. ‘", contend for the supply of the fourth clock signal fsYS 11 200830094 crying 61: switch 32 is set between the instant time clock 80 and the first - 哼 port 〇 61, and the instant time clock is divided into 4
係經過第二省電開關32 二^二日守鐘訊號W 輸至第-周邊單元5卜執*如61除頻後,傳 - 行單元41將押制镇-4、$ 滿足述之條件,則執 以L-二?電開關32於開啟(⑽)之狀能, r 61 j ^ 乐周遭爭70 5卜而判斯第一周邊 狀態,係利用第一周邊單元5丨之一 处於工作的 其開關控制位元係為可表示第 位70來判斷。 或非於工作狀態之位元=二=二於工作狀態 周邊單元51於非:狀;下 知匕制第—省電關32於關(qFF)之狀態 供第三時鐘訊號fRTC給第—周邊單元51。心 τ止提 第二省電開關33係設於第二周邊單元5 _夕 器11之間。執行單元41控制第三省電開 之判斷條件為難彻於正傾式或慢麵式^啟(f一) 周邊單元52於工作的狀態下。而當滿足上述之 = 早元41便將第三省電開關3 3控制於開啟(〇⑴執匕仃 使第四時鐘訊號fSYS傳輸至第二周邊單元&,,悲, 邊單元52工作。另外’若微控制器於休眠模式、:::: ,第二周邊單το 52於非卫作的狀態下,執行單元〇便^ 乐二省電開關33控制於關閉(〇FF)之狀能,以 、 :四時鐘訊號fSYS至第二周邊單元52。其;判斷 單π 52之工作狀態’係同上述之原理,利用第二周邊 12 200830094 第二- 頻器:之7,電而=4±係,時時間時鐘8。及第二除 fRTC係經過第四省電8°所提供之第三時鐘訊號 傳輸至第4邊單^關第,頻器62除頻後, 1,] 狀態’以將第三時鐘 4 "工制於開啟(Ο N)之 Γ ν 供給給第二周邊單/^ 第二除_ 62除頻後, 四省電開關34將二皮執二右微,制器於休眠狀態,則第 狀態,而停止提^—tr控制於關(0FF)之 接著請^第二鐘訊射咖給第三周邊單元53。 圖,以-難實_;^2;^功料電模式狀態 元之設定來作切換 I」式^ 重置訊號及転體位 係包括-正常H 所:,本發明之低功率省電模式 式。而各模式間:切換式、一怠速模式及-休眠模 -低功率模式暫存由低,省電模式之指令設定 切換各低功率省計+4、仃’ n、為設定㈣位元來 制位元Si,以於正微控制器係藉由設定第—拿刀體控 式及正常模柄,:3與慢賴式間作切換。於慢速模 控制位元⑽、C1 37041 ?設定暫存器9G之選擇 二時鐘訊號(fM/2、f以於第—時鐘訊號fM、讀些第 第三時鐘訊號w中M VfM/8、fM/16、W32〜 工器11輸出—第四時上遠擇一個時鐘訊號,而使第二多 (CO、Cl、C2 )之< =成唬fsYS。所以藉由選擇控制位元 時鐘訊號fM、軌決定第四時鐘訊號fsYS為第- 〜弟一¥鐘訊號(fM/2、fM/4、fM/8、&/16、 13 200830094 fM/32、fM/64)其中之—或第三時鐘訊號fRTC。 - 慢速模式時,係_ C1:⑵:例如將選擇控 ⑵設定為•則第=i,t擇控制位元 f m㈣Λ 孔號fsYs係為第三時鐘訊號 “寻,推。猎此以使中央處理單元4〇及第二周邊單 兀52工作於較適合之速度 ,卜 r 制器於慢速模式切換於正常^ '之^耗。而當微控 位元Sl設定為!,且使,係可將第-韌體控制 號fSYS為第-時鐘訊號心:! 11 士輸出之第四時鐘訊 為第-時鐘訊號fM)便:由ΐ者!:時鐘鳴一 ,,.m 干几4U及乐一周邊早兀52,以供 中央處理早το 4G及第二周邊單元52工作。 鍾而/^模式與休眠模相及正常模式與怠速模式間的 ,換’係^狀第4體控制位仏與—暫停指令(触 f:1 )’及利用一喚醒訊號來轉換。例如將第二韌體 控制位兀S2設定為0與輪入Halt Command,則微控制器 ^於正常模式切換為休眠模式。*於休眠模式·喚醒訊 k W=keup),便使微控制器於休眠模式返回正常模式。 而將第二韌體控制位元S2設定& !與輸入HaltAfter passing through the second power-saving switch 32, the second-two-day clock signal W is transmitted to the first-peripheral unit 5, and after the frequency-removal, such as 61, the transmission-line unit 41 will hold the town-4, and the price is satisfied. Then hold L-two? The electric switch 32 is in the state of being turned on ((10)), and r 61 j ^ is in the first peripheral state of the game, and is the switch control bit system in which one of the first peripheral units 5 is in operation. It can be judged by the representation of the 70th. Or the non-operating state bit = two = two in the working state, the peripheral unit 51 is in the non-form; the lower-known system--the power-saving switch 32 is in the state of the closed (qFF) for the third clock signal fRTC to the first periphery Unit 51. The second power saving switch 33 is disposed between the second peripheral unit 5 and the eleventh unit 11. The execution unit 41 controls the third power saving to be judged to be in a state in which the peripheral unit 52 is in a working state in which the forward unit or the slow surface is turned on. When the above-mentioned = early element 41 is satisfied, the third power-saving switch 3 3 is controlled to be turned on (〇(1) is executed to transmit the fourth clock signal fSYS to the second peripheral unit & sorrow, the side unit 52 operates. In addition, if the microcontroller is in the sleep mode, :::::, the second peripheral single το 52 is in the non-defense state, the execution unit 〇 ^ 乐 2 power-saving switch 33 is controlled to be turned off (〇 FF) , to: four clock signal fSYS to the second peripheral unit 52. It; determine the working state of the single π 52 'is the same as the above principle, using the second perimeter 12 200830094 second frequency: 7; electricity = 4 ± system, time clock 8 and second fRTC are transmitted through the fourth power saving 8° to provide the third clock signal to the 4th side, the frequency is cleared by the frequency 62, 1,] state ' After the third clock 4 " system is turned on (Ο N) Γ ν is supplied to the second peripheral unit / ^ second division _ 62 frequency division, the four power-saving switches 34 will be two skins and two right When the device is in the sleep state, the state is stopped, and the control is stopped, and the control is turned off (0FF), then the second message is sent to the third peripheral unit 53. In the case of - difficult to implement _; ^ 2; ^ power mode state element set to switch I" ^ reset signal and body position system includes - normal H:, the low power power saving mode of the present invention. And between the modes: switching mode, an idle mode and - sleep mode - low power mode temporary storage by low, power saving mode command setting switching each low power saving +4, 仃 'n, for setting (four) bits Bit Si, for the positive microcontroller, by setting the first-handle body control type and normal mold handle, :3 and slow-laid mode switching. In the slow mode control bit (10), C1 37041 ? The second clock signal is selected by the memory 9G (fM/2, f for the first clock signal fM, the third clock signal w for the M VfM/8, fM/16, W32~ the output of the device 11 - the fourth time Select a clock signal on the far side, and make the second multi (CO, Cl, C2) <= into 唬fsYS. Therefore, by selecting the control bit clock signal fM, the track determines the fourth clock signal fsYS as the first - One of the clock signals (fM/2, fM/4, fM/8, & /16, 13 200830094 fM/32, fM/64) among them - or the third clock signal fRTC. - In slow mode, the system _ C1: (2): For example, the selection control (2) is set to • then the = i, t is the control bit f m (four) Λ the hole number fsYs is the third clock signal "see, push. Hunting so that the central processing unit 4 and the second peripheral unit 52 Working at a more suitable speed, the switch is switched to the normal mode in the slow mode. When the micro-control bit S1 is set to !, and the system-controllable number fSYS is the first - Clock signal heart:! The fourth clock output of the 11th is the first clock signal fM): by the singer!: The clock sings one, the .m is a few 4U and the music is around 52, for the central processing early το 4G and the second Peripheral unit 52 operates. Between the clock mode and the sleep mode, and between the normal mode and the idle mode, the '4' body control position and the - pause command (touch f: 1 )' are used and the wake-up signal is used for conversion. For example, if the second firmware control bit 兀S2 is set to 0 and the Halt Command is turned on, the microcontroller ^ switches to the sleep mode in the normal mode. * In sleep mode, wake-up message k W = keup), the microcontroller returns to normal mode in sleep mode. And the second firmware control bit S2 is set & ! with the input Halt
Command ’則#控制n將於正常模式切換為怠速模式。而 速模式顧謹訊號(施哪),便使微控制器於急 速模式返回正常模式。 同理’ 速权式與休眠模式間及慢速模式與怠速模式 間的轉換,亦藉由*定第二㈣控制位元%與一暫停指 14 200830094 令(Halt Command),及利用—喚醒訊號來轉換。例如 第二韋刃體控制位元S2設定為〇與輸人_ c_and 微控制器將於慢速模式切換為休眠模式。而於休眠模式利 用喚醒訊號(Wakeup),便使微控㈣於休眠模式返 $模式。u,體控制位元S2設定為1與輸入‘ Command,職㈣器將於慢賴式切換為怠速模式。而 式利用喚醒訊號(Wakeup),便 制 速模式返回慢速模式。 心 四圖係為微控制器省電方法步 :ΐ;;Γ 述本發明省電方法之步驟流程。首先传 由晶體震盪器71或1^震盪哭7 ± 自无係 而即時時間時鐘80提供第三;鐘二弟- 〜’ 器20將第一時鐘鮮f广ψ t Γ T 利用預除 W4 ^ fM/S , fM/16 , ;;;: ' 輸到第二多工器u f M ),亚將该些時鐘訊號傳 低功率省電模;之才匕人口了驟_ )。接著微控制器藉由 式、慢速模式、A速模制位元S2,以選擇正常模 然後中央處理單休眠模式(如圖步驟剛)。 示及周邊單S之開關控制/早7^便根據低功率省電模 步驟S405)。最播φ血:1南疋’來控制各省電開關(如圖 來工作,μ省耗電(如所提供之時鐘訊號 准’以上所述,僅兔 說明與圖式,惟t ”、、本务明較佳的具體實施例之詳細 制本發明,^Γ μ徵並不侷限於此 ,並非用以限 χ所有範圍應以下述之申請專利範圍為 200830094 準,凡合於本發明申請專利範圍之精神與其類似變化之實 施例,皆應包含於本發明之範疇中,任何熟悉該項技藝者 在本發明之領域内,可輕易思及之變化或修飾皆可涵蓋在 以下本案之專利範圍。 【圖式簡單說明】 第一圖係為習知微處理器電路方塊圖; 第二圖係為本發明微控制器電路較佳實施例之電路方 塊圖; , 第三圖係為係為本發明低功率省電模式狀態圖;及Command ’# control n will switch to normal mode in normal mode. The speed mode Gu Xun signal (Shih) causes the microcontroller to return to normal mode in the rapid mode. Similarly, the conversion between the speed mode and the sleep mode and the slow mode and the idle mode is also determined by the second (four) control bit % and a pause finger 14 200830094 (Halt Command), and the utilization - wake-up signal To convert. For example, the second Wei blade control bit S2 is set to 〇 and input _ c_and the microcontroller will switch from the slow mode to the sleep mode. In the sleep mode, the wake-up signal (Wakeup) is used to make the micro-control (4) return to the $ mode in the sleep mode. u, the body control bit S2 is set to 1 and the input ‘Command, the job (four) device will switch to the idle mode. When the wake-up signal (Wakeup) is used, the speed mode returns to the slow mode. The four diagrams of the system are power saving method steps of the microcontroller: ΐ;; The step flow of the power saving method of the present invention. First pass by the crystal oscillator 71 or 1^ oscillating crying 7 ± since no time and the instant time clock 80 is provided third; the clock two brothers - ~ ' 20 will be the first clock fresh f ψ t Γ T use pre-division W4 ^ fM / S, fM/16, ;;;: 'transfer to the second multiplexer uf M), the sub-clock signal passed the low-power power-saving mode; Then the microcontroller uses the mode, slow mode, and A-speed molding bit S2 to select the normal mode and then centrally process the single sleep mode (as shown in the figure). The switching control of the peripheral and single S is performed according to the low power saving mode (S405). The most broadcast φ blood: 1 Nanxun 'to control each power-saving switch (as shown in the figure, μ province power consumption (if the clock signal provided is accurate, above, only the rabbit description and schema, but t ”, DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT The present invention is not limited thereto, and is not intended to limit the scope of the application. The following patent application scope is 200830094, which is incorporated herein by reference. The spirit of the present invention and its similar variations are intended to be included in the scope of the present invention. Any variation or modification that can be easily conceived in the field of the invention can be covered by the following patents. BRIEF DESCRIPTION OF THE DRAWINGS The first figure is a block diagram of a conventional microprocessor circuit; the second figure is a circuit block diagram of a preferred embodiment of the microcontroller circuit of the present invention; Low power saving mode state diagram; and
I 第四圖係為微控制器省電方法步驟流程圖。 【主要元件符號說明】 [習知] 中央處理單元100 執行單元101 周邊單元120、130 選擇單元150,160 ; 主系統時鐘153 内部RC震盪器170 除法器180 震盪器190 低功率震盪器單元191 [本發明] 第一多工器10 第二多工器11 16 200830094 預除器20 第一省電開關31 第二省電開關32 第三省電開關33 第四省電開關34 中央處理單元40 執行單元41 第一周邊單元51 第二周邊單元52 第三周邊單元53 第一除頻器61 第二除頻器62 晶體震盪器71 RC震盪器72 即時時間時鐘80 暫存器90 選擇控制位元(C2、Q、CG)I The fourth figure is a flow chart of the steps of the power saving method of the microcontroller. [Main component symbol description] [Generally known] Central processing unit 100 Execution unit 101 Peripheral unit 120, 130 Selection unit 150, 160; Main system clock 153 Internal RC oscillator 170 Divider 180 Oscillator 190 Low power oscillator unit 191 [ The present invention] The first multiplexer 10 The second multiplexer 11 16 200830094 Pre-processor 20 First power-saving switch 31 Second power-saving switch 32 Third power-saving switch 33 Fourth power-saving switch 34 Central processing unit 40 Unit 41 First peripheral unit 51 Second peripheral unit 52 Third peripheral unit 53 First frequency divider 61 Second frequency divider 62 Crystal oscillator 71 RC oscillator 72 Instant time clock 80 Register 90 Select control bit ( C2, Q, CG)
第一時鐘訊號fM 第二時鐘訊號(f]vi/2、fivi/4、fivi/8、fW16、fjvi/32、f]y[/64 ) 第三時鐘訊號fRTC 第四時鐘訊號fsYs 17First clock signal fM second clock signal (f]vi/2, fivi/4, fivi/8, fW16, fjvi/32, f]y[/64) third clock signal fRTC fourth clock signal fsYs 17
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW96100981A TW200830094A (en) | 2007-01-10 | 2007-01-10 | Micro controller circuit and power saving method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW96100981A TW200830094A (en) | 2007-01-10 | 2007-01-10 | Micro controller circuit and power saving method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
TW200830094A true TW200830094A (en) | 2008-07-16 |
Family
ID=44818187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW96100981A TW200830094A (en) | 2007-01-10 | 2007-01-10 | Micro controller circuit and power saving method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW200830094A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI402669B (en) * | 2009-01-15 | 2013-07-21 | Via Tech Inc | Power saving modules and the related computer systems and power saving methods |
US9477293B2 (en) | 2013-05-29 | 2016-10-25 | Wistron Corporation | Embedded controller for power-saving and method thereof |
-
2007
- 2007-01-10 TW TW96100981A patent/TW200830094A/en unknown
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI402669B (en) * | 2009-01-15 | 2013-07-21 | Via Tech Inc | Power saving modules and the related computer systems and power saving methods |
US9477293B2 (en) | 2013-05-29 | 2016-10-25 | Wistron Corporation | Embedded controller for power-saving and method thereof |
TWI574148B (en) * | 2013-05-29 | 2017-03-11 | 緯創資通股份有限公司 | Embedded controller for power-saving and method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055026B (en) | Real time clock unit in a kind of microcontroller SOC | |
JP4468707B2 (en) | Data processing performance control apparatus and method | |
CN109933846A (en) | The control system and its power control method of super low-power consumption, electronic device | |
CN107003707B (en) | Integrated system with independent power domains and split power rails for logic and memory | |
KR101771674B1 (en) | External device power control during low power sleep mode without central processing intervention | |
CN108089689A (en) | A kind of small-sized SoC super low-power consumptions control circuit and method | |
CN107515662A (en) | Low-power consumption management method in a kind of MCU chip towards the application of keying class | |
CN105807892A (en) | Low power consumption mode switching method of embedded real time operating system | |
CN102621912A (en) | Automatic power-saving method of micro controller unit | |
CN106371549A (en) | Ultra-low power consumption clock control method applied to MCU (Micro-programmed Control Unit) system | |
CN105700441A (en) | Low-power-consumption single-chip microcomputer type power supply management control system | |
CN103713726B (en) | A kind of SCM system with power-saving working mode | |
TW200830094A (en) | Micro controller circuit and power saving method thereof | |
TW201135444A (en) | Power scaling module and power scaling unit of an electronic system | |
CN201788603U (en) | An experimental teaching platform of electromechanical control based on single chip microcomputer | |
CN101246388A (en) | Microcontroller and power saving method thereof | |
CN107741865B (en) | Standby system capable of self-awakening and standby method | |
CN202886895U (en) | Intelligent sleep manager based on C51 microcontroller | |
CN102402270A (en) | Central processing unit frequency adjustment method and system | |
CN206133460U (en) | Ultra -low power consumption clock system for MCU system | |
CN203870558U (en) | Main control chip for dynamic token system | |
CN203351888U (en) | Timing socket with Bluetooth function | |
CN100587712C (en) | Chinese dot matrix display smart card energy consumption controller | |
CN113688092B (en) | Low-power-consumption safety protection control device based on singlechip | |
CN201690201U (en) | Clock-synchronizing circuit of electric power protection device |