JP3546427B2 - Clock with calendar using binary counter - Google Patents

Clock with calendar using binary counter Download PDF

Info

Publication number
JP3546427B2
JP3546427B2 JP2000103969A JP2000103969A JP3546427B2 JP 3546427 B2 JP3546427 B2 JP 3546427B2 JP 2000103969 A JP2000103969 A JP 2000103969A JP 2000103969 A JP2000103969 A JP 2000103969A JP 3546427 B2 JP3546427 B2 JP 3546427B2
Authority
JP
Japan
Prior art keywords
time
binary counter
calibration
count value
ram
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.)
Expired - Fee Related
Application number
JP2000103969A
Other languages
Japanese (ja)
Other versions
JP2001289981A (en
Inventor
政夫 村井
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2000103969A priority Critical patent/JP3546427B2/en
Publication of JP2001289981A publication Critical patent/JP2001289981A/en
Application granted granted Critical
Publication of JP3546427B2 publication Critical patent/JP3546427B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、単純2進カウンターとソフトウェアを組み合わせたカレンダー付き時計に関する。
【0002】
【従来の技術】
通常カレンダー付き時計は、例えば特公昭58−3231号公報に記載されているように、専用ICにて、秒、分、時、日、曜日、月、及び年を専用にカウントするカウンタの組み合わせによって構成される。この場合、日、月、年は閏年などがあるため、かなり複雑な補正回路が必要となる。
【0003】
また、特開昭63−268058号公報には、ワンチップのマイクロコンピュータに、バックアップ電源の供給される時計機能回路ブロックを設け、主電源の遮断日時を示すデータを記憶部に書込、主電源の投入時に上記記憶部に記憶されている上記電源遮断日時データを読み出して、マイクロコンピュータの演算処理部により現在の日時を算出するようにした万年カレンダー機能を内蔵する時計機能回路が記載されている。
【0004】
【発明が解決しようとする課題】
上記特開昭63−268058号公報記載の時計機能回路によれば、カレンダー付き時計を、秒、分、時、日、曜日、月、及び年を専用にカウントするカウンタの組み合わせによって構成する必要がないので、構成を簡単にすることができるが、カウンタに入力されるクロック源である発振回路としては高精度のものを用いる必要がある。
【0005】
即ち、時計を構成するとき、クロックの源振の精度が問題になる。例えば、一ヶ月の誤差が1秒以内の時計を作ろうとすれば、源振の精度は0.3ppm以内に抑える必要があり、高価な源振が必要になる。
【0006】
本発明の目的は、時計の源振の精度として高精度のクロックを用いる必要がなく、かつハードウェアとしては単純2進カウンタのみを用いて秒、分、時、日、曜日、月、年を表示する精度の高いカレンダー付き時計を構成することにある。
【0007】
【課題を解決するための手段】
本発明は、クロック源と、該クロック源からのクロックをカウントする2進カウンタと、CPUと、該CPUが実行するプログラムを格納するROMと、一時的に情報を格納するRAMと、上位装置との間で通信を行うための通信用カードと、前記2進カウンタ、ROM、RAM、及び通信用カードと前記CPUとを接続するバスを備え、前記CPUは、上位装置から前記通信用カードを介して入力された校正時刻と該校正時刻が入力された時点で前記2進カウンタから読み出した基準カウント値とを前記RAMに記憶する手段と、時刻情報を出力する際に、該時刻情報出力時点で読み出した前記2進カウンタのカウント値と前記基準カウント値とを比較することにより前記校正時刻からの経過時間を算出し、該経過時間に基づいてカレンダー計算プログラムを実行することにより、秒、分、時、日、曜日、月及び年を計算して時刻情報として出力する手段とを備えていることを特徴とする。
【0008】
本発明のカレンダー付き時計が最初に動作し始めたとき、2進カウンタはある値を示している。時計校正のために上位装置から通信用カードを介してCPUに現在の年、月、曜日、日、時、分、秒(この校正時刻をY1とする)が入力されると、CPUはそのときの2進カウンタの値(T1)を読込み、この校正時刻Y1とカウント値T1をRAMに記憶する。
【0009】
その後、CPUは、現在の時刻(Yp)を、現在の2進カウンタの値(Tp)とRAMに記憶され得いる校正時刻Y1及びカウント値T1とから、Yp=Y1+(Tp−T1)を演算することにより求めることができる。
【0010】
そして、読み出し表示時刻(この時刻をY1aとする)になると、CPUは、そのときの2進カウンタの値(T1a)を読み出し、上記演算によってY1からの経過時間(秒単位)を知ることができ、カレンダー計算プログラムを実行することにより、分、時、日、曜日、月、年を計算してY1aを求めて出力する。
【0011】
更に本発明は、2回目の校正時刻Y2があったときの2進カウンタの値T2を読込み、Y2−Y1の値とT2−T1の値の間に差がある場合、この差を2進カウンタの精度上の誤差として、以降の時刻表示の時に、この誤差情報を用いて読み出して時刻を補正することを特徴とする。
【0012】
特に、通信機システムでは定期的に上位装置から時刻校正をする事ができるので、時刻校正毎に上記の誤差を求める事ができ、時計の源振の精度が悪くても常に正しい時刻に補正する事ができる。
【0013】
本発明のカレンダー付き時計は時刻を読みとる頻度は低く、常に回路の電源が入っている装置等に有効である。例えば、本装置が通信機器の場合、通信記録を上位装置に報告する事が必要になる。この場合、CPUは通信が行われる毎にその時の時刻を知る必要があり、通信内容とその時の時刻を記憶しておき、あとで上位局に報告する事により、上位局にて通信記録を取ることができる。
【0014】
このように時刻を読み出す頻度が低い場合には、この複雑な補正処理は通信が行われる毎にソフトウェアにて行えばよく、また、CPUのソフトウェアには閏年などの計算方法を持たせる事により、分、時、日、曜日、月、年の複雑なカウンタを使用せずに単純な2進カウンタのみでハードウェアが構成できて経済的な回路構成とすることができる。
【0015】
2進カウンタは32ビットあれば、クロック単位が1秒の場合には、136年のカウントが可能であり、このことからもハードウェアは簡単にできることがわかる。
【0016】
以上のように、本発明は、分、時、日、曜日、月、年の複雑な補正処理を、ソフトウェアにて行い、カウンタは単純な2進カウンタを備えるだけでよく、源振のクロックの精度が悪くても補正により精度を保つことが可能となるので、ハードウェアのコストを低く押さえられる。
【0017】
【発明の実施の形態】
図1は、本発明の第1の実施形態を示すブロック図である。図1において、CPU1はCPUバス7を通して、プログラムが格納されているROM3、一時的に情報を格納するRAM2、及び時刻をカウントする単純2進カウンタ4と接続されている。
【0018】
2進カウンタ4には、1秒単位のクロック8が入力されている。また、CPU1は、通信用カード5を介して、上位装置6から通信回線12を経由して送られて来る時刻校正信号を受け取る事ができる。また、CPU1は通信用カード5から通信回線12を経由して時刻を上位装置6に報告する事ができる。
【0019】
次に、本実施の形態の動作について図1を参照して説明する。
【0020】
図1の回路に電源が投入された時点で、CPU1及び2進カウンタ4にはリセットがかかり、CPU1は初期化、2進カウンタ4はクリアされる。上位装置6より通信回線12を通して時刻設定信号が入力される。このときの値は現在の時刻(校正時刻Y1)を示している。
【0021】
CPU1はこの校正時刻Y1を受け取ると直ちに2進カウンタ4の値を読みとる。このときの2進カウンタ4の値をT1とする。そしてCPU1はこの校正時刻Y1とカウント値T1をRAM2に記憶する。
【0022】
次に、上位装置6に時刻報告をする場合(このときの時刻をY1aとする)、2進カウンタ4のカウント値を読みとる。このときの2進カウンタ4の値をT1aとする。CPU1は、読み取ったカウント値T1aとRAM2に記憶しているカウント値T1とから、T1a−T1=aを求め、記憶している校正時刻Y1にa(秒)を加算し、該加算結果から、分、時、日、曜日、月、年をカレンダー計算プログラムにより計算して時刻(Y1a)を報告する。
【0023】
カレンダー計算プログラム即ちソフトウェアは、60秒を1分、60分を1時間、24時間を1日、7日を1週間、30日(小の月 4,6,9,11月、2月は閏年が29日それ以外は28日)または31日(大の月 1,3,5,6,7,8,10,12)を1ヶ月、12ヶ月を1年、4で割れる年は閏年、但し100で割れる年は閏年で無い、但し400で割れる年は閏年とするように構成されており、CPU1は、このソフトウェアにより分、時、日、曜日、月、年を求める。
【0024】
その後、CPU1が上位装置6から2回目の時刻補正(校正時刻Y2)を受けると、CPU1は直ちに2進カウンタ4の値を読み出す。このときの2進カウンタ4の値をT2とする。
【0025】
CPU1は、今回受信した校正時刻Y2及び読み出したカウント値T2と、RAM2に記憶している前回の校正時刻Y1及びカウント値T1とから、c=Y2−Y1、b=T2−T1を求め、さらにcとbとの差z(z=c−b)を求める。
【0026】
校正時刻Y1,Y2は正確な時刻であるので、zが0でなければ、2進カウンタ4はb秒当たりz秒の誤差を生じていることになる。CPU1は、以降の時刻計算において、この差zを、2進カウンタ4のb秒当たりの誤差補正値として使用する。
【0027】
なお、2回目の時刻補正を受けたことにより、今後の時刻計算はY2、T2が基準となるので、校正時刻及びカウント値として記憶されていたY1及びT1はY2及びT2に更新される。
【0028】
さらにその後、時刻報告をする場合、上記と同じように時刻を求めるが、その都度上記の誤差補正をする事により精度の高い時刻を表示する事ができる。
【0029】
例えば、最初の校正時刻Y1が2000年2月1日13時00分、そのときの2進カウンタ4のカウント値T1が10000、2回目の校正時刻Y2が2000年2月2日13時00分、そのときの2進カウンタ4のカウント値T2が96412とすれば、c=24時間(86400秒)、b=86412秒、z=12秒となる。つまりクロック8の誤差は24時間に12秒進んでいる事になるので、CPU1は、以後時刻報告の時に時間当たり0.5秒遅らせた時刻を報告する。
【0030】
図2は、本発明の第2の実施形態を示すブロック図である。本実施の形態は、クロック源としてVCO(電圧制御発振器)9を用いたことを特徴とする。
【0031】
即ち本実施の形態では、CPU1は、2回目の校正時刻を受けたときに求めた上記誤差zを、レジスタ11にセットし、レジスタ11の値をD/A変換器10にてアナログの電圧に変換してVCO9の周波数補正に用いる。
【0032】
本実施の形態によれば、源振のクロック発振器は、誤差電圧が入力されるVCO9により発振周波数が校正され、源振のクロック周波数の精度を上げることが出来るので、第1の実施形態のように時刻報告毎に補正をしなくても良くなる。
【0033】
なお、実施例では、2進カウンタに入力されるクロックを秒単位として説明したが、2進カウンタの桁数を多くして、クロックの単位を小さく、たとえば10mSにすれば分解能10mSの時計とすることができる。
【0034】
【発明の効果】
本発明によれば、時計の源振の精度として高精度のクロックを用いる必要がなく、かつハードウェアとしては単純2進カウンタのみを用いて秒、分、時、日、曜日、月、年を表示する精度の高いカレンダー付き時計を低コストで実現することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態を示すブロック図である。
【図2】本発明の第2の実施形態を示すブロック図である。
【符号の説明】
1 CPU
2 RAM
3 ROM
4 2進カウンタ
5 通信用カード
6 上位装置
7 バス
8 クロック
9 VCO(電圧制御発振器)
10 D/A変換器
11 レジスタ
12 通信回線
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a clock with a calendar combining a simple binary counter and software.
[0002]
[Prior art]
As described in Japanese Patent Publication No. 58-3231, for example, a clock with a normal calendar is provided by a combination of counters that exclusively count seconds, minutes, hours, days, days of the week, months, and years using a dedicated IC. Be composed. In this case, since the day, month, and year are leap years, a considerably complicated correction circuit is required.
[0003]
JP-A-63-268058 discloses a one-chip microcomputer provided with a clock function circuit block to which backup power is supplied, and writes data indicating the date and time when the main power is cut off to a storage unit. There is described a clock function circuit incorporating a perpetual calendar function that reads out the power-off date and time data stored in the storage unit when the power supply is turned on, and calculates the current date and time by the arithmetic processing unit of the microcomputer. I have.
[0004]
[Problems to be solved by the invention]
According to the clock function circuit described in the above-mentioned Japanese Patent Application Laid-Open No. 63-268058, it is necessary to configure a clock with a calendar by a combination of counters for exclusively counting seconds, minutes, hours, days, days of the week, months, and years. However, the configuration can be simplified, but it is necessary to use a high-precision oscillator as a clock source input to the counter.
[0005]
That is, when configuring a timepiece, the accuracy of the source oscillation of the clock becomes a problem. For example, if an attempt is made to make a clock with a one-month error of less than one second, the accuracy of the source oscillation must be suppressed to within 0.3 ppm, and an expensive source oscillation is required.
[0006]
An object of the present invention is to eliminate the need for using a high-precision clock as the precision of the clock oscillation, and to use only a simple binary counter as hardware to count seconds, minutes, hours, days, days of the week, months, and years. An object of the present invention is to configure a clock with a calendar with high display accuracy.
[0007]
[Means for Solving the Problems]
The present invention provides a clock source, a binary counter for counting clocks from the clock source, a CPU, a ROM for storing a program executed by the CPU, a RAM for temporarily storing information, and a host device. A communication card for performing communication between the communication card and the binary counter, the ROM, the RAM, and a bus connecting the communication card and the CPU; Means for storing, in the RAM, the calibration time inputted by the user and the reference count value read from the binary counter at the time when the calibration time is inputted, when outputting the time information, The elapsed time from the calibration time is calculated by comparing the read count value of the binary counter with the reference count value, and the calendar based on the elapsed time is calculated. By executing the calculation program, second, minute, hour, day, week, characterized in that it comprises a means for outputting the time information to calculate the month and year.
[0008]
When the calendar clock of the present invention first starts operating, the binary counter indicates a certain value. When the current year, month, day of the week, day, hour, minute, and second (this calibration time is Y1) are input to the CPU from the host device via the communication card for clock calibration, the CPU Is read, and the calibration time Y1 and the count value T1 are stored in the RAM.
[0009]
Thereafter, the CPU calculates Yp = Y1 + (Tp-T1) from the current time (Yp) from the current binary counter value (Tp) and the calibration time Y1 and the count value T1 that can be stored in the RAM. Can be obtained.
[0010]
Then, when the read-out display time (this time is set to Y1a), the CPU reads the value (T1a) of the binary counter at that time, and can know the elapsed time (in seconds) from Y1 by the above calculation. By executing the calendar calculation program, the minute, hour, day, day of the week, month, and year are calculated to obtain and output Y1a.
[0011]
Further, the present invention reads the value T2 of the binary counter at the time of the second calibration time Y2, and if there is a difference between the value of Y2-Y1 and the value of T2-T1, this difference is read by the binary counter. It is characterized in that the error is corrected by reading out using the error information at the time of the subsequent time display.
[0012]
Particularly, in the communication system, the time can be calibrated periodically from the host device, so that the above error can be obtained every time calibration, and the clock is always corrected to the correct time even if the accuracy of the clock source vibration is poor. Can do things.
[0013]
The timepiece with calendar according to the present invention reads the time infrequently, and is effective for a device or the like in which the power of the circuit is always on. For example, when this device is a communication device, it is necessary to report a communication record to a higher-level device. In this case, the CPU needs to know the time at that time every time communication is performed. The communication contents and the time at that time are stored, and the communication is recorded at the upper station by reporting to the upper station later. be able to.
[0014]
When the frequency of reading the time is low in this manner, this complicated correction processing may be performed by software every time communication is performed, and by providing the CPU software with a calculation method such as a leap year, The hardware can be configured only with a simple binary counter without using complicated counters for minutes, hours, days, days of the week, months, and years, and an economical circuit configuration can be achieved.
[0015]
If the binary counter has 32 bits, and the clock unit is 1 second, it is possible to count 136 years, which indicates that the hardware can be simplified.
[0016]
As described above, according to the present invention, the minute, hour, day, day of the week, month, and year complex correction processes are performed by software, and the counter need only include a simple binary counter. Even if the accuracy is low, the accuracy can be maintained by the correction, so that the hardware cost can be kept low.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram showing a first embodiment of the present invention. In FIG. 1, a CPU 1 is connected via a CPU bus 7 to a ROM 3 for storing programs, a RAM 2 for temporarily storing information, and a simple binary counter 4 for counting time.
[0018]
The binary counter 4 receives a clock 8 in units of one second. Further, the CPU 1 can receive the time calibration signal transmitted from the host device 6 via the communication line 12 via the communication card 5. Further, the CPU 1 can report the time from the communication card 5 to the host device 6 via the communication line 12.
[0019]
Next, the operation of the present embodiment will be described with reference to FIG.
[0020]
When the circuit of FIG. 1 is turned on, the CPU 1 and the binary counter 4 are reset, the CPU 1 is initialized, and the binary counter 4 is cleared. A time setting signal is input from the host device 6 through the communication line 12. The value at this time indicates the current time (calibration time Y1).
[0021]
Upon receiving the calibration time Y1, the CPU 1 reads the value of the binary counter 4 immediately. The value of the binary counter 4 at this time is defined as T1. Then, the CPU 1 stores the calibration time Y1 and the count value T1 in the RAM 2.
[0022]
Next, when the time is reported to the host device 6 (the time at this time is Y1a), the count value of the binary counter 4 is read. The value of the binary counter 4 at this time is defined as T1a. The CPU 1 obtains T1a−T1 = a from the read count value T1a and the count value T1 stored in the RAM 2, adds a (second) to the stored calibration time Y1, and, based on the addition result, The minute, hour, day, day of the week, month, and year are calculated by the calendar calculation program, and the time (Y1a) is reported.
[0023]
The calendar calculation program or software uses 60 seconds for 1 minute, 60 minutes for 1 hour, 24 hours for 1 day, 7 days for 1 week, 30 days (for small months 4, 6, 9, November, February, leap year But 29 days, otherwise 28 days) or 31 days (Large months 1,3,5,6,7,8,10,12) for 1 month, 12 months for 1 year, 4 for leap year, A year that is divisible by 100 is not a leap year. However, a year that is divisible by 400 is a leap year, and the CPU 1 obtains minutes, hours, days, days of the week, months, and years using this software.
[0024]
Thereafter, when the CPU 1 receives the second time correction (calibration time Y2) from the host device 6, the CPU 1 immediately reads the value of the binary counter 4. The value of the binary counter 4 at this time is defined as T2.
[0025]
The CPU 1 obtains c = Y2-Y1 and b = T2-T1 from the calibration time Y2 received this time and the read count value T2, and the previous calibration time Y1 and count value T1 stored in the RAM2. A difference z (z = c−b) between c and b is obtained.
[0026]
Since the calibration times Y1 and Y2 are accurate times, if z is not 0, the binary counter 4 has an error of z seconds per b seconds. The CPU 1 uses this difference z as an error correction value per b seconds of the binary counter 4 in subsequent time calculations.
[0027]
It should be noted that since the second time correction is performed, the future time calculation is based on Y2 and T2, so that Y1 and T1 stored as the calibration time and the count value are updated to Y2 and T2.
[0028]
Further, when reporting the time thereafter, the time is obtained in the same manner as described above, but by performing the above-described error correction each time, a highly accurate time can be displayed.
[0029]
For example, the first calibration time Y1 is 13:00 on February 1, 2000, and the count value T1 of the binary counter 4 at that time is 10000, and the second calibration time Y2 is 13:00 on February 2, 2000. If the count value T2 of the binary counter 4 at that time is 96412, c = 24 hours (86400 seconds), b = 86412 seconds, and z = 12 seconds. That is, since the error of the clock 8 is advanced by 12 seconds to 24 hours, the CPU 1 reports a time delayed by 0.5 seconds per hour thereafter when reporting the time.
[0030]
FIG. 2 is a block diagram showing a second embodiment of the present invention. This embodiment is characterized in that a VCO (voltage controlled oscillator) 9 is used as a clock source.
[0031]
That is, in the present embodiment, the CPU 1 sets the error z obtained when the second calibration time is received in the register 11, and converts the value of the register 11 into an analog voltage by the D / A converter 10. The converted data is used for the frequency correction of the VCO 9.
[0032]
According to the present embodiment, the oscillation frequency of the clock oscillator of the source oscillation is calibrated by the VCO 9 to which the error voltage is input, and the accuracy of the clock frequency of the oscillation source can be improved. It is not necessary to make correction every time report.
[0033]
In the embodiment, the clock input to the binary counter is described in units of seconds. However, if the number of digits of the binary counter is increased and the unit of the clock is reduced, for example, if the clock is set to 10 mS, the clock has a resolution of 10 mS. be able to.
[0034]
【The invention's effect】
According to the present invention, it is not necessary to use a high-precision clock as the accuracy of the clock source oscillation, and the second, minute, hour, day, day of the week, month, and year are calculated using only a simple binary counter as hardware. A calendar-equipped watch with high display accuracy can be realized at low cost.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is a block diagram showing a second embodiment of the present invention.
[Explanation of symbols]
1 CPU
2 RAM
3 ROM
4 Binary counter 5 Communication card 6 Host device 7 Bus 8 Clock 9 VCO (voltage controlled oscillator)
10 D / A converter 11 Register 12 Communication line

Claims (3)

クロック源と、該クロック源からのクロックをカウントする2進カウンタと、CPUと、該CPUが実行するプログラムを格納するROMと、一時的に情報を格納するRAMと、上位装置との間で通信を行うための通信用カードと、前記の2進カウンタ、ROM、RAM、及び通信用カードと前記CPUとを接続するバスを備え、
前記CPUは、上位装置から前記通信用カードを介して入力された校正時刻と該校正時刻が入力された時点で前記2進カウンタから読み出した基準カウント値とを前記RAMに記憶する手段と、時刻情報を出力する際に、該時刻情報出力時点で読み出した前記2進カウンタのカウント値と前記基準カウント値とを比較することにより前記校正時刻からの経過時間を算出し、該経過時間に基づいてカレンダー計算プログラムを実行することにより、秒、分、時、日、曜日、月及び年を計算して時刻情報として出力する手段と、前記上位装置から2回目以降の校正時刻が入力されたときに、該校正時刻が入力された時点の前記2進カウンタの値を読込むとともに、前記RAMに記憶されている前回の校正時刻及び2進カウンタのカウント値と今回の校正時刻及び2進カウンタのカウント値との差をそれぞれ求め、両者の差が不一致のとき、その差を前記2進カウンタの精度上の誤差として検出し、以降の時刻表示の時に、この誤差情報を用いて前記出力する時刻情報を補正する手段とを備えていることを特徴とする2進カウンタを使用したカレンダー付き時計。
A clock source, a binary counter for counting clocks from the clock source, a CPU, a ROM for storing a program executed by the CPU, a RAM for temporarily storing information, and communication between the host device A communication card for performing the above, a binary counter, ROM, RAM, and a bus connecting the communication card and the CPU,
Means for storing, in the RAM, a calibration time input from the host device via the communication card and a reference count value read from the binary counter at the time when the calibration time is input; When outputting information, the elapsed time from the calibration time is calculated by comparing the count value of the binary counter read at the time information output time point with the reference count value, and based on the elapsed time. Means for calculating seconds, minutes, hours, days, days of the week, months and years by executing a calendar calculation program, and outputting the same as time information; and when a second or subsequent calibration time is input from the higher-level device. Read the value of the binary counter at the time when the calibration time was input, and read the previous calibration time and the count value of the binary counter stored in the RAM and the current time. The difference between the calibration time and the count value of the binary counter is obtained. If the difference between the two does not match, the difference is detected as an error in the accuracy of the binary counter. Means for correcting the time information to be output using the calendar. A clock with a calendar using a binary counter.
前記CPUは、前記上位装置から2回目以降の校正時刻が入力されたときに、該校正時刻が入力された時点の前記2進カウンタの値を読込むとともに、前記RAMに記憶されている前回の校正時刻及び2進カウンタのカウント値を、今回の校正時刻及び2進カウンタのカウント値によって更新する手段を備えていることを特徴とする請求項1記載のカレンダー付き時計。The CPU reads the value of the binary counter at the time when the calibration time is input when the second or subsequent calibration time is input from the higher-level device, and reads the previous calibration time stored in the RAM. 2. The clock with a calendar according to claim 1, further comprising means for updating the time and the count value of the binary counter with the current calibration time and the count value of the binary counter . 電圧制御発振器によって構成されたクロック源と、該クロック源からのクロックをカウントする2進カウンタと、CPUと、該CPUが実行するプログラムを格納するROMと、一時的に情報を格納するRAMと、上位装置との間で通信を行うための通信用カードと、レジスタと、該レジスタに蓄積さ れたデータをアナログ電圧に変換して前記電圧制御発振器に制御電圧として出力するD/A変換器と、前記の2進カウンタ、ROM、RAM、通信用カード、及びレジスタと前記CPUとを接続するバスを備え、
前記CPUは、前記上位装置から前記通信用カードを介して入力された校正時刻と、該校正時刻が入力された時点で前記2進カウンタから読み出した基準カウント値とを前記RAMに記憶し、時刻情報を出力する際に、該時刻情報出力時点で読み出した前記2進カウンタのカウント値と前記基準カウント値とを比較することにより前記校正時刻からの経過時間を算出し、該経過時間に基づいてカレンダー計算プログラムを実行することにより、秒、分、時、日、曜日、月、及び年を計算する手段と、前記RAMに記憶された前記校正時刻及び基準カウント値を前記上位装置から前記校正時刻が入力される毎に更新する手段と、前記上位装置から校正時刻が入力される毎にその時点の前記2進カウンタの値を読込み、該入力された校正時刻と前記RAMに記憶されている校正時刻の間の校正時刻差と該入力時点における前記2進カウンタの値と前記RAMに記憶されている基準カウント値の間のカウント差をそれぞれ求め、さらに前記校正時刻差と前記カウント差の間の誤差を検出して前記レジスタに出力する手段を備えていることを特徴とする2進カウンタを使用したカレンダー付き時計。
A clock source constituted by a voltage controlled oscillator, a binary counter for counting clocks from the clock source, a CPU, a ROM for storing a program executed by the CPU, a RAM for temporarily storing information, A communication card for performing communication with a host device, a register, a D / A converter for converting data stored in the register into an analog voltage and outputting the analog voltage as a control voltage to the voltage controlled oscillator; A bus connecting the binary counter, the ROM, the RAM, a communication card, and a register to the CPU;
The CPU stores, in the RAM, a calibration time input from the higher-level device via the communication card, and a reference count value read from the binary counter at the time when the calibration time is input. When outputting information, the elapsed time from the calibration time is calculated by comparing the count value of the binary counter read at the time information output time point with the reference count value, and based on the elapsed time. Means for calculating seconds, minutes, hours, days, days of the week, months, and years by executing a calendar calculation program, and the calibration time and reference count value stored in the RAM from the host device to the calibration time. Means for updating every time a calibration time is input from the host device, and reading the value of the binary counter at that time each time a calibration time is input from the higher-level device, and A calibration time difference between the calibration times stored in the RAM and a count difference between the value of the binary counter at the input time and the reference count value stored in the RAM are obtained. A clock with a calendar using a binary counter, comprising means for detecting an error between the count and the count difference and outputting the error to the register .
JP2000103969A 2000-04-05 2000-04-05 Clock with calendar using binary counter Expired - Fee Related JP3546427B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000103969A JP3546427B2 (en) 2000-04-05 2000-04-05 Clock with calendar using binary counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000103969A JP3546427B2 (en) 2000-04-05 2000-04-05 Clock with calendar using binary counter

Publications (2)

Publication Number Publication Date
JP2001289981A JP2001289981A (en) 2001-10-19
JP3546427B2 true JP3546427B2 (en) 2004-07-28

Family

ID=18617593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000103969A Expired - Fee Related JP3546427B2 (en) 2000-04-05 2000-04-05 Clock with calendar using binary counter

Country Status (1)

Country Link
JP (1) JP3546427B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4645720B2 (en) 2008-09-30 2011-03-09 ブラザー工業株式会社 Electronics
JP7046320B2 (en) * 2018-08-31 2022-04-04 株式会社安川電機 Industrial equipment control device and industrial equipment data collection system

Also Published As

Publication number Publication date
JP2001289981A (en) 2001-10-19

Similar Documents

Publication Publication Date Title
CN104749947B (en) The adquisitiones of electronic equipment and date-time information
US4708491A (en) Time of day clock
JP2007078405A (en) Timing program of software timepiece
JP3584042B2 (en) Receiver with clock function and time adjustment method
JPH03218494A (en) Clock with automatic correction of time accuracy
CN111831056A (en) Real-time clock calibration module and method and real-time clock chip
JP2000199792A (en) Time piece and time correction method
JP3546427B2 (en) Clock with calendar using binary counter
US4502790A (en) Electronic timepiece
US7474651B2 (en) Radio wave correction clock
JP3160137B2 (en) Radio-controlled clock
JPS6015905B2 (en) electronic clock
CN106444966B (en) A kind of real-time clock RTC adjustment device and method
JPH06342088A (en) Timing method, semiconductor device and timer
US10466655B1 (en) Electronic timepiece and control method of electronic timepiece
CN112286039A (en) Clock calibration method and device and readable storage medium
JP2013061258A (en) Analog electronic clock
EP0511573A2 (en) Clock with clock adjusting data memory
JP2005140595A (en) Radio controlled timepiece and time correcting method therefor
JP2002181968A (en) Time timer
JP3990331B2 (en) Time correction control circuit, time correction control method, and time correction control program
KR200212557Y1 (en) Standard time collection device for personal computer
JP2005257494A (en) Timepiece accuracy correction control device and watt-hour meter
JPH08285970A (en) Electronic timepiece
WO1999038053A1 (en) Time measurement device

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040322

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040404

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080423

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090423

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100423

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110423

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120423

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120423

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140423

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees