JPH042971A - Electronic watt-hour meter - Google Patents

Electronic watt-hour meter

Info

Publication number
JPH042971A
JPH042971A JP2103121A JP10312190A JPH042971A JP H042971 A JPH042971 A JP H042971A JP 2103121 A JP2103121 A JP 2103121A JP 10312190 A JP10312190 A JP 10312190A JP H042971 A JPH042971 A JP H042971A
Authority
JP
Japan
Prior art keywords
clock signal
commercial power
time
clock
frequency
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2103121A
Other languages
Japanese (ja)
Inventor
Takashi Kawai
孝 河合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2103121A priority Critical patent/JPH042971A/en
Publication of JPH042971A publication Critical patent/JPH042971A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a watt-hour meter equipped with a highly precise time counting device by generating one clock signal from a control circuit at the time of transition from the interruption of service of a commercial power supply to the start thereof and by synchronizing the signal with a reference period of a clock signal generated from a frequency divider which divides the frequency of the commercial power supply. CONSTITUTION:When the service of a commercial power supply is started, a frequency divider 3 starts counting from this time point as a starting point. Simultaneously when a microprocessor (MPU) 1 makes an interrupt action on the basis of one clock signal generated from a control circuit 11 immediately after the start, a time counter 8 counts the clock signal. Since a reset signal generated by the interrupt action of the MPU 1 is given at this time, a count value of the frequency divider 3 up to this time is cleared and the counting is restarted, while a switch 7 is changed over to the end on the service side. Accordingly, a clock signal of a one-second period is inputted from the frequency divider 3 to the counter 8 synchronously with the clock signal generated from the control circuit 11, and therefore no deviation occurs in the period of the clock signal even at the time point of changeover from the interruption of the service to the start thereof.

Description

【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) 本発明は時計装置を有し、且つこの時計装置に設定され
た時間帯毎の使用電力量を計量する電子式電力量計に関
する。
[Detailed Description of the Invention] [Purpose of the Invention (Industrial Application Field) The present invention provides an electronic power consumption system that has a clock device and measures the power consumption for each time period set in the clock device. Regarding the meter.

(従来の技術) 電子式電力量計としては種々のタイプのものがあるが、
その中で1日の時間帯を複数に分割して各時間帯毎に電
気料金を設定するようにした多時間帯設定可能な電子電
力量計がある。この電子電力量計は内部に時間帯を設定
するための計時装置(タイマ)を有しており、このタイ
マを参照して各時間帯での電力量の計量を行なうもので
ある。
(Prior art) There are various types of electronic watt-hour meters.
Among them, there is an electronic watt-hour meter that can be set for multiple time periods, which divides the day into multiple time periods and sets electricity rates for each time period. This electronic watt-hour meter has an internal clock device (timer) for setting time zones, and measures the amount of power in each time zone with reference to this timer.

ところで、かかる多時間帯設定可能な電子式電力量計に
おいて、タイマに用いられる基糸クロック源としては商
用電源周波数(50Hz又は60Hz)を分周してクロ
ック信号を得る方法と、発振素子として例えば水晶発振
子を用いてその発振周波数を分周してクロック信号を得
る方法かある。この場合、時h1の精度の点では商用電
源周波数を分周してクロック信号を得る方法が優れてい
るが、停電時には商用電源周波数が存在しなくなるとい
う問題があるため、従来では商用電源の通電時には商用
電源周波数より得られるクロック信号により計時を行な
い、商用電源の停電時には水晶発振子より得られるクロ
ック信号により計時を行なうようにしている。
By the way, in such an electronic watt-hour meter that can be set for multiple time periods, the basic clock source used for the timer is a method of obtaining a clock signal by dividing the commercial power frequency (50Hz or 60Hz), and a method of obtaining a clock signal as an oscillation element, for example. There is a method of obtaining a clock signal by using a crystal oscillator and dividing its oscillation frequency. In this case, in terms of accuracy of h1, it is better to obtain a clock signal by dividing the commercial power supply frequency, but there is a problem that the commercial power supply frequency disappears in the event of a power outage. Sometimes, time is measured using a clock signal obtained from the frequency of the commercial power supply, and when the commercial power supply is interrupted, time is measured using a clock signal obtained from a crystal oscillator.

第6図は従来の多時間帯設定可能な電子式電力量計にお
ける計時装置のブロック図を示している。
FIG. 6 shows a block diagram of a timing device in a conventional electronic watt-hour meter that can be set in multiple time zones.

ど 即ぢ、第4図において、1は電力量の計量に必要な制御
を担うマイクロプロセッサで、このマイクロプロセッザ
]内には商用電源周波数(50/60H2)を波形整形
回路2により波形整形[7て得られるパルス信号か入力
され、このパルス信号を1150又は]/60に分周し
て1秒、周期のクロック信号を胃る分周器3と、水晶発
振子4の発振周波数を分周回路5により分周し7で得ら
れる1秒周期のクロック信号が入力される毎にマイクロ
プロセッサ1に割込みをかけて必要な動作を行なわせる
割込処理回路6と、商用電源の通電時には分周器3の出
力端側(通電側)に接続され、商用電源の停電時には分
周回路5の出力端側(停電側)に切替接続する切替スイ
ッチ7と、この切替スイッチ7を通して入力されるクロ
ック信号をカウント動作て時間を計時する計時カウンタ
8および停電検出回路9により商用電源の停電が検出さ
れるとその検出信号により切替スイッチ7を通電側から
停電側に切替える停電処理回路10を備えている。
In FIG. 4, reference numeral 1 denotes a microprocessor responsible for the control necessary for metering the amount of electricity. 7 is input, and this pulse signal is divided into 1150 or ]/60 to divide the oscillation frequency of the crystal oscillator 4 and the frequency divider 3 divides the clock signal with a period of 1 second. An interrupt processing circuit 6 which interrupts the microprocessor 1 to perform a necessary operation every time a one-second period clock signal obtained by dividing the frequency by the circuit 5 and obtaining it by the circuit 7 is input, and divides the frequency when the commercial power supply is turned on. A change-over switch 7 is connected to the output end (power-on side) of the frequency divider 3, and is switched to the output end (power-out side) of the frequency dividing circuit 5 in the event of a power outage of the commercial power supply, and a clock signal input through the change-over switch 7. When a power outage of the commercial power source is detected by the power outage detection circuit 9 and the power outage detection circuit 9, the power outage processing circuit 10 switches the changeover switch 7 from the energized side to the outage side in response to the detection signal.

なお、分周回路5は、停電検出回路9より停電検出信号
の入力がないときはクロック信号の出力が阻止され、ま
た停電検出回路9より停電検出信号が入力されるとクロ
ック信号が出力されるようになっている。
Note that the frequency divider circuit 5 is blocked from outputting a clock signal when no power failure detection signal is input from the power failure detection circuit 9, and outputs a clock signal when a power failure detection signal is input from the power failure detection circuit 9. It looks like this.

ここで、マイクロプロセッサ−内の割込処理回路6は、
次のような理由により設けられている。
Here, the interrupt processing circuit 6 in the microprocessor is
This is provided for the following reasons.

即ち、電子式電力量計は商用電源が停電すると制御動作
に必要な電源を電池より得ており、電池の消耗を極力少
なくするには電力量計内にある電子回路はできる限り動
作させないようにする必要がある。特に電力量計システ
ムの中心となるマイクロプロセッサは動作時に大きな電
力を消費する。
In other words, electronic watt-hour meters obtain the power necessary for control operations from batteries when the commercial power supply goes out, so in order to minimize battery consumption, the electronic circuit inside the watt-hour meter should not be operated as much as possible. There is a need to. In particular, a microprocessor, which is the core of a power meter system, consumes a large amount of power during operation.

このため、商用電源の停電時には第7図に示すフローチ
ャートのようにマイクロプロセッサをスタンバイ状態に
しておき、割込処理回路6にクロック信号が入力される
と、マイクロプロセッサ−に割込みをかけて計時カウン
タ8によるカウント動作を開始させ、動作が終了すると
スタンバイ状態にして電池の消耗が最小になるようにし
ている。
Therefore, during a power outage, the microprocessor is kept in standby mode as shown in the flowchart shown in Figure 7, and when a clock signal is input to the interrupt processing circuit 6, an interrupt is sent to the microprocessor and the time counter A count operation of 8 is started, and when the operation is completed, the device is put into a standby state so that battery consumption is minimized.

このような構成の計時装置を備えた電子式電力量計にお
いて、商用電源の通電時には切替スイッチ7が分周器3
側に接続されている。また、分周回路3には波形整形回
路2より50H2又は60 Hzの商用電源周波数に対
応するパスル信号が入力されている。したがって、計時
カウンタ8は分周器3より得られる1秒周期のクロック
信号をカウントし、時間を計時している。この場合、水
晶発振子4の発振周波数を分周回路5により分周じて得
られる1秒周期のクロック信号は割込処理回路6には入
力されていない。
In an electronic watt-hour meter equipped with a timekeeping device configured as described above, when the commercial power supply is energized, the selector switch 7 switches to the frequency divider 3.
connected to the side. Further, a pulse signal corresponding to a commercial power supply frequency of 50H2 or 60 Hz is inputted to the frequency dividing circuit 3 from the waveform shaping circuit 2. Therefore, the time counter 8 counts the 1 second cycle clock signal obtained from the frequency divider 3 to measure time. In this case, the 1 second period clock signal obtained by dividing the oscillation frequency of the crystal oscillator 4 by the frequency dividing circuit 5 is not input to the interrupt processing circuit 6.

このような状態にあるとき、停電検出回路9により商用
電源の停電を検出すると停電処理回路10により切替ス
イッチ7を通電側から停電側に切替えらると同時に分周
回路5より1秒周期のクロック信号の出力を許容する。
In such a state, when the power failure detection circuit 9 detects a power outage in the commercial power supply, the power outage processing circuit 10 switches the selector switch 7 from the energized side to the power outage side, and at the same time, the frequency dividing circuit 5 outputs a 1 second cycle clock. Allow signal output.

したがって、この分周回路5より割込処理回路6にクロ
ック信号が入力され、マイクロプロセッサ−が起動する
とπ1時カウンタ8はクロック信号をカウントする。そ
して、計時カウンタ8のカウント動作が終了すると次の
クロック信号が入力されるまでスタンバイの状態となる
。このような動作は分周回路5よりクロック信号が割込
処理回路6に入力される毎に繰返し実行され、計時カウ
ンタ8ては1秒周期のクロック信号が到来する毎に時計
を累進させる。
Therefore, a clock signal is input from the frequency dividing circuit 5 to the interrupt processing circuit 6, and when the microprocessor is activated, the π1 hour counter 8 counts the clock signal. When the counting operation of the time counter 8 is completed, the time counter 8 enters a standby state until the next clock signal is input. Such an operation is repeatedly executed every time a clock signal is input from the frequency dividing circuit 5 to the interrupt processing circuit 6, and the time counter 8 advances the clock every time a clock signal with a period of one second arrives.

(発明が解決しようとする課題) このように商用電源の通電時には商用電源周波数を分周
して得られる1秒周期のクロック信号を計時カウンタ8
に入力し、停電時には水晶発振子4の発振周波数を分周
して得られるクロック信号を計時カウンタ8に入力して
、商用電源の停電時でも計時装置の機能を維持させてい
る。
(Problem to be Solved by the Invention) In this way, when the commercial power supply is energized, the clock signal with a period of 1 second obtained by dividing the commercial power supply frequency is sent to the time counter 8.
In the event of a power outage, a clock signal obtained by dividing the oscillation frequency of the crystal oscillator 4 is inputted to the time counter 8 to maintain the function of the timer even in the event of a power outage of the commercial power supply.

しかし、このような計時装置を備えた電子式電力量計に
おいては、商用電源が停電状態から通電に変化すると、
切替スイッチ7が停電側から通電側に切替わり、再び商
用電源周波数を分周する分周器3より得られるクロック
信号が計時カウンタ8に入力されるが、このとき次のよ
うな問題があつた。
However, in an electronic watt-hour meter equipped with such a timing device, when the commercial power supply changes from a power outage state to a power-on state,
When the selector switch 7 is switched from the power outage side to the energization side, the clock signal obtained from the frequency divider 3 that divides the commercial power frequency is again input to the time counter 8, but at this time, the following problem occurs. .

即ち、第8図において、いま商用電源が停電状態にある
ときは、A期間に示すように1秒周期のクロック信号が
水晶発振子4の分周回路5より計時カウンタ8に入力さ
れている。このような状態にあるとき、t1時点で商用
電源が通電すると商用電源周波数を分周する分周器3は
このt1時点を起点としてB期間に示すように1秒周期
毎に発生するクロック信号が計時カウンタ8に入力され
る。このときL1時点、つまり切替スイッチ7が停電側
から通電側への切替時点においては水晶発振子4の分周
回路5からπ1時カウンタ8に入力されるクロック信号
の周期と交流電源周波数を分周する分周器3から計時カ
ウンタ8に入力されるクロック信号の周期とが同期して
いないため、停電から通電の切替時においてはC期間に
示すように最大1秒間のずれを生じる可能性がある。し
たがって、多時間帯設定用の計時装置を有する電子式電
力量計では時間帯に応じて計量値を別々に積算するよう
にしているため、時間帯別の計量にそれぞれ誤差を生じ
てしまうという問題点かあった。
That is, in FIG. 8, when the commercial power supply is currently in a power outage state, a clock signal with a period of 1 second is inputted to the time counter 8 from the frequency dividing circuit 5 of the crystal oscillator 4 as shown in period A. In this state, when the commercial power supply is turned on at time t1, the frequency divider 3 that divides the commercial power frequency divides the clock signal generated every second, starting from time t1, as shown in period B. It is input to the time counter 8. At this time, at time L1, that is, when the changeover switch 7 switches from the power outage side to the energization side, the period of the clock signal input from the frequency dividing circuit 5 of the crystal oscillator 4 to the π1 hour counter 8 and the AC power frequency are divided. Since the period of the clock signal input from the frequency divider 3 to the time counter 8 is not synchronized, there is a possibility that there will be a shift of up to 1 second as shown in period C when switching from a power outage to a power supply. . Therefore, electronic watt-hour meters that have a timing device for setting multiple time zones integrate the measured values separately depending on the time zone, resulting in errors in the measurements for each time zone. There was a point.

本発明は上記のような問題点に鑑みてなされたもので、
その目的は商用電源が停電状態から通電に変化して計時
するクロック信号の発生源が発振素子より商用電源側に
切替わっても計時誤差の生しない精度の高い電子式電力
量計を提供するにある。
The present invention was made in view of the above-mentioned problems.
The purpose is to provide a highly accurate electronic watt-hour meter that does not produce time measurement errors even when the commercial power supply changes from a power outage state to a power supply state and the source of the clock signal used for time measurement switches from the oscillation element to the commercial power supply side. be.

