Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPS6348351B2 - - Google Patents
[go: Go Back, main page]

JPS6348351B2 - - Google Patents

Info

Publication number
JPS6348351B2
JPS6348351B2 JP58099711A JP9971183A JPS6348351B2 JP S6348351 B2 JPS6348351 B2 JP S6348351B2 JP 58099711 A JP58099711 A JP 58099711A JP 9971183 A JP9971183 A JP 9971183A JP S6348351 B2 JPS6348351 B2 JP S6348351B2
Authority
JP
Japan
Prior art keywords
year
counting means
digit
leap
bit
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
Application number
JP58099711A
Other languages
Japanese (ja)
Other versions
JPS59224590A (en
Inventor
Norio Harada
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP58099711A priority Critical patent/JPS59224590A/en
Publication of JPS59224590A publication Critical patent/JPS59224590A/en
Publication of JPS6348351B2 publication Critical patent/JPS6348351B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G3/00Producing timing pulses
    • G04G3/02Circuits for deriving low frequency timing pulses from pulses of higher frequency

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electric Clocks (AREA)

Description

【発明の詳細な説明】 (イ) 産業上の利用分野 本発明は、電子時計等に用いられ、うるう年と
平年とを検出し、自動的に2ケ月に於ける日付変
化を修正するためのうるう年検出方法に関する。
[Detailed Description of the Invention] (a) Field of Industrial Application The present invention is used in electronic watches, etc., to detect leap years and normal years, and to automatically correct date changes in two months. Regarding detection method.

(ロ) 従来技術 一般に、カレンダ機能を内蔵する電子時計に於
いては、月計数回路の計数内容を検出し、日計数
回路の計数値を変えることにより、大の月と小の
月の末日の無修正化を実現している。しかし、2
月は、平年とうるう年によつて日数が異なるた
め、完全な自動カレンダを実現するためには、年
計数回路を設け、この年計数回路の計数値からう
るう年か平年かを判別しなければならない。ちな
みに、西暦1600年から現在に至るまで採用されて
いるグレゴリオ暦によると、うるう年は、西暦年
号を4で割つて、割り切れる年であるが、100で
割り切れる年はうるう年とせず、また、100で割
り切れても400で割り切れる年はうるう年として
いる。従つて、1904年から2096年までは完全に4
年毎にうるう年となる。
(b) Prior art In general, electronic watches with a built-in calendar function detect the count contents of the month counting circuit and change the count value of the day counting circuit to determine the last day of the major month and the minor month. It has been made uncensored. However, 2
The number of days in a month differs depending on whether it is a normal year or a leap year, so in order to realize a completely automatic calendar, it is necessary to provide a year counting circuit and determine whether it is a leap year or a normal year from the count values of this year counting circuit. By the way, according to the Gregorian calendar, which has been used from 1600 to the present, leap years are years that are divisible by dividing the name of the year by 4, but years that are divisible by 100 are not considered leap years, and years that are divisible by 100 are not considered leap years. Years that are evenly divisible by 400 are considered leap years. Therefore, from 1904 to 2096, there were completely 4
Every year is a leap year.

そこで、従来は、年計数回路の他に、年計数回
路と同期する4進計数回路を設ける方法と、年計
数回路の10位桁が0又は偶数のとき、1位桁が
0,4,8のときを検出し、10位桁が奇数のとき
は、1位桁が2,6のときを検出する方法とが採
用されている。しかし、前者の方法では、4進計
数回路が余分に必要であり、また、後者の方法で
は、検出ゲートを多数必要となるため、共に集積
回路化する場合、素子数が増大しチツプ面積が大
きくなり不利である。また、電子時計をCPU(セ
ントラル・プロセツシング・ユニツト)を用い
て、プログラムによつて構成する場合には、前者
の方法では、4進計数値を記憶しておくRAMの
領域が余分に必要であり、また、後者の方法で
は、検出のための命令数が多数となり、プログラ
ムステツプ数が増大する欠点がある。
Therefore, conventionally, in addition to the year counting circuit, there is a method of providing a quaternary counting circuit that synchronizes with the year counting circuit, and a method in which when the 10th digit of the year counting circuit is 0 or an even number, the 1st digit is 0, 4, 8. , and when the 10th digit is an odd number, the first digit is 2 or 6. However, the former method requires an extra quaternary counting circuit, and the latter method requires a large number of detection gates, so when both are integrated into an integrated circuit, the number of elements increases and the chip area becomes large. It is disadvantageous. Furthermore, when configuring an electronic clock using a program using a CPU (Central Processing Unit), the former method requires an extra RAM area to store the quaternary count value. Moreover, the latter method has the disadvantage that the number of instructions for detection increases, and the number of program steps increases.

(ハ) 発明の目的 本発明は、上述した点に鑑みて為されたもので
あり、4進計数手段を構成することなく、また、
年計数手段の計数内容を検出する回数を減少する
ことにより、構成、特にCPU方式の電子時計の
プログラム、を簡単とすることを目的とする。
(c) Purpose of the invention The present invention has been made in view of the above points, and does not require a quaternary counting means.
The purpose is to simplify the configuration, especially the program of a CPU-type electronic clock, by reducing the number of times the count contents of the year count means are detected.

(ニ) 発明の構成 本発明は、月計数手段からのキヤリーを計数す
る1年桁計数手段と、該1年桁計数手段からのキ
ヤリーを計数する10年桁計数手段とを有し、10年
桁計数手段のBCDデータの最下位ビツトが「0」
又は「1」のいずれであるかを判定し、一方の場
合には前記1年桁計数手段のBCDデータに所定
数値を加算手段により加算し、その加算結果の下
位2ビツトを検出手段により検出し、他方の場合
には、前記1年桁計数手段のBCDデータの下位
2ビツトを前記検出手段で検出し、前記検出手段
が所定値を検出したときをうるう年とする構成で
ある。
(d) Structure of the Invention The present invention has a 1-year digit counting means for counting the carries from the monthly counting means, and a 10-year digit counting means for counting the carries from the 1-year digit counting means. The least significant bit of the BCD data of the digit counting means is “0”
or "1", and in one case, a predetermined value is added to the BCD data of the one-year digit counting means by an addition means, and the lower two bits of the addition result are detected by a detection means. In the other case, the lower two bits of the BCD data of the one-year digit counting means are detected by the detecting means, and the time when the detecting means detects a predetermined value is determined as a leap year.

(ホ) 実施例 前述した如く、1904年から2096年までは、うる
う年は4年毎である。そこで、年計数手段のデー
タから4進、即ち、2ビツト以上のバイナリーデ
ータを作れば良いのであるが、通常、年計数手段
はBCD(2進化10進法)で現わされており、その
ままではバイナリーデータは作れない。ところ
が、数字4と数字10の最小公倍数20に着目する
と、西暦年号1900年から2099年までは、1900+20
×a+b(a=0,1…9、b=0,1…19)と
表わされる。即ち、1900+20×aは4の倍数であ
るから、数値bが4の倍数のとき、うるう年とな
るのであり、この20進数である数値bをバイナリ
ーで求めれば良いのである。要すれば、西暦年号
の10桁目が数字0あるいは偶数の年は、1桁目の
数字がbであり、10桁目が奇数の年は1桁目の数
字に数値10を加算したものが数値bとなる。
(E) Example As mentioned above, from 1904 to 2096, leap years occurred every four years. Therefore, it would be better to create quaternary data, that is, binary data of 2 bits or more, from the data of the year counting means, but the year counting means is usually expressed in BCD (binary coded decimal system), and it is not possible to do so as is. Binary data cannot be created. However, if we focus on the least common multiple of numbers 4 and 10, which is 20, from the Western calendar year 1900 to 2099, it is 1900 + 20.
It is expressed as xa+b (a=0, 1...9, b=0, 1...19). In other words, since 1900+20×a is a multiple of 4, it is a leap year when the number b is a multiple of 4, and the number b, which is a 20-decimal number, can be found in binary. In other words, in years where the 10th digit of the Western calendar is a 0 or an even number, the first digit is b, and in years where the 10th digit is an odd number, the number 10 is added to the first digit. becomes the numerical value b.

第1図は、本発明の実施例を示すブロツク図で
あり、上述した原理に基いて、構成されたもので
ある。第1図に於いて、1年桁計数手段1及び10
年桁計数手段2は、共に4ビツトから構成された
10進のBCDカウンタであり、1年桁計数手段1
は、月計数手段(図示せず)からのキヤリーCM
を入力として計数し、10年桁計数手段2は、1年
桁計数手段1からのキヤリーを計数する。年代記
憶用フラグ3は、10年桁計数手段2からのキヤリ
ーによつてセツトされ、リセツト状態では1900年
代を示し、セツト状態では2000年代を示す。これ
ら1年桁計数手段1、10年桁計数手段2、及び、
年代記憶用フラグ3の内容は、必要に応じて表示
装置(図示せず)に表示される。このとき、4桁
による年表示とせず、下2桁だけの表示とするな
らば、必ずしも年代記憶用フラグ3を設ける必要
はない。また、電源投入時、あるいは、電池挿入
時に於ける初期設定に於いて、10年桁計数手段2
に数値8を設定し、1年桁計数手段1に数値0を
設定すれば、初期状態に於いて、80年が設定さ
れ、修正時間が短くて済む。
FIG. 1 is a block diagram showing an embodiment of the present invention, which is constructed based on the principle described above. In Figure 1, 1 year digit counting means 1 and 10
Year digit counting means 2 both consist of 4 bits.
Decimal BCD counter, 1 year digit counting means 1
is the carry C M from the monthly counting means (not shown)
The 10-year digit counting means 2 counts the carries from the 1-year digit counting means 1. The era storage flag 3 is set by the carry from the 10-year digit counting means 2, and indicates the 1900s in the reset state and the 2000s in the set state. These 1 year digit counting means 1, 10 year digit counting means 2, and
The contents of the era storage flag 3 are displayed on a display device (not shown) as necessary. At this time, if the year is not displayed using four digits but only the last two digits are displayed, it is not necessarily necessary to provide the year storage flag 3. In addition, in the initial setting when the power is turned on or when the battery is inserted, the 10-year digit counting means 2
By setting a numerical value of 8 in , and setting a numerical value of 0 in the one-year digit counting means 1, 80 years is set in the initial state, and the correction time can be shortened.

10年桁計数手段2の4ビツトのデータのうち、
最下位ビツトX1は、ビツト判定手段4に印加さ
れ、このビツト判定手段4は、データX1が「0」
であるか「1」であるかを判定する。即ち、10年
桁計数手段2の計数値が0あるいは偶数であれ
ば、最下位ビツトX1は「0」であり、奇数であ
れば「1」である。そして、ビツトX1が「1」
であることが検出されると、ビツト判定手段4
は、加算手段5に加算制御信号ADを出力する。
加算手段5の一方の入力には、被加算データであ
る1年桁計数手段1の各ビツト出力Y1,Y2
Y3,Y4が印加され、また、他方の入力には、加
算データである数値10を示す4ビツトのバイナリ
ーコードが印加されている。この加算手段5は、
加算制御信号ADが印加されたときビツト出力
Y1,Y2,Y3,Y4と数値10との加算を行い、加算
制御信号ADが印加されなかつたときには、ビツ
ト出力Y1,Y2,Y3,Y4に数値10を加算せず、ビ
ツト出力Y1,Y2,Y3,Y4をそのまま出力する。
即ち、加算手段5から出力されるデータB1,B2
B3,B4は、前述した数値bのバイナリーデータ
であり、第2図に示される如く、10年桁計数手段
2及び1年桁計数手段1の内容から20進のバイナ
リーデータが得られるのである。そこで、うるう
年は、数値bを4で割つて割り切れる年、即ち、
数値bが4で割り切れるのは、そのバイナリーデ
ータの下位2ビツトが共に「0」のときである。
従つて、加算手段5の出力データのうち、下位2
ビツト、B1及びB2は、検出手段6に印加され、
共に「0」であるか否かが検出される。検出手段
6は、下位2ビツトB1及びB2が共に「0」であ
ることを検出すると、検出出力OUTを出力して
日計数手段(図示せず)の計数を制御して、2月
の計数を29日までとする。尚、加算手段5に於い
て、数値10を数値6以上のデータY1,Y2,Y3
Y4に加算すると、その結果、5ビツト目にキヤ
リーが生じるが、下位2ビツトだけを判定すれば
良いのでこのキヤリーは無視される。
Of the 4-bit data of 10-year digit counting means 2,
The least significant bit X1 is applied to the bit determining means 4, and this bit determining means 4 determines that the data X1 is "0".
or "1". That is, if the count value of the 10-year digit counting means 2 is 0 or an even number, the least significant bit X1 is "0", and if it is an odd number, it is "1". And bit X 1 is "1"
When it is detected that
outputs the addition control signal AD to the addition means 5.
One input of the addition means 5 receives each bit output Y 1 , Y 2 ,
Y 3 and Y 4 are applied, and a 4-bit binary code indicating the numerical value 10, which is addition data, is applied to the other input. This addition means 5 is
Bit output when addition control signal AD is applied
Y 1 , Y 2 , Y 3 , Y 4 are added to the numerical value 10, and when the addition control signal AD is not applied, the numerical value 10 is added to the bit outputs Y 1 , Y 2 , Y 3 , Y 4 . First, the bit outputs Y 1 , Y 2 , Y 3 , and Y 4 are output as they are.
That is, the data B 1 , B 2 , output from the adding means 5
B 3 and B 4 are the binary data of the numerical value b mentioned above, and as shown in Figure 2, 20-decimal binary data can be obtained from the contents of the 10-year digit counting means 2 and the 1-year digit counting means 1. be. Therefore, a leap year is a year in which the number b is divisible by 4, that is,
The numerical value b is divisible by 4 when the lower two bits of the binary data are both "0".
Therefore, of the output data of the adding means 5, the lower two
The bits B 1 and B 2 are applied to the detection means 6;
It is detected whether both are "0" or not. When the detection means 6 detects that the lower two bits B1 and B2 are both "0", it outputs a detection output OUT, controls the counting of the day counting means (not shown), and calculates the number of days in February. Counting will continue until the 29th. In addition, in the addition means 5, the numerical value 10 is converted into data Y 1 , Y 2 , Y 3 ,
When added to Y4 , a carry occurs at the 5th bit, but this carry is ignored because only the lower two bits need to be determined.

第3図は、CPU方式の電子時計に於いて、第
1図に示された各手段をプログラムによつて達成
した場合の動作を示すフロー図である。
FIG. 3 is a flow diagram showing the operation of a CPU type electronic timepiece when each of the means shown in FIG. 1 is achieved by a program.

CPU方式の電子時計では、秒、分、時、日、
月等の各計数手段は、RAM等の記憶手段内に構
成され、プログラムによつて加算処理等の計時動
作が為される。第1図に示された1年桁計数手段
1、及び10年桁計数手段2も同様にRAM内の所
定アドレスに記憶される。第3図に示されたうる
う年検出プログラムが実行されると、RAM内の
10年桁計数データを読み出し、その最下位ビツト
X1が「1」であるか否かを、ビツト判定命令に
よつて判定する。判定の結果、「1」であれば、
RAM内の1年桁計数データを読み出し、そのデ
ータに数値10をALU(演算処理装置)に於いて加
算し、その加算結果の下位2ビツトB1及びB2
共に「0」であるか否かがビツト判定命令によつ
て判定する。一方、ビツトX1が1でなかつた場
合には、RAM内の1年桁計数データを読み出
し、そのデータの下位2ビツトB1及びB2が共に
「0」であるか否か判定する。ビツト判定命令の
判定の結果、下位2ビツトB1及びB2が共に「0」
であることが検出されると、うるう年であるとし
てうるう年用フラグをセツトし、それ以外ではう
るう年用フラグはセツトされない。このうるう年
検出プログラムは、年1回、例えば、12月31日か
ら1月1日になり、年へのキヤリーが生じたと
き、あるいは、2月28日から翌日に切り換わる時
に実行される。また、2月28日から翌日に切り換
わる場合には、うるう年用フラグを判定し、フラ
グがセツトされている場合には、2月29日に切り
換え、フラグがセツトされていないときには3月
1日に切り換える。
In CPU-based electronic watches, seconds, minutes, hours, days,
Each counting means such as the month is configured in a storage means such as a RAM, and time counting operations such as addition processing are performed by a program. The 1-year digit counting means 1 and the 10-year digit counting means 2 shown in FIG. 1 are similarly stored at predetermined addresses in the RAM. When the leap year detection program shown in Figure 3 is executed, the
Read the 10-year digit count data and read its lowest bit
Whether or not X1 is "1" is determined by a bit determination instruction. If the result of the judgment is "1",
Read the 1-year digit counting data in the RAM, add the number 10 to that data in the ALU (arithmetic processing unit), and check whether the lower 2 bits B1 and B2 of the addition result are both "0". This is determined by the bit determination instruction. On the other hand, if bit X1 is not 1, the one-year digit count data in the RAM is read out, and it is determined whether the lower two bits B1 and B2 of the data are both "0". As a result of the bit judgment instruction, the lower two bits B1 and B2 are both “0”.
If it is detected that it is a leap year, the leap year flag is set; otherwise, the leap year flag is not set. This leap year detection program is executed once a year, for example, when a carry to the year occurs from December 31st to January 1st, or when switching from February 28th to the next day. Also, when switching from February 28th to the next day, the leap year flag is determined, and if the flag is set, it is switched to February 29th, and if the flag is not set, it is switched to March 1st. Switch to .

この様に、第3図の動作によれば、判定命令が
2回と少なくて済み、プログラムステツプ数が減
少する。
In this way, according to the operation shown in FIG. 3, only two determination instructions are required, and the number of program steps is reduced.

上述の実施例では、10年桁計数手段の内容が奇
数のときに1年桁計数手段の内容に数値10を加算
していたが、更に、この実施例を発展させ、偶数
のときに1年桁計数手段の内容に数値10を加算す
る様にしても良く、この場合には、下位2ビツト
が表わす数値が2、即ち、B1が「0」、B2
「1」となつているときをうるう年として検出す
る。
In the above embodiment, when the content of the 10-year digit counting means is an odd number, the value 10 is added to the content of the 1-year digit counting means. The numerical value 10 may be added to the contents of the digit counting means, and in this case, the numerical value represented by the lower two bits is 2, that is, B1 is "0" and B2 is "1". Detects the time as a leap year.

(ヘ) 発明の効果 上述の如く、本発明によれば、計数手段のビツ
トを検出する機構が少なく簡単となり、特に、
CPU方式の電子時計に於いては、うるう年を検
出するためのプログラムステツプ数が短くなり、
他の機能を犠性にすることもなく、機能を向上で
きる利点を有する。
(f) Effects of the invention As described above, according to the present invention, the mechanism for detecting the bits of the counting means is reduced and simplified, and in particular,
In CPU-based electronic clocks, the number of program steps to detect leap years is shortened.
It has the advantage of improving functionality without sacrificing other functionality.

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

第1図は本発明の実施例を示すブロツク図、第
2図は、数値bを示す図、第3図は第1図に示さ
れた実施例をCPU方式の時計で実施する場合の
動作を示すフロー図である。 1…1年桁計数手段、2…10年桁計数手段、3
…年代記憶用フラグ、4…ビツト判定手段、5…
加算手段、6…検出手段。
Fig. 1 is a block diagram showing an embodiment of the present invention, Fig. 2 is a diagram showing the numerical value b, and Fig. 3 shows the operation when the embodiment shown in Fig. 1 is implemented in a CPU type watch. FIG. 1... 1 year digit counting means, 2... 10 year digit counting means, 3
... era memory flag, 4... bit determination means, 5...
addition means, 6... detection means;

Claims (1)

【特許請求の範囲】[Claims] 1 月計数手段からのキヤリーを計数する1年桁
計数手段と、該1年桁計数手段からのキヤリーを
計数する10年桁計数手段とを有し、前記10年桁計
数手段のBCDデータの最下位ビツトが「0」又
は「1」のいずれであるかを判定し、一方の場合
のみ前記1年桁計数手段のBCDデータに所定数
値を加算手段によつて加算し、その加算結果の下
位2ビツトを検出手段により検出し、また、他方
の場合には前記1年桁計数手段のBCDデータの
下位2ビツトを前記検出手段で検出し、該検出手
段が所定値を検出したときをうるう年とすること
を特徴とするうるう年検出方法。
1 It has a 1-year digit counting means for counting the carries from the 1-year digit counting means, and a 10-year digit counting means for counting the carries from the 1-year digit counting means, and the most recent BCD data of the 10-year digit counting means It is determined whether the lower bit is "0" or "1", and only in one case, a predetermined value is added to the BCD data of the 1-year digit counting means by the addition means, and the lower 2 of the addition result is The bit is detected by the detection means, and in the other case, the lower two bits of the BCD data of the one-year digit counting means are detected by the detection means, and the time when the detection means detects a predetermined value is determined as a leap year. A leap year detection method characterized by:
JP58099711A 1983-06-03 1983-06-03 Detecting method of leap year Granted JPS59224590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58099711A JPS59224590A (en) 1983-06-03 1983-06-03 Detecting method of leap year

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58099711A JPS59224590A (en) 1983-06-03 1983-06-03 Detecting method of leap year

Publications (2)

Publication Number Publication Date
JPS59224590A JPS59224590A (en) 1984-12-17
JPS6348351B2 true JPS6348351B2 (en) 1988-09-28

Family

ID=14254655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58099711A Granted JPS59224590A (en) 1983-06-03 1983-06-03 Detecting method of leap year

Country Status (1)

Country Link
JP (1) JPS59224590A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2350447A (en) * 1999-03-26 2000-11-29 Liang Shamsuddin Ma Time system

Also Published As

Publication number Publication date
JPS59224590A (en) 1984-12-17

Similar Documents

Publication Publication Date Title
JPH0346078B2 (en)
JPS61275948A (en) Data storage device
US4330840A (en) Multi-function electronic digital watch
GB1560130A (en) Electronic timekeeping system
JPS6348351B2 (en)
JP3350005B2 (en) Counter reading control device and control method thereof
US4444512A (en) Method and circuit for comparing the timekeeping state and contents of a register in an electronic reminder giving timepiece
GB2219108A (en) Lunar calendar date computing system
KR830001450B1 (en) Electronic digital multifunction watch
JPH0726761Y2 (en) Data storage
US4468133A (en) Electronic timepiece
JPS6118153B2 (en)
JPS5920995B2 (en) Keisankitsukitokei
JPS6216715Y2 (en)
JPH0720634Y2 (en) Date data storage device
JP2023161717A (en) real time clock module
JPH0697267B2 (en) Alarm clock
JPH0726760Y2 (en) Alarm time data storage device
KR910003420B1 (en) Time setting and error correcting method for fax system
JPH01126588A (en) Electronic timepiece with printing function
JPS5922980B2 (en) Increment/Decrement Circuit for Circular Shift Register
JPS6360873B2 (en)
JP2001289981A (en) Timepiece with calendar using binary counter
JPH0277683A (en) alarm clock
JPS6258191A (en) Schedule display device