JPH01141392A - Elapsed time calculator - Google Patents

Elapsed time calculator

Info

Publication number
JPH01141392A
JPH01141392A JP29901887A JP29901887A JPH01141392A JP H01141392 A JPH01141392 A JP H01141392A JP 29901887 A JP29901887 A JP 29901887A JP 29901887 A JP29901887 A JP 29901887A JP H01141392 A JPH01141392 A JP H01141392A
Authority
JP
Japan
Prior art keywords
month
counter
elapsed time
date
year
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
JP29901887A
Other languages
Japanese (ja)
Inventor
Koichi Matsumura
松村 孝一
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP29901887A priority Critical patent/JPH01141392A/en
Priority to GB8809962A priority patent/GB2205656B/en
Publication of JPH01141392A publication Critical patent/JPH01141392A/en
Priority to US07/462,866 priority patent/US4989025A/en
Priority to US07/583,004 priority patent/US5040006A/en
Priority to GB9108765A priority patent/GB2242753B/en
Priority to GB9108762A priority patent/GB2242991B/en
Priority to GB9108764A priority patent/GB2242752B/en
Priority to GB9108766A priority patent/GB2242992B/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain the always adequate elapsed time by providing a means for correcting the elapsed time which adds the number of days of a reference date to the result of subtraction when the result of the subtraction after the subtraction of the reference date from the present data is negative. CONSTITUTION:A present date counter A includes a present year counter 7, a present month counter 8, a present date counter 9, a leap year deciding circuit 10 and a month-year correcting circuit 11 and counts the present date and month. A reference setting counter B includes a reference year counter 12, a reference month counter 13, a reference date counter 14, a leap year deciding circuit 15, and a month end correcting circuit 16, and sets the reference date which is the basis for calculation of the elapsed time. This reference data setting counter B and a CPU 1 constitute the means for correcting the elapsed time which adds the number of days of the reference month to the result of the subtraction if the result of the subtraction after the subtraction of the reference date from the present date is negative.

Description

【発明の詳細な説明】 [発明の利用分野] この発明は任意の基準日から現在日までの経過日数を自
動的に計算する経過時間計算装置に関し、カメラや時計
などの種々の機器の時刻表示装置等に通用されるもので
ある。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to an elapsed time calculation device that automatically calculates the number of days that have passed from an arbitrary reference date to the current date, and is used to display time on various devices such as cameras and clocks. This is commonly used for equipment, etc.

[発明の背景] カメラのデータ写し込み装置において、従来、基準日か
ら現在日までの経過時間を計算する経過時間計算装置と
いうものが提案されており、該経過時間計算装置は任意
の基準日から現在日までの経過日数を年、月、日の3つ
の表示単位によって自動的に計算することができるよう
に構成されている。
[Background of the Invention] Conventionally, as a camera data imprinting device, an elapsed time calculation device that calculates the elapsed time from a reference date to the current date has been proposed. The system is configured so that the number of days that have passed up to the current date can be automatically calculated using three display units: year, month, and day.

しかし乍ら上記経過時間計算装置では、現在日から基準
日を減算した減算結果が負になった場合は何のことかよ
くわからず、大変不都合なものであった。
However, with the above elapsed time calculation device, if the result of subtracting the reference date from the current date is negative, it is difficult to understand what is going on, which is very inconvenient.

[発明の目的コ この発明の目的は、常に正確な経過時間計算を行うこと
ができる様に改良された経過時間計算装置を提供するこ
とである。
[Object of the Invention] An object of the present invention is to provide an improved elapsed time calculation device that can always perform accurate elapsed time calculations.

[発明の概要] この発明による改良された経過時間計算装置は、現在日
から基準日を減算することによって基準日から現在日ま
での経過時間を計算する経過時間演算手段と該演算手段
により現在日から該基準日を減することによって得られ
る減算結果が負になるような場合には、経過時間から経
過月を1力月減算すると共に該基準日の属する基準月の
該基準日よりあとの日数を経過時間に加算する経過時間
修正手段が設けられていることを特徴とし、さらには、
前記経過時間修正手段は、前記基準月が2月である場合
には該基準月の属する年が“うるう年”であるかないか
を判定することによって前記経過時間に加算する日数を
変化させる手段を有していることを特徴とするものであ
り、以上の構成に基づき常に正確な経過時間計算を行う
ことができ、従って、カメラの写し込みデータの誤りや
時計の経過時間表示の誤りを生ずることを防止すること
ができる。  ・ [発明の実施例] 以下に図面を参照して本発明の詳細な説明する。
[Summary of the Invention] The improved elapsed time calculation device according to the present invention includes an elapsed time calculation means for calculating the elapsed time from the reference date to the current date by subtracting the reference date from the current date; If the subtraction result obtained by subtracting the reference date from is negative, subtract one elapsed month from the elapsed time and calculate the number of days after the reference date in the reference month to which the reference date belongs. It is characterized by being provided with an elapsed time correction means for adding the elapsed time to the elapsed time, and further,
The elapsed time correction means includes means for changing the number of days to be added to the elapsed time by determining whether or not the year to which the reference month belongs is a "leap year" when the reference month is February. Based on the above configuration, it is possible to always accurately calculate the elapsed time, and therefore, it is possible to avoid errors in the data captured by the camera or errors in the display of elapsed time on the clock. It can be prevented. - [Embodiments of the Invention] The present invention will be described in detail below with reference to the drawings.

第1図において、1は本発明装置において経過時間の演
算を行うとともに後述の諸口路における動作シーケンス
を制御するための中央演算処理ユニット(以下にはCP
uと略記する)である。2は発振回路、3は発振回路2
の出力を分周してCl1P 1のCLK端子に所定周期
のクロックパルスを入力する分周回路、4はRAMで構
成されたメモリー、5はROMで構成されたメモリー、
6は分周回路3の出力信号であるクロックパルスを更に
分周して日を表わす日パルスを発生する日パルス発生回
路、である。
In FIG. 1, reference numeral 1 denotes a central processing unit (hereinafter referred to as CP
(abbreviated as u). 2 is an oscillation circuit, 3 is an oscillation circuit 2
A frequency dividing circuit divides the output of Cl1P and inputs a clock pulse of a predetermined period to the CLK terminal of Cl1P1, 4 is a memory composed of RAM, 5 is a memory composed of ROM,
Reference numeral 6 denotes a day pulse generating circuit which further divides the frequency of the clock pulse which is the output signal of the frequency dividing circuit 3 to generate a day pulse representing the day.

なお、4はデータを出し入れするためのメモリーであり
、5はプログラム内容を記憶させたメモリーである。
Note that 4 is a memory for inputting and outputting data, and 5 is a memory in which program contents are stored.

第1図上方の点線で囲まれたブロックAは現在の日付を
カウントする現在日カウンタを構成しており、該ブロッ
クA内には現在年カウンタ7と、現在月カウンタ8と、
現在日カウンタ9と、うるう年判定回路10と、月末修
正回路11と、が含まれている。
Block A surrounded by a dotted line in the upper part of FIG. 1 constitutes a current date counter that counts the current date, and within this block A are a current year counter 7, a current month counter 8,
It includes a current day counter 9, a leap year determination circuit 10, and a month-end correction circuit 11.

現在年カウンタ7は現在の西暦年数の下2桁の数字を表
わす出力を発生し、該出力はcpu tの入力ポートY
φ〜Y5ボートに人力される。
The current year counter 7 generates an output representing the last two digits of the current year, which output is sent to the input port Y of the cpu t.
Powered by φ~Y5 boat.

現在月カウンタ8は現在の月の数字を表わす出力を発生
し、該出力はcpu tのMφ〜M3ポートに入力され
る。
The current month counter 8 produces an output representing the current month number, which output is input to the Mφ-M3 ports of the cpu t.

現在日カウンタ9は現在の日を表わす出力を生じ、該出
力はcpu tのDφ〜D4ボートに入力される。
Current day counter 9 produces an output representing the current day, which output is input to ports Dφ-D4 of cpu t.

うるう年判定回路10は現在年カウンタ7の出力から“
うるう年”を判定する公知の回路である。
The leap year determination circuit 10 determines “ from the output of the current year counter 7.
This is a known circuit that determines whether it is a leap year.

月末修正回路11は現在月カウンタ8の出力及びうるう
年判定回路10の出力から当該月が大の月(31日の月
)が小の月(30日の月)か或いは2月(非うるう年で
は28日、うるう年では29日)であるかを判断し、現
在日カウンタ9に月末修正信号を発生する回路である。
The month-end correction circuit 11 uses the output of the current month counter 8 and the output of the leap year determination circuit 10 to determine whether the current month is a large month (a month with 31 days), a small month (a month with 30 days), or a February (28 days in a non-leap year). This circuit determines whether it is the current day (or the 29th day in a leap year) and generates a month-end correction signal to the current day counter 9.

一方、第1図の右側のブロックBは経過時間計算の基準
となる基準日を設定するための基準日設定カウンタを表
わし、該カウンタには基準年カウンタ12及び基準月カ
ウンタ13並びに基準日カウンタ14のほかに“うるう
年判定回路15及び月末修正回路16などが含まれてい
る。
On the other hand, block B on the right side of FIG. 1 represents a reference date setting counter for setting a reference date that is a reference for elapsed time calculation, and this counter includes a reference year counter 12, a reference month counter 13, and a reference date counter 14. In addition to this, it also includes a leap year determination circuit 15 and a month-end correction circuit 16.

基準年カウンタ12は西暦年数をカウントするカウンタ
であり、基準月カウンタ13は月数をカウントし、基準
日カウンタ14は日数をカウントするカウンタである。
The base year counter 12 is a counter that counts the number of years in the Western calendar, the base month counter 13 counts the number of months, and the base date counter 14 is a counter that counts the number of days.

基準年カウンタ12の出力はcpu tのボートSYφ
〜SY5人力され、基準月カウンタ13の出力は[:P
tl 1のボートSMφ〜SM3に人力される。また、
基準日カウンタ14の出力がcpu iのボートSDφ
〜SD4に、月末修正回路16の出力がCPt11のボ
ートDMφ〜DM4にそれぞれ、入力される。
The output of the base year counter 12 is the boat SYφ of cpu t.
~SY5 is manually operated, and the output of the reference month counter 13 is [:P
Boats SMφ to SM3 of tl 1 are operated manually. Also,
The output of the reference date counter 14 is CPU i's boat SDφ
~SD4, the outputs of the month-end correction circuit 16 are input to the ports DMφ~DM4 of CPt11, respectively.

月末修正回路16はブロックAの月末修正回路11と同
じく基準日カウンタ14のカウント数を修正させる月末
修正信号を発生するほかに、基準月の日数を5ビツトの
情報として発生してcpu tのDMφ〜DM4のボー
トに入力する。
Like the month-end correction circuit 11 of block A, the month-end correction circuit 16 not only generates a month-end correction signal for correcting the count of the reference day counter 14, but also generates the number of days in the reference month as 5-bit information and outputs it to the CPU t's DMφ. ~Input on DM4 boat.

現在年カウンタ7、現在月カウンタ8、現在日カウンタ
9、基準年カウンタ12)基準月カウンタ13、基準日
カウンタ14はデータ修正パルス発生回路17から発生
されたデータ修正パルス信号により制御されるようにな
っており、該回路17はそれに接続されているスイッチ
18が閉じられた時には上記6個のカウンタの一つを選
択し、スイッチ19が閉じられた時には選択されたカウ
ンタに対して修正インクリメントパルスを印加する。
Current year counter 7, current month counter 8, current day counter 9, reference year counter 12) Reference month counter 13 and reference date counter 14 are controlled by a data correction pulse signal generated from a data correction pulse generation circuit 17. The circuit 17 selects one of the six counters when the switch 18 connected to it is closed, and applies a modified increment pulse to the selected counter when the switch 19 is closed. Apply.

第1図の左下のブロックCは基準時点から現在時点まで
の経過時間等を表示するための表示手段を構成しており
、該表示手段にはデコーダ21〜23と表示部24〜2
7とが含まれている。デコーダ21はCPU 1の出力
ポートPHφ〜PH5から発生される経過時間の上位桁
の内容をデコードし、上位桁表示部24内の2桁の各7
セグメントの表示素子を駆動するための駆動素子に対す
る出力を発生する。デコーダ22はcpu tの出力ポ
ートPLφ〜PL4から生じる経過時間の下位2桁の内
容をデコードし、下位桁表示部25内の各桁の7セグメ
ントの表示素子を駆動するための駆動素子に対する出力
を発生する。従って、デコーダ21及び22は表示部2
4及び25の各桁毎に7個ずつの出力ポートSHφ〜5
)16.SLφ〜SL6を有している デコーダ23は経過時間の単位(年、月、日)を表わす
単位表示部26及び27に対する駆動出力を生ずるデコ
ーダであり、cpu tの出力ポートYM/MD CT
RLに生じた出力信号をデコードし、上位単位(年もし
くは月、すなわちyもしくはm)を表わすセグメントの
表示素子を駆動するための駆動素子に対する出力と、下
イ立単位(月もしくは日、すなわちmもしくはd)を表
わすセグメントの表示素子を駆動するための駆動素子に
対する出力と、を3個の出力ポートCφ〜C2から発生
する。
The lower left block C in FIG.
7 is included. The decoder 21 decodes the contents of the upper digits of the elapsed time generated from the output ports PHφ to PH5 of the CPU 1, and decodes each of the two digits in the upper digit display section 24.
Generates an output to a driving element for driving the display element of the segment. The decoder 22 decodes the contents of the lower two digits of the elapsed time generated from the output ports PLφ to PL4 of the CPU t, and outputs an output to the driving element for driving the seven segment display elements of each digit in the lower digit display section 25. Occur. Therefore, the decoders 21 and 22
7 output ports SHφ~5 for each digit of 4 and 25
)16. The decoder 23 having SLφ to SL6 is a decoder that generates a driving output for the unit display sections 26 and 27 representing the unit of elapsed time (year, month, day), and is connected to the output port YM/MD CT of the CPU t.
The output signal generated at RL is decoded, and an output is sent to a driving element for driving a display element of a segment representing an upper unit (year or month, i.e., y or m) and a lower unit (month or day, i.e., m). Alternatively, an output to a driving element for driving the display element of the segment representing segment d) is generated from three output ports Cφ to C2.