[発明の構成] (課題を解決するための手段) 本発明は上記の目的を達成するため、設定された時間帯
を計時する計時カウンタと、商用電源周波数を分周手段
により分周して基準周期のクロツタ信号を発生する第1
のクロック源と、発振素子の発振周波数を分周回路によ
り分周して基準周期のクロック信号を発生ずる第2のク
ロック源と、前記商用電源の通電時には前記第1のクロ
ック源より発生するクロック信号を前記計時カウンタに
入力し、前記商用電源が停電すると前記第2のクロック
源に切替えてこの第2のクロック源より発生するクロッ
ク信号を前記計時カウンタに入力する切替手段とからな
る計時装置を備えた電子式電力量計において、前記第2
のクロック源より発生するクロック信号が入力され、前
記商用電源の通電時にはこのクロック信号の出力を阻止
し、前記商用電源の停電時にはクロック信号の出力を許
容して前記計時カウンタに入力すると共に、前記商用電
源が停電状態から通電に変化するとその直後に1つのク
ロック信号を発生して前記計時カウンタに入力する制御
回路と、前記商用電源が停電状態から通電に変化すると
その直後に前記制御回路より発生する1つのクロック信
号に同期させて前記第1のクロック源の分周手段をリセ
ットするリセット手段とを設けたものである。
[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above object, the present invention includes a time counter that measures a set time period, and a frequency dividing means that divides the commercial power frequency and uses it as a reference. The first generator generates a periodic blackout signal.
a second clock source that generates a reference period clock signal by dividing the oscillation frequency of the oscillation element by a frequency divider circuit, and a clock generated from the first clock source when the commercial power supply is energized. A timekeeping device comprising a switching means for inputting a signal to the timekeeping counter, and switching means for switching to the second clock source when the commercial power supply is interrupted and inputting a clock signal generated from the second clock source to the timekeeping counter. In the electronic watt-hour meter, the second
A clock signal generated from a clock source is inputted, and when the commercial power source is energized, the output of this clock signal is blocked, and when the commercial power source is out of power, the output of the clock signal is allowed and input to the time counter; a control circuit that generates one clock signal and inputs it to the time counter immediately after the commercial power source changes from a power outage state to a energized state; and reset means for resetting the frequency dividing means of the first clock source in synchronization with one clock signal.

(作用) このような構成の電子式電力量計にあっては、商用電源
が停電状態から通電に変化するとその直後に制御回路よ
り発生する1つのクロック信号が計時カウンタに入力さ
れると共に、第1のクロッ源の分周手段かクリアされる
ので、この分周手段はその時点を起点として基準周期の
クロック信号を計時カウンタに入力することになる。し
たがって、商用電源が停電状態から通電に変化して第2
のクロック源から第1のクロック源に切替わっても両ク
ロック源の基準周期に同期したクロック信号を計時カウ
ンタに入力することが可能となり、計時カウンタの計時
誤差を防止することができる。
(Function) In the electronic watt-hour meter having such a configuration, immediately after the commercial power supply changes from a power outage state to a energized state, one clock signal generated from the control circuit is input to the time counter, and a clock signal is input to the time counter. Since the frequency dividing means of the clock source No. 1 is cleared, this frequency dividing means inputs the clock signal of the reference period to the time counter starting from that point in time. Therefore, the commercial power supply changes from a power outage state to a energized state and the second
Even if the clock source is switched from the first clock source to the first clock source, it is possible to input a clock signal synchronized with the reference period of both clock sources to the time counter, and it is possible to prevent a time measurement error in the time counter.

(実施例) 以下本発明の一実施例を図面を参照して説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明による電子式電力量計の回路構成例を示
すブロック図で、第6図と同一部分には同一記号を付し
てその説明を省略し、ここでは異なる点について述べる
。本実施例では第1図に示すように水晶発振子4の分周
回路5より得られる基準周期のクロック信号が入力され
、且つ停電検出回路9により商用電源の停電が検出され
ると基準周期のクロック信号をマイクロプロセッサ1内
の割込処理回路6および切替スイッチ7の停電側端子に
与える制御回路1]を設ける構成としたものである。こ
の制御回路1]は第2図に示すように2段構成にして設
けられたDフリップフロップ12−1..12−2とA
NDゲート13とからなり、前段のDフリップフロップ
12−1の入力端子(Ck)には分周回路5の出力が加
えられ、またリセット端子(R)にはマイクロプロセッ
サ11 ] から割込み動作により発生するリセット信号が入力され
る。後段のDフリップフロップ12−2の入力端子(C
k)には前段のDフリップフロップ12−1の出力端子
の出力が加えられ、またリセット端子(R)には停電検
出回路9の出力(PD)が加えられる。さらに、AND
ゲート13には前段のDフリップフロップ12−1の出
力端子の出力と後段のDフリップフロップ]2−2の反
転出力端子の出力とが加えられ、その両川力のアンド条
件を満たしたときクロック信号を出力する。したがって
、第3図に示すタイムチャートからも明らかなように、
停電検出回路9により商用電源の停電が検出されている
ときはマイクロプロセッサ1内の割込処理回路6に分周
回路5より入力される基準周期のクロック信号を与えて
マイクロプロセッサ1を割込み動作させ、この割込み動
作によりリセット信号を発生させてリセットされる。ま
た、商用電源か通電するとその直後に制御回路11より
1つの基準周期のクロック信号Pが発生する。
FIG. 1 is a block diagram showing an example of the circuit configuration of an electronic watt-hour meter according to the present invention. Parts that are the same as those in FIG. 6 are given the same symbols, and the explanation thereof will be omitted, and only the different points will be described here. In this embodiment, as shown in FIG. 1, when a clock signal with a reference period obtained from a frequency dividing circuit 5 of a crystal oscillator 4 is input, and a power outage of the commercial power supply is detected by a power outage detection circuit 9, the reference period is changed. The control circuit 1 provides a clock signal to the interrupt processing circuit 6 in the microprocessor 1 and the power outage side terminal of the changeover switch 7. This control circuit 1] includes D flip-flops 12-1. .. 12-2 and A
The output of the frequency divider circuit 5 is applied to the input terminal (Ck) of the D flip-flop 12-1 in the previous stage, and the output from the microprocessor 11 is applied to the reset terminal (R). A reset signal is input. The input terminal (C
The output of the output terminal of the D flip-flop 12-1 at the previous stage is applied to k), and the output (PD) of the power failure detection circuit 9 is applied to the reset terminal (R). Furthermore, AND
The output of the output terminal of the D flip-flop 12-1 in the preceding stage and the output of the inverted output terminal of the D flip-flop 2-2 in the succeeding stage are applied to the gate 13, and when the AND condition of both forces is satisfied, a clock signal is generated. Output. Therefore, as is clear from the time chart shown in Figure 3,
When a power outage of the commercial power supply is detected by the power outage detection circuit 9, a clock signal of the reference period inputted from the frequency dividing circuit 5 is given to the interrupt processing circuit 6 in the microprocessor 1 to cause the microprocessor 1 to perform an interrupt operation. , This interrupt operation generates a reset signal and is reset. Immediately after the commercial power supply is turned on, the control circuit 11 generates a clock signal P having one reference period.

一方、商用電源周波数を分周する分周器3に対しては制
御回路1]より商用電源が停電状態から通電に変化した
直後に発生する1つのクロック信号に同期させてリセッ
ト信号が入力されるようにしである。この場合、リセッ
ト信号はマイクロプロセッサ1の割込み動作により発生
させている。
On the other hand, a reset signal is input from the control circuit 1 to the frequency divider 3 that divides the commercial power frequency in synchronization with one clock signal generated immediately after the commercial power supply changes from a power outage state to a energized state. That's how it is. In this case, the reset signal is generated by an interrupt operation of the microprocessor 1.

次に上記のように構成された電子式電力量計の計時作用
を第4図に示すタイムチャートを参照しながら述べる。
Next, the timing operation of the electronic watt-hour meter constructed as described above will be described with reference to the time chart shown in FIG.

商用電源の通電時には切替スイッチ7が通電側端に接続
されているので、計時カウンタ8は商用電源周波数を分
周する分周器3より発生する1秒周期のクロック信号を
計時している。
When the commercial power source is energized, the changeover switch 7 is connected to the energized side end, so the time counter 8 measures a one-second cycle clock signal generated by the frequency divider 3 that divides the frequency of the commercial power source.

このような状態にあるとき商用電源に停電が発生すると
停電検出回路9の出力により切替スイッチ7が通電側端
から停電側端に切替わると同時に制御回路11は水晶発
振子4の分周回路5より入力される1秒周期のクロック
信号を割込処理回路6に加える。この割込処理回路6に
クロック信号が入力される毎にマイクロプロセッサ1は
割込み動作し、計時カウンタ8は制御回路1]より出力
されるクロック信号を計時する。
When a power outage occurs in the commercial power supply in such a state, the changeover switch 7 is switched from the energized side end to the power outage side end by the output of the power outage detection circuit 9, and at the same time, the control circuit 11 switches the frequency dividing circuit 5 of the crystal oscillator 4. A clock signal with a period of 1 second inputted from the interrupt processing circuit 6 is applied to the interrupt processing circuit 6. Every time a clock signal is input to the interrupt processing circuit 6, the microprocessor 1 performs an interrupt operation, and the time counter 8 measures the clock signal output from the control circuit 1.

その後、商用電源がti時点で通電すると分周器3はそ
の時点を起点としてカウントを開始するか、その直後に
制御回路11から発生する1つのクロック信号Pにより
マイクロプロセッサ]が割込み動作すると同時に計時カ
ウンタ8はそのクロック信号を計時する。この時マイク
ロプロセッサ1の割込み動作により発生するリセット信
号が分周器3に加えられるので、分周器3はそれまでの
カウント値がクリアされ、この時点からカウントが再開
始されると共に停電処理回路10により切替スイッチ7
が通電側端に切替えられる。
Thereafter, when the commercial power supply is turned on at time ti, the frequency divider 3 starts counting from that time, or immediately after that, one clock signal P generated from the control circuit 11 causes the microprocessor to perform an interrupt operation, and the clock is simultaneously counted. Counter 8 measures the clock signal. At this time, a reset signal generated by the interrupt operation of the microprocessor 1 is applied to the frequency divider 3, so the count value of the frequency divider 3 up to that point is cleared, and counting is restarted from this point, and the power failure processing circuit Selector switch 7 by 10
is switched to the current-carrying end.

したがって、計時カウンタ8には制御回路11から発生
する1つのクロック信号Pに同期して1秒周期のクロッ
ク信号が分周器3より入力されるので、商用電源の停電
から通電への切替時点においてもクロック信号の周期に
ずれを生じることがなく、精度の高い計時を行なうこと
かできる。
Therefore, a clock signal with a period of 1 second is inputted to the time counter 8 from the frequency divider 3 in synchronization with one clock signal P generated from the control circuit 11, so that at the time of switching from commercial power outage to energization, Also, there is no deviation in the period of the clock signal, and highly accurate time measurement can be performed.

第5図は商用電源の通電時および停電から通電に移行す
るときのマイクロプロセッサ]内の計時動作のフローチ
ャートを示している。
FIG. 5 shows a flowchart of the timekeeping operation within the microprocessor when the commercial power supply is turned on and when the power is switched on from a power outage.