第2図は、CPU 1の各入出力ボートのボートアドレ
スと内容、及びメモリーアドレスとの対応を示した表で
ある。
FIG. 2 is a table showing the correspondence between the boat address and contents of each input/output port of the CPU 1 and the memory address.

第3図は基準年と基準月とによって判定される月末修正
回路出力(DM比出力を示した表である。
FIG. 3 is a table showing the month-end correction circuit output (DM ratio output) determined based on the base year and base month.

第4図にCPU i内で実行されるプログラムのフロー
チャートを示す。
FIG. 4 shows a flowchart of a program executed within CPU i.

第5図は、デコーダ23の構成、単位表示部26及び2
7内のセグメントの構成、及び各セグメントとデコーダ
23との電気的接続の概略、を示した図である。
FIG. 5 shows the configuration of the decoder 23, the unit display parts 26 and 2.
7 is a diagram illustrating a configuration of segments in 7 and an outline of electrical connection between each segment and a decoder 23. FIG.

現在年カウンタ7及び現在月カウンタ8並びに現在日カ
ウンタ9の内容と基準年カウンタ12及び基準月カウン
タ13並びに基準日カウンタ14の内容とは常にcpu
 tの入力ポートを介してメ千り−4に取込まれる一方
、メモリー4の内容はcpu tの出力ポートPHφ〜
PH5及びPLφ〜PL5からデコーダ21及び22に
入力されている。
The contents of the current year counter 7, current month counter 8, and current day counter 9, and the contents of the base year counter 12, base month counter 13, and base date counter 14 are always CPU
The contents of memory 4 are taken in to memory 4 through the input port of cpu t, while the contents of memory 4 are transferred to the output port PHφ of cpu t.
It is input to decoders 21 and 22 from PH5 and PLφ to PL5.

次に第1図乃至第5図を参照して本実施例の装置の動作
を説明する。
Next, the operation of the apparatus of this embodiment will be explained with reference to FIGS. 1 to 5.

不図示の電源スィッチが投入されると、CPu1が動作
状態となって第4図のフローチャートに従ってプログラ
ムが実行される。
When a power switch (not shown) is turned on, the CPU 1 becomes operational and a program is executed according to the flowchart of FIG.

第4図において、プログラムがスタートすると、cpu
 iはステップ#01から実行を開始する。すなわち、
メモリー4に格納された現在日(D)もしくは現在日カ
ウンタ9の出力から基準日(SD)を減算することによ
って経過日数(PD)を求める。モして、ステップ#0
2において(PD)の正負を判別し、正であればステッ
プ#06に進み、現在月カウンタ8の出力(M)から基
準月カウンタ13の出力(SM)を減算して経過月数(
PM)を求めた後、ステップ#07に進む。
In Figure 4, when the program starts, the CPU
i starts execution from step #01. That is,
The number of elapsed days (PD) is determined by subtracting the reference date (SD) from the current date (D) stored in the memory 4 or the output of the current date counter 9. Step #0
2, determine whether (PD) is positive or negative, and if it is positive, proceed to step #06, subtract the output (SM) of the standard month counter 13 from the output (M) of the current month counter 8, and calculate the number of elapsed months (
PM), the process proceeds to step #07.