このように本実施例によれば、商用電源の停電から通電
への移行時に制御回路11より1つのクロックイ八号を
発生させて商用電源周波数を分周する分周器3より発生
するクロック信号との基準周期に同期させるようにした
ので、従来のように計時カウタ8に計時誤差を生じるよ
うなことがなく、多時間帯設定用の計時装置を有する電
子式電力量=1のように時間帯に応じてit ffi値
を別々に積算しても、時間帯別の計量にそれぞれ誤差を
生じるようなことがなくなる。
In this way, according to the present embodiment, when the commercial power supply changes from power outage to power on, the control circuit 11 generates one clock signal No. 8, and the clock signal generated by the frequency divider 3 that divides the commercial power frequency. Since the timing counter 8 is synchronized with the reference period of Even if it ffi values are integrated separately depending on the time zone, errors will not occur in measurements for each time zone.

なお、上記実施例ではマイクロプロセッサ1内の分周器
3としてはソフトウェアで実現するようにしてもよい。
In the above embodiment, the frequency divider 3 in the microprocessor 1 may be realized by software.

また、クロック信号の基準周期を1秒としたが、0.5
秒等の基準周期としてもよい。さらに、停電時のクロッ
ク源として水晶発振子4の発振周波数を分周回路5によ
り分周して得るようにしたが、水晶発振子4に代わるも
のがあれば、他の発振素子を用いてもよいことは言うま
でもない。この他、本発明はその要旨を変更しない範囲
内で種々変形して実施できるものである。
In addition, the reference period of the clock signal was set to 1 second, but 0.5
It may also be a reference period such as seconds. Furthermore, the oscillation frequency of the crystal oscillator 4 is divided by the frequency dividing circuit 5 to be obtained as a clock source during a power outage. However, if there is an alternative to the crystal oscillator 4, other oscillation elements may be used Needless to say, it's a good thing. In addition, the present invention can be implemented with various modifications without changing the gist thereof.

[発明の効果] 以上述べたように本発明によれば、商用電源が停電状態
から通電に変化して計時するクロック信号の発生源か発
振素子より商用電源側に切替わっても計時誤差の生じな
い精度の高い計時装置を備えた電子式電力量計を提供す
ることができる。
[Effects of the Invention] As described above, according to the present invention, even if the commercial power source changes from a power outage state to a power-on state and the source of the clock signal used for timekeeping switches from the oscillation element to the commercial power source side, a timing error does not occur. It is possible to provide an electronic watt-hour meter equipped with a highly accurate timing device.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明による旧時装置を備えた電子式電力量計
の一実施例を示すブロック回路図、第2図は同実施例に
おける制御回路の詳細図、第3図は同じく制御回路のタ
イムチャートを示す図、第4図は同実施例の計時作用を
説明するためのタイムチャートを示す図、第5図は同実
施例における商用電源の通電時および停電から通電への
移行時のマイクロプロセッサの計時動作のフローチャー
トを示す図、第6図は従来の計時装置を備えた電子式電
力量計を示すブロック回路図、第7図は同装置における
停電時のマイクロプロセッサの計時動作のフローチャー
1・を示ず図、第8図は同じく計時作用を説明するため
のタイムチャー]・を示す図である。 ]・・・マイクロプロセッサ、2・・・波形整形回路、
3・・・分周器、4・・・水晶発振子、5・・・分周回
路、6・・・割込処理回路、7・・・切替スイッチ、8
・・・計時カウンタ、9・・・停電検出回路、10・・
・停電処理回路、1]・・・制御回路。 出願人代理人 弁理士 鈴江武彦 ] 7
FIG. 1 is a block circuit diagram showing an embodiment of an electronic watt-hour meter equipped with an old-fashioned device according to the present invention, FIG. 2 is a detailed diagram of a control circuit in the same embodiment, and FIG. FIG. 4 is a diagram showing a time chart for explaining the timekeeping function of the same embodiment. FIG. Figure 6 is a block circuit diagram showing an electronic watt-hour meter equipped with a conventional timekeeping device; Figure 7 is a flowchart of the microprocessor's timekeeping operation during a power outage in the same device. FIG. 8 is a diagram showing a time chart for explaining the timekeeping action. ]...Microprocessor, 2...Waveform shaping circuit,
3... Frequency divider, 4... Crystal oscillator, 5... Frequency dividing circuit, 6... Interrupt processing circuit, 7... Selector switch, 8
...Time counter, 9...Power failure detection circuit, 10...
- Power outage processing circuit, 1]...control circuit. Applicant's agent Patent attorney Takehiko Suzue] 7