一方、ステップ#02においてPDが負である場合は基
準月の日数(基準日がうるう年の場合は日数として“2
9”を)(DM)を経通日数(PD)に加算するステッ
プ#03に進んだ後、ステップ#04において現在刃M
)から基準月(SM)を減算することによって経過月数
(PM)を求める。そして、更にステップ#05に進み
、上記基準月の日数(DM)を経過日数(PD)に加算
した分の相殺の為に経過月数(PM)から1を減じた後
、ステップ#07に進む。
On the other hand, if PD is negative in step #02, the number of days in the base month (if the base date is a leap year, the number of days is “2”).
After proceeding to step #03 where 9” (DM) is added to the number of days of wear (PD), in step #04 the current blade M
) to find the number of elapsed months (PM) by subtracting the reference month (SM). Then, proceed to step #05, and after subtracting 1 from the number of elapsed months (PM) to offset the addition of the number of days (DM) in the reference month to the number of elapsed days (PD), proceed to step #07. .

ステップ#07では経過月数(PM)の正負が判定され
、(P M )が正である場合はステップ#11に進み
、現在年(Y)から基準年(SY)を減算することによ
って経過年数(P、Y)を求めた後、ステップ#12に
進む。
In step #07, it is determined whether the number of elapsed months (PM) is positive or negative, and if (PM) is positive, the process proceeds to step #11, and the number of elapsed years is calculated by subtracting the reference year (SY) from the current year (Y). After determining (P, Y), proceed to step #12.