Claims (1)

【特許請求の範囲】[Claims]  設定された時間帯を計時する計時カウンタと、商用電
源周波数を分周手段により分周して基準周期のクロック
信号を発生する第1のクロック源と、発振素子の発振周
波数を分周回路により分周して基準周期のクロック信号
を発生する第2のクロック源と、前記商用電源の通電時
には前記第1のクロック源より発生するクロック信号を
前記計時カウンタに入力し、前記商用電源が停電すると
前記第2のクロック源に切替えてこの第2のクロック源
より発生するクロック信号を前記計時カウンタに入力す
る切替手段とからなる計時装置を備えた電子式電力量計
において、前記第2のクロック源より発生するクロック
信号が入力され、前記商用電源の通電時にはこのクロッ
ク信号の出力を阻止し、前記商用電源の停電時にはクロ
ック信号の出力を許容して前記計時カウンタに入力する
と共に、前記商用電源が停電状態から通電に変化すると
その直後に1つのクロック信号を発生して前記計時カウ
ンタに入力する制御回路と、前記商用電源が停電状態か
ら通電に変化するとその直後に前記制御回路より発生す
る1つのクロック信号に同期させて前記第1のクロック
源の分周手段をリセットするリセット手段とを設けたこ
とを特徴とする電子式電力量計。
A clock counter that clocks a set time period, a first clock source that generates a reference period clock signal by dividing the commercial power frequency by a frequency dividing means, and a frequency dividing circuit that divides the oscillation frequency of the oscillation element. A second clock source that cycles and generates a clock signal having a reference period, and a clock signal generated from the first clock source when the commercial power source is energized are input to the time counter, and when the commercial power source is turned on, the clock signal generated by the first clock source is input to the time counter. In an electronic watt-hour meter, the electronic watt-hour meter is equipped with a timekeeping device comprising switching means for switching to a second clock source and inputting a clock signal generated from the second clock source to the time counter. A generated clock signal is input, and when the commercial power source is energized, the output of this clock signal is blocked, and when the commercial power source is out of power, the clock signal is allowed to be output and input to the time counter, and when the commercial power source is out of power, the clock signal is input to the time counter. a control circuit that generates one clock signal and inputs it to the time counter immediately after the state changes from a power-on state to an energized state; and one clock that is generated by the control circuit immediately after the commercial power source changes from a power outage state to an energized state. An electronic watt-hour meter comprising: reset means for resetting the frequency dividing means of the first clock source in synchronization with a signal.
JP2103121A 1990-04-20 1990-04-20 Electronic watt-hour meter Pending JPH042971A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2103121A JPH042971A (en) 1990-04-20 1990-04-20 Electronic watt-hour meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2103121A JPH042971A (en) 1990-04-20 1990-04-20 Electronic watt-hour meter

Publications (1)

Publication Number Publication Date
JPH042971A true JPH042971A (en) 1992-01-07

Family

ID=14345752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2103121A Pending JPH042971A (en) 1990-04-20 1990-04-20 Electronic watt-hour meter

Country Status (1)

Country Link
JP (1) JPH042971A (en)

Similar Documents

Publication Publication Date Title
US4068462A (en) Frequency adjustment circuit
JPH042971A (en) Electronic watt-hour meter
JPH0347718B2 (en)
JP2001183478A (en) Microcomputer system and electronic watt-hour meter
JP3383437B2 (en) Time measurement method and clock
JP2742642B2 (en) Oscillation-synchronous frequency change measurement method and apparatus
JPH1073683A (en) Electronic time piece
JPH07225264A (en) Electronic watt-hour meter
JPS5913972A (en) Hand display electronic watch
SU1755252A1 (en) Timer
JPS641680Y2 (en)
JPS5838839B2 (en) Multi-stage signal generator
KR0128142Y1 (en) Time control circuit for power supply complex apparatus
JPH03231160A (en) Electronic type watthour meter
JPH0385487A (en) Time-piece apparatus
JPS62164200A (en) Traffic signal controller
RU2127446C1 (en) Electronic timer with direct light-emitting indicator
JPH066211A (en) Reference oscillator and its control method
JPS6213037Y2 (en)
JPS6212313Y2 (en)
JP2000314788A (en) Timepiece synchronous with synchronizing signal from digital network
JPS59111088A (en) Electronic clock
JPS5812320Y2 (en) traffic lights
JPH0129431B2 (en)
JPH0125352Y2 (en)