一方、経過月数(PM)が負である場合は次のステップ
#08において経過月数(PM)に12を加算した後、
ステップ#09に進む。ステップ#09ではステップ#
11と同じく、現在年(Y)から基準年(SY)を減じ
て経過年数(PY)を求めた後、ステップ#10に進む
。ステップ#10では前記ステップ#5の場合と同様の
手法で経過年数(PY)から1を減じた後ステップ#1
2に進む。
On the other hand, if the number of elapsed months (PM) is negative, in the next step #08, after adding 12 to the number of elapsed months (PM),
Proceed to step #09. In step #09, step #
As in step #11, after subtracting the base year (SY) from the current year (Y) to obtain the number of elapsed years (PY), the process proceeds to step #10. In step #10, 1 is subtracted from the number of years elapsed (PY) using the same method as in step #5, and then step #1
Proceed to step 2.

ステップ#12はステップ#10及び#11で求めた経
過年数(PY)が負であるか否かを判定し、負である場
合にはくこの場合は、基準日が現在日以降に設定されて
いることになる。ステップ#16において経過月数(P
M)冨0、経過日数(PD)−0、と設定された後、ス
テップ#17に移行する。
Step #12 determines whether or not the number of years elapsed (PY) obtained in steps #10 and #11 is negative, and if it is negative, the reference date is set after the current date. There will be. In step #16, the number of months elapsed (P
M) After the value is set to 0 and the number of elapsed days (PD) - 0, the process moves to step #17.

一方、ステップ#12において経過年数(PY3が負で
ないならばステップ#13において(PY)=0である
か否かが判定され、(py)=oであればステップ#1
7に進み、(py)≠0であればステップ#14に進む
、(py)=oの場合及び(py)<oの場合は、ステ
ップ#17において経過時間表示の上位桁(PH)とし
て経通月数(PM)が出力される一方、経過時間表示の
下位桁(PL)として経過日数(PD)が出力される。
On the other hand, if the number of elapsed years (PY3) is not negative in step #12, it is determined in step #13 whether (PY)=0, and if (py)=o, step #1
If (py)≠0, proceed to step #14. If (py)=o or (py)<o, proceed to step #17 as the upper digit (PH) of the elapsed time display. While the number of months (PM) is output, the number of elapsed days (PD) is output as the lower digit (PL) of the elapsed time display.

そして、ステップ#19に進むと、cpt+ iのYM
/MD CTRLボートの出力が”H”(ハイレベル)
になるため、第5図に示すようにデコーダ23の出力端
子CφのレベルはL″ (ロウレベル)、他の2つの出
力端子C1及びC2のレベルはH”となり、従って、単
位表示部26のセグメントは“m(月)”の形状に励起
される一方、単位表示部27のセグメントは“d(日)
″の形状に励起されることになり、経過時間“X月X日
(あるいは“xmxd″)と表示される。
Then, proceeding to step #19, YM of cpt+i
/MD CTRL boat output is “H” (high level)
As shown in FIG. is excited to the shape of "m (month)", while the segment of the unit display section 27 is excited to the shape of "d (day)"
", and the elapsed time is displayed as "X month, X day (or "xmxd").

一方、ステップ#13において経過年数(PY)≠0と
判定された場合にはステップ#14において経過時間表
示の上位桁(PH)として経過年数(PY)を、また、
経過時間表示の下位桁(PL)として経過月数(PM)
を、それぞれ表示するように指示される。次いでステッ
プ#18に移行すると、cpo tのYM/MD CT
RLポートの出力レベルがL″ (ロウレベル)になる
ので第5図に示すようにデコーダ23の3個の出力端子
のうちCφ端子及びC1端子の出力レベルが′H″ (
ハイレベル)となり、その結果、単位表示部26のセグ
メントは“y(年)゛の形状に点灯され、単位表示部2
7のセグメントはm(月)”の形状に点灯される。従っ
て、経過時間は“X月Xケ月” (又はxyxm”)と
表示される。
On the other hand, if it is determined in step #13 that the number of elapsed years (PY)≠0, the number of elapsed years (PY) is set as the upper digit (PH) of the elapsed time display in step #14, and
The number of months elapsed (PM) as the lower digit (PL) of the elapsed time display
, respectively. Next, when moving to step #18, YM/MD CT of cpot
Since the output level of the RL port becomes L'' (low level), the output level of the Cφ terminal and C1 terminal among the three output terminals of the decoder 23 becomes 'H'' (low level), as shown in FIG.
As a result, the segment of the unit display section 26 is lit in the shape of "y (year)", and the unit display section 26 is lit in the shape of "y (year)".
The segment No. 7 is lit in the shape of "m (month)". Therefore, the elapsed time is displayed as "X months, X months" (or xyxm).

なお、現在日を表わす各カウンタ7〜9には相互にキャ
リーインとキャリーアウトがそれぞれ接続されており、
日パルス発生回路6が発生する1日おきのパルスが現在
日カウンタ9に入力されるのでそれぞれ現在年、月、日
カウンタ7.8.9通常のカレンダとして動作している
ので時間の経過とともに現在日もインクリメント(進行
)し、これに伴って経過時間表示もインクリメント(変
化)してゆくことになる。
Note that each of the counters 7 to 9 representing the current day is connected to a carry-in and a carry-out, respectively.
Since the pulses generated every other day by the day pulse generation circuit 6 are input to the current day counter 9, the current year, month, and day counters 7.8.9 operate as a normal calendar, so as time passes, the current The day also increments (advances), and the elapsed time display also increments (changes) accordingly.

[発明の効果] 以上の実施例で説明したように、本発明の装置では、現
在日から基準日を減じた時に減算結果が負になる場合に
は該減算結果に基準刃の日数を加算する経過時間修正手
段(第1図のブロックBに含まれ部分と該部分に関連す
るCPu1の一部とで構成される)が設けられているの
で従来の同種装置にみられる不都合が解消され、常に適
切に経過時間が計算されることになり、且つ、正確な表
示を表示部等に行わせることができる。
[Effects of the Invention] As explained in the above embodiments, in the device of the present invention, when the reference date is subtracted from the current date, if the subtraction result is negative, the number of days of the reference blade is added to the subtraction result. Since the elapsed time correcting means (consisting of the part included in block B in FIG. 1 and the part of CPU 1 related to the part) is provided, the inconveniences seen in conventional similar devices are eliminated, and the The elapsed time can be calculated appropriately, and accurate display can be performed on the display unit or the like.

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

第1図は本発明の経過時間計算装置の一実施例の概略構
成を示した図、第2図は第1図に示した装置の中の中央
演算処理ユニットの入出力ポートにおける入出力の内容
を示した表、第゛3図は第1図に示した装置の中の月末
修正回路16における出力の内容を示した表、第4図は
第1図に示した中央演算処理ユニット1内で実行される
プログラムのフローチャート、第5図は第1図に示した
ブロックC内に含まれるデコーダ23と単位表示部26
及び27の概略構成を示した図、である。 1・・・中央演算処理ユニット 2・・・発振回路    3・・・分周回路4及び5・
・・メモリー 6・・・日パルス発生回路7・・・現在
年カウンタ 8・・・現在月カウンタ9・・・現在日カ
ウンタ 10・・・うるう年修正回路 11・・・月末修正回路 12・・・基準年カウンタ1
3・・・基準月カウンタ 14・・・基準日カウンタ 15・・・うるう年修正回路 16・・・月末修正回路 17−・・データ修正パルス発生回路 21〜23・・・デコーダ 24・・・上位桁表示部 25・・・下位桁表示部26
及び27・・・単位表示部
FIG. 1 is a diagram showing a schematic configuration of an embodiment of the elapsed time calculating device of the present invention, and FIG. 2 is the content of input and output at the input/output port of the central processing unit in the device shown in FIG. 3 is a table showing the contents of the output from the month-end correction circuit 16 in the device shown in FIG. 1, and FIG. A flowchart of the program to be executed, FIG. 5 shows the decoder 23 and unit display unit 26 included in block C shown in FIG.
and 27. FIG. 1... Central processing unit 2... Oscillation circuit 3... Frequency dividing circuits 4 and 5.
... Memory 6 ... Day pulse generation circuit 7 ... Current year counter 8 ... Current month counter 9 ... Current day counter 10 ... Leap year correction circuit 11 ... Month-end correction circuit 12 ... Base year counter 1
3... Base month counter 14... Base day counter 15... Leap year correction circuit 16... Month end correction circuit 17-... Data correction pulse generation circuits 21-23... Decoder 24... Upper digits Display section 25...lower digit display section 26
and 27...unit display section

Claims (2)

【特許請求の範囲】[Claims] (1)現在日から基準日を減算することによって基準日
から現在日までの経過時間を計算する経過時間演算手段
と、該演算手段により現在日から該基準日を減ずること
によって得られる減算結果が負になるような場合には経
過時間から経過月を1カ月減算すると共に該基準日の属
する基準月の該基準日よりあとの日数を経過時間に加算
する経過時間修正手段が設けられていることを特徴とす
る経過時間計算装置。
(1) An elapsed time calculation means for calculating the elapsed time from the reference date to the current date by subtracting the reference date from the current date, and a subtraction result obtained by subtracting the reference date from the current date by the calculation means. If the value becomes negative, an elapsed time correction means is provided that subtracts one month from the elapsed time and adds the number of days after the reference date of the reference month to which the reference date belongs to the elapsed time. An elapsed time calculation device characterized by:
(2)特許請求の範囲第1項において、前記経過時間修
正手段は、前記基準月が2月である場合には該基準月の
属する年が゛うるう年″であるかないかを判定すること
によって前記経過時間に加算する日数を変化させる手段
を有していることを特徴とする経過時間計算装 置。
(2) In claim 1, when the base month is February, the elapsed time correcting means determines whether the year to which the base month belongs is a "leap year" or not. An elapsed time calculation device comprising means for changing the number of days added to elapsed time.
JP29901887A 1987-04-27 1987-11-27 Elapsed time calculator Pending JPH01141392A (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP29901887A JPH01141392A (en) 1987-11-27 1987-11-27 Elapsed time calculator
GB8809962A GB2205656B (en) 1987-04-27 1988-04-27 Camera
US07/462,866 US4989025A (en) 1987-04-27 1990-01-05 Camera
US07/583,004 US5040006A (en) 1987-04-27 1990-09-17 Camera
GB9108765A GB2242753B (en) 1987-04-27 1991-04-24 Camera and photographic device
GB9108762A GB2242991B (en) 1987-04-27 1991-04-24 Camera and photographic device
GB9108764A GB2242752B (en) 1987-04-27 1991-04-24 Camera and photographic device
GB9108766A GB2242992B (en) 1987-04-27 1991-04-24 Camera and photographic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29901887A JPH01141392A (en) 1987-11-27 1987-11-27 Elapsed time calculator

Publications (1)

Publication Number Publication Date
JPH01141392A true JPH01141392A (en) 1989-06-02

Family

ID=17867162

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29901887A Pending JPH01141392A (en) 1987-04-27 1987-11-27 Elapsed time calculator

Country Status (1)

Country Link
JP (1) JPH01141392A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999492A (en) * 1994-02-16 1999-12-07 Teixeira; Martin Michael Chronological display device
US6483779B1 (en) 1994-02-16 2002-11-19 Countdown Clocks International Time interval and event display device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999492A (en) * 1994-02-16 1999-12-07 Teixeira; Martin Michael Chronological display device
US6483779B1 (en) 1994-02-16 2002-11-19 Countdown Clocks International Time interval and event display device

Similar Documents

Publication Publication Date Title
JPH06348455A (en) Rounding method for multiplication and multiplying circuit
JPH01141392A (en) Elapsed time calculator
US4508000A (en) Frequency-selectable signal generator
JPH01203991A (en) Elapsed time display device
JPH05119969A (en) Product sum computing element
JPS5983259A (en) Calendar capable of week calculation
JPS5940665Y2 (en) Power calculation control device
JPS5920146B2 (en) Electronics
SU547792A1 (en) Device for calculating multiple integrals
JPS61128386A (en) Arithmetic unit for normalization
JPS6162937A (en) Multiplier
JPS60129834A (en) Multiplier and divider
JPS62130453A (en) Electronic calculator
JP2699658B2 (en) Square root arithmetic unit
JPS642179Y2 (en)
JPS6033480Y2 (en) calculation display device
JP2755590B2 (en) Speech synthesizer
JPH0385633A (en) Divisional arithmetic circuit
JPS5977551A (en) Random number generating device
JPS61118835A (en) Hardware divider
JPS6346539A (en) Dividing circuit
JPH0754458B2 (en) Multiplication circuit
JPH0365724A (en) Nonlinear arithmetic unit
JPS6226538A (en) Divider
JPH0360331A (en) Electric power charge calculation processor