JPH0798618A - Counter readout circuit - Google Patents

Counter readout circuit

Info

Publication number
JPH0798618A
JPH0798618A JP5242695A JP24269593A JPH0798618A JP H0798618 A JPH0798618 A JP H0798618A JP 5242695 A JP5242695 A JP 5242695A JP 24269593 A JP24269593 A JP 24269593A JP H0798618 A JPH0798618 A JP H0798618A
Authority
JP
Japan
Prior art keywords
counter
data
circuit
carry
reading
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.)
Withdrawn
Application number
JP5242695A
Other languages
Japanese (ja)
Inventor
Akio Hayakawa
秋夫 早川
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.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi 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 Hitachi Microcomputer System Ltd, Hitachi Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP5242695A priority Critical patent/JPH0798618A/en
Publication of JPH0798618A publication Critical patent/JPH0798618A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

(57)【要約】 【目的】 カウンタ回路からの時刻データの読出しを一
度で済まし、以てプログラムの負担軽減を図り得るカウ
ンタ読出し回路を提供する。 【構成】 秒、分、時、曜日、日、月、年などの各カウ
ンタ30a〜30gに、各カウンタのデータを個別に格
納可能なバッファレジスタ31a〜31gを接続する。
そして、各カウンタ30a〜30gからバッファレジス
タ31a〜31gへデータ転送を行なうタイミングの決
定には、秒カウンタの更新や桁上げ等のイベント発生信
号S2を用いる。また、このイベント発生信号をトリガ
としてCPU2はバッファレジスタ31a〜31gに格
納されてなるデータの読出し動作を行なう。 【効果】 カウンタデータの読込みを2回行ってその一
致を確認したり、桁上げフラグを参照して桁上げが起こ
っていないことを確認する、などのデータの正当性の確
認を行わずに済み、プログラムの負担軽減を図ることが
できる。
(57) [Abstract] [Purpose] To provide a counter reading circuit that can read time data from a counter circuit only once, thereby reducing the load on a program. [Configuration] Buffer registers 31a to 31g capable of individually storing the data of each counter are connected to the counters 30a to 30g for seconds, minutes, hours, days of the week, days, months, years, etc.
Then, the determination of the timing for transferring data from the counter 30a~30g to the buffer register 31a to 31g, using an event occurrence signal S 2, such as updates and carry the second counter. In addition, the CPU 2 performs an operation of reading the data stored in the buffer registers 31a to 31g by using the event occurrence signal as a trigger. [Effect] There is no need to confirm the validity of the data, such as reading the counter data twice to confirm the coincidence or checking the carry flag to confirm that no carry has occurred. , It is possible to reduce the burden on the program.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、カウンタ読出し回路さ
らには複数のカウンタの読出しを同時期に行なう場合に
適用して特に有効な技術に関し、例えばカレンダ・時計
機能用のカウンタ回路からの時刻データの読出しに利用
して有用な回路技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a counter reading circuit, and more particularly to a technique which is particularly effective when applied to reading a plurality of counters at the same time. For example, time data from a counter circuit for calendar / clock function. The present invention relates to a circuit technology useful for reading out data.

【0002】[0002]

【従来の技術】近年、マイクロコンピュータによりその
動作が制御されてなる各種の電気機器等において、カレ
ンダ・時計機能を付加したものが知られている。この様
な付加機能は、CPU用のLSIチップの他にカレンダ
・時計機能用のICチップを設けるか、同一LSIチッ
プにCPUとカレンダ・時計機能用回路とを形成するか
して実現される。
2. Description of the Related Art In recent years, various kinds of electric equipment, the operation of which is controlled by a microcomputer, to which a calendar / clock function is added are known. Such an additional function is realized by providing an IC chip for the calendar / clock function in addition to the LSI chip for the CPU, or by forming the CPU and the circuit for the calendar / clock function on the same LSI chip.

【0003】上記した何れの場合にも、カレンダ・時計
機能用回路には例えば階層構造をなす複数のカウンタ、
即ち秒カウンタ、分カウンタ、時カウンタ、曜日カウン
タ、日カウンタ、月カウンタ、年カウンタなどよりなる
カウンタ回路が設けられている。その秒カウンタは1秒
毎にカウントアップし、分カウンタは60秒毎に桁上げ
されてカウントアップするなどのように、各カウンタは
所定時間毎にカウントアップするようになっている。
In any of the above cases, the calendar / clock function circuit includes, for example, a plurality of counters having a hierarchical structure,
That is, a counter circuit including a second counter, a minute counter, an hour counter, a day of the week counter, a day counter, a month counter, and a year counter is provided. The second counter counts up every 1 second, the minute counter carries up every 60 seconds and counts up. For example, each counter counts up every predetermined time.

【0004】そして、プログラム中に設けられた時刻の
読出し命令が実行されると、例えばCPUは上記カレン
ダ・時計機能用回路からの時刻データの読出しを行う。
その読出し動作は、例えば先ず秒カウンタのデータを読
出し、続いて分カウンタのデータを読出し、さらに続い
て時カウンタのデータを読み出す、というように秒カウ
ンタ、分カウンタ、時カウンタ、曜日カウンタ、日カウ
ンタ、月カウンタ、年カウンタを順次読み出していくよ
うになっている。
When a time read command provided in the program is executed, for example, the CPU reads time data from the calendar / clock function circuit.
The read operation is, for example, first reading the data of the second counter, then reading the data of the minute counter, and then reading the data of the hour counter, such as the second counter, minute counter, hour counter, day counter, and day counter. The month counter and year counter are read out sequentially.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上述し
た技術には、次のような問題のあることが本発明者らに
よってあきらかとされた。すなわち、上記各カウンタを
一つずつ順次読み出していくため、全てのカウンタの読
出しが終了するまで時間がかかってしまう。そのため、
各カウンタの読出し中に桁上げが起きてしまうことがあ
り、その場合にはカウンタ回路から読み出した時刻デー
タと実際の時刻との間に大きなずれが生じてしまうとい
うものである。
However, the present inventors have clarified that the above-mentioned technique has the following problems. That is, since the above counters are sequentially read one by one, it takes time until the reading of all counters is completed. for that reason,
A carry may occur during the reading of each counter, and in that case, a large difference occurs between the time data read from the counter circuit and the actual time.

【0006】そのようなずれが生じる場合に付いて、例
えば「1999年12月31日23時59分59秒」の
時刻に、時刻の読出し命令が実行されたと仮定して具体
的に説明する。読出し命令の実行開始時においては、秒
カウンタ及び分カウンタには夫々「59」が格納され、
時カウンタには「23」が格納され、日カウンタには
「31」が格納され、月カウンタには「12」が格納さ
れ、年カウンタには「1999」が格納されている。
A case where such a deviation occurs will be specifically described on the assumption that the time read command is executed at the time "23:59:59 on December 31, 1999", for example. At the start of execution of the read command, “59” is stored in the second counter and the minute counter,
The hour counter stores “23”, the day counter stores “31”, the month counter stores “12”, and the year counter stores “1999”.

【0007】そして、順次、秒カウンタから「59」が
読み出され、分カウンタから「59」が読み出され、時
カウンタから「23」が読み出され、日カウンタから
「31」が読み出され、月カウンタから「12」が読み
出された時点で秒カウンタがカウンタアップしてしまう
と、秒カウンタ及び分カウンタ並びに時カウンタは夫々
「0」に更新され、日カウンタ及び月カウンタは夫々
「1」に更新され、年カウンタは「2000」に更新さ
れる。従って、月カウンタに引き続いて年カウンタから
の読出しを行うと、「2000」が読み出されるので、
この一連の読出しにより求められてなる時刻は「200
0年12月31日23時59分59秒」となってしま
う。
Then, "59" is read from the second counter, "59" is read from the minute counter, "23" is read from the hour counter, and "31" is read from the day counter. If the second counter counts up when “12” is read from the month counter, the second counter, minute counter, and hour counter are updated to “0”, and the day counter and month counter are each set to “1”. ", And the year counter is updated to" 2000 ". Therefore, if you read from the year counter subsequently to the month counter, "2000" will be read.
The time obtained by this series of reading is "200
It was 23:59:59 on December 31, 2000 ”.

【0008】この様なずれの発生を防ぐには、上述した
読出し命令を繰り返して2度行い、1回目に読み出した
時刻データと2回目に読み出した時刻データとが一致し
ているか否かを判定し、一致している場合には正しい時
刻が求められたと判断し、一方一致していない場合には
上記ずれが生じたとして再び時刻データの読出しを行う
ようにプログラムを作成すればよい。或は、分や時や日
や月や年のカウンタに桁上げが生じた際には桁上げフラ
グを立てておき、時刻データの読出しが終了した時点で
そのフラグが立っていない場合には正しい時刻が求めら
れたと判断し、一方フラグが立っている場合には上記ず
れが生じたとして再び時刻データの読出しを行うように
プログラムを作成してもよい。しかし、何れの場合にも
プログラムが極めて複雑になってしまうという欠点があ
る。
In order to prevent the occurrence of such a shift, the above-mentioned read command is repeated twice and it is determined whether the time data read at the first time and the time data read at the second time match. However, if they match, it is determined that the correct time has been obtained, and if they do not match, a program may be created so that the time data is read again assuming that the above-mentioned deviation has occurred. Alternatively, a carry flag is set when a carry occurs in the minute, hour, day, month, or year counter, and it is correct if the flag is not set when the time data is read. A program may be created so that it is determined that the time has been obtained, and if the flag is set, the above-mentioned deviation is considered to have occurred and the time data is read again. However, in any case, there is a drawback that the program becomes extremely complicated.

【0009】本発明はかかる事情に鑑みてなされたもの
で、カウンタ回路からの時刻データの読出しを一度で済
まし、以てプログラムの負担軽減を図り得るように構成
されたカウンタ読出し回路を提供することを主たる目的
としている。この発明の前記ならびにそのほかの目的と
新規な特徴については、本明細書の記述及び添附図面か
ら明らかになるであろう。
The present invention has been made in view of the above circumstances, and provides a counter reading circuit configured so that the time data can be read from the counter circuit only once, thereby reducing the load of the program. Is the main purpose. The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0010】[0010]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を説明すれば、下記のと
おりである。すなわち、本発明のカウンタ読出し回路に
おいては、例えば秒、分、時、曜日、日、月、年などの
各カウンタに、各カウンタのデータを個別に格納可能な
バッファレジスタを接続する。そして、各カウンタから
バッファレジスタへデータ転送を行なうタイミングの決
定には、秒カウンタの更新や桁上げ等のイベント発生信
号を用いる。また、このイベント発生信号をトリガとし
てCPUはバッファレジスタに格納されてなるデータの
読出し動作を行なう。なお、バッファレジスタを新規に
設ける代わりにRAMで代用してもよい。
The typical ones of the inventions disclosed in the present application will be outlined below. That is, in the counter reading circuit of the present invention, a buffer register capable of individually storing the data of each counter is connected to each counter such as seconds, minutes, hours, days of the week, days, months, and years. Then, in order to determine the timing of data transfer from each counter to the buffer register, an event occurrence signal such as update of the second counter or carry is used. Further, the CPU uses the event occurrence signal as a trigger to read the data stored in the buffer register. A RAM may be used instead of a new buffer register.

【0011】[0011]

【作用】上記した手段によれば、各カウンタにバッファ
レジスタを接続し、秒カウンタの更新や桁上げ等のイベ
ントが発生した後、次のイベントが発生するまでの間
に、各カウンタからバッファレジスタへのデータ転送及
びバッファレジスタからのデータ読出しを行なうように
したため、常にバッファレジスタにイベント発生直後の
更新されたデータが格納され、その直後に読み出される
ので、その読み出されたデータより求まる時刻は実際の
時刻に一致する。
According to the above-mentioned means, the buffer register is connected to each counter, and after the occurrence of an event such as the update of the second counter or the carry, until the occurrence of the next event, the buffer register is released from each counter. Since data transfer to and from the buffer register is performed, updated data immediately after an event occurs is stored in the buffer register and is read immediately after that, so the time obtained from the read data is Match the actual time.

【0012】[0012]

【実施例】図1には、本発明に係るカウンタ読出し回路
の一例が示されている。同図において、符号1はLSI
チップであり、符号2はCPU(中央演算処理装置)で
あり、符号3はカレンダ・時計機能用回路である。この
回路3は、カウンタ回路(カウンタ手段)30とバッフ
ァ回路(バッファ手段)31と桁上げ確認回路(所謂、
キャリールックアヘッド回路)32と桁上げフラグラッ
チ回路33からなる。
1 shows an example of a counter reading circuit according to the present invention. In the figure, reference numeral 1 is an LSI
It is a chip, reference numeral 2 is a CPU (central processing unit), and reference numeral 3 is a calendar / clock function circuit. The circuit 3 includes a counter circuit (counter means) 30, a buffer circuit (buffer means) 31, and a carry confirmation circuit (so-called,
Carry look ahead circuit) 32 and carry flag latch circuit 33.

【0013】カウンタ回路30は、例えば秒カウンタ3
0a、分カウンタ30b、時カウンタ30c、曜日カウ
ンタ30d、日カウンタ30e、月カウンタ30f、及
び年カウンタ30gからなる。バッファ回路31は、前
記各カウンタ30a,30b,30c,30d,30
e,30f,30gに夫々対応するバッファレジスタ3
1a,31b,31c,31d,31e,31f,31
gからなり、それら各カウンタ30a,30b,30
c,30d,30e,30f,30gのデータを個別に
格納し得るようになっている。
The counter circuit 30 is, for example, a second counter 3
0a, minute counter 30b, hour counter 30c, day counter 30d, day counter 30e, month counter 30f, and year counter 30g. The buffer circuit 31 includes the counters 30a, 30b, 30c, 30d, 30.
Buffer register 3 corresponding to e, 30f, and 30g, respectively
1a, 31b, 31c, 31d, 31e, 31f, 31
g, each of the counters 30a, 30b, 30
The data of c, 30d, 30e, 30f and 30g can be stored individually.

【0014】桁上げ確認回路32は、秒カウンタ30a
の更新により分や時などの他のカウンタ30b,30
c,30d,30e,30f,30gに桁上げが発生す
る場合に、その桁上げが終了するまで一時的に待機し、
それから次のステップに進むようになっている。桁上げ
フラグラッチ回路33は、秒カウンタ30aの更新や桁
上げの発生などにより発せられる桁上げ終了信号S3
一時的に保持するとともに、CPU2に割込み要求信号
5を送信するようになっている。
The carry confirmation circuit 32 includes a second counter 30a.
Other counters 30b, 30 such as minutes and hours
When carry occurs in c, 30d, 30e, 30f, 30g, temporarily wait until the carry ends,
Then it goes to the next step. The carry flag latch circuit 33 temporarily holds a carry end signal S 3 generated by updating the second counter 30a or occurrence of a carry, and also sends an interrupt request signal S 5 to the CPU 2. .

【0015】符号4は周辺機能部であり、例えばタイマ
40、シリアルコミュニケーションインターフェイス4
1、DMA(Direct Memory Acces
s)コントローラ42、入出力ポート43からなる。符
号5は第1発振器であり、水晶発振子6(その発振周波
数は例えば10MHzである。)で発振してなる信号に基
いてCPU2と周辺機能部4用のシステムクロック信号
を生成する。符号7は第2発振器であり、水晶発振子8
(その発振周波数は例えば32.768kHzである。)
で発振してなる信号に基いてカレンダ・時計機能用回路
3の基本クロック信号S0を生成する。符号9は分周器
であり、上記クロック信号S0を1秒パルス、即ち1Hz
の信号S1に変換する。
Reference numeral 4 is a peripheral function section, for example, a timer 40 and a serial communication interface 4
1, DMA (Direct Memory Acces)
s) Consists of a controller 42 and an input / output port 43. Reference numeral 5 denotes a first oscillator, which generates a system clock signal for the CPU 2 and the peripheral function unit 4 based on a signal oscillated by a crystal oscillator 6 (its oscillation frequency is, for example, 10 MHz). Reference numeral 7 is a second oscillator, and a crystal oscillator 8
(The oscillation frequency is, for example, 32.768 kHz.)
The basic clock signal S 0 of the calendar / clock function circuit 3 is generated on the basis of the signal oscillated in ( 1 ). Reference numeral 9 is a frequency divider for applying a 1-second pulse to the clock signal S 0 , that is, 1 Hz.
Signal S 1 of.

【0016】次に、カウンタ回路30のデータの読出し
処理に付いて説明する。先ず、第2発振器7から発せら
れてなる基本クロック信号S0は分周器9で1秒パルス
信号S1に変換されて秒カウンタ30aに入力される。
そのように構成されてなるカウントアップ手段によっ
て、秒カウンタ30aのデータがインクリメントされて
更新される。そして、秒カウンタ30aからはカウント
アップ信号(イベント発生信号)S2が出力されて桁上
げ確認回路32に入力される。このカウントアップ信号
2に基いて、分カウンタ30b、時カウンタ30c、
曜日カウンタ30d、日カウンタ30e、月カウンタ3
0f及び年カウンタ30gの桁上げが適宜行われる。
Next, the data read processing of the counter circuit 30 will be described. First, the basic clock signal S 0 generated from the second oscillator 7 is converted into a 1-second pulse signal S 1 by the frequency divider 9 and input to the second counter 30a.
The data of the second counter 30a is incremented and updated by the count-up means having such a configuration. Then, the count-up signal (event occurrence signal) S 2 is output from the second counter 30a and input to the carry confirmation circuit 32. Based on the count-up signal S 2 , the minute counter 30b, the hour counter 30c,
Day counter 30d, day counter 30e, month counter 3
The carry of 0f and the year counter 30g is carried out appropriately.

【0017】桁上げが終了したら、桁上げ確認回路32
から桁上げ終了信号S3が発せられて桁上げフラグラッ
チ回路33にラッチされる。同時に桁上げ確認回路32
からはデータ転送信号S4が発せられる。この信号S4
よって、カウンタ回路30とバッファ回路31との間に
設けられてなるゲート群34の、各カウンタ30a,3
0b,30c,30d,30e,30f,30gに対応
する個々のゲートが開放される。そのように構成されて
なるデータ転送手段によって、各カウンタ30a,30
b,30c,30d,30e,30f,30gのデータ
がバッファレジスタ31a,31b,31c,31d,
31e,31f,31gに夫々転送される。
When the carry is completed, the carry confirmation circuit 32
Then, a carry end signal S 3 is issued and latched in the carry flag latch circuit 33. Carry confirmation circuit 32 at the same time
From which a data transfer signal S 4 is issued. By this signal S 4 , the counters 30a, 3 of the gate group 34 provided between the counter circuit 30 and the buffer circuit 31 are
The individual gates corresponding to 0b, 30c, 30d, 30e, 30f and 30g are opened. Each of the counters 30a, 30 is constructed by the data transfer means having such a configuration.
Data of b, 30c, 30d, 30e, 30f, and 30g are buffer registers 31a, 31b, 31c, 31d,
31e, 31f, 31g are transferred respectively.

【0018】上述したように桁上げフラグラッチ回路3
3において、桁上げ終了信号S3がラッチされると、C
PU2に対して割込み要求信号S5が発せられる。CP
U2は、この割込み要求信号S5を受け付けて、バッフ
ァレジスタ31a,31b,31c,31d,31e,
31f,31gの読出しプログラムをROM45から読
み出す。そして、CPU2はそのプログラムを実行し
て、バッファ回路31にリード信号S6を発する。その
ように構成されてなるデータ読出し手段によって、CP
U2は、各バッファレジスタ31a,31b,31c,
31d,31e,31f,31gのデータD0,D1,D
2,D3,D4,D5,D6をデータバス10に乗せて取り
込む。なお、リード信号S6により桁上げフラグラッチ
回路33がクリアされる。上述したデータD0,D1,D
2,D3,D4,D5,D6の読出し処理は、秒カウンタ3
0aのデータが次に更新されるまでに終了するようにな
っている。
As described above, the carry flag latch circuit 3
In step 3, when the carry end signal S 3 is latched, C
An interrupt request signal S 5 is issued to PU2. CP
U2 accepts the interrupt request signal S 5, the buffer register 31a, 31b, 31c, 31d, 31e,
The read programs 31f and 31g are read from the ROM 45. Then, the CPU 2 executes the program and issues a read signal S 6 to the buffer circuit 31. By the data reading means having such a configuration, the CP
U2 is a buffer register 31a, 31b, 31c,
Data D 0 , D 1 , D of 31d, 31e, 31f, 31g
2 , D 3 , D 4 , D 5 , and D 6 are loaded on the data bus 10 and fetched. The carry flag latch circuit 33 is cleared by the read signal S 6 . The above-mentioned data D 0 , D 1 , D
The reading process of 2 , D 3 , D 4 , D 5 , and D 6 is performed by the second counter 3
The data of 0a is completed by the next update.

【0019】上記実施例によれば、常にバッファレジス
タ31a,31b,31c,31d,31e,31f,
31gにカウントアップや桁上げなどのイベント発生直
後の更新されたデータが格納され、しかもそのデータは
その直後に読み出されるため、その読み出されたデータ
0,D1,D2,D3,D4,D5,D6より求まる時刻は
常に実際の時刻に一致しているので、データの正当性の
確認を行わずに済み、プログラムの負担軽減を図ること
ができる。
According to the above embodiment, the buffer registers 31a, 31b, 31c, 31d, 31e, 31f,
Since the updated data immediately after the occurrence of an event such as counting up or carry is stored in 31g and the data is read immediately after that, the read data D 0 , D 1 , D 2 , D 3 , Since the time obtained from D 4 , D 5 , and D 6 always matches the actual time, it is not necessary to confirm the validity of the data, and the load on the program can be reduced.

【0020】以上本発明者によってなされた発明を実施
例に基づき具体的に説明したが、本発明は上記実施例に
限定されるものではなく、その要旨を逸脱しない範囲で
種々変更可能であることはいうまでもない。例えば、カ
レンダ・時計機能用回路3は、カウンタ回路30、バッ
ファ回路31を有しており、イベントが発生してから次
のイベントが発生するまでの間に、各カウンタ30a,
30b,30c,30d,30e,30f,30gのデ
ータを対応するバッファレジスタ31a,31b,31
c,31d,31e,31f,31gを介して同時期に
読み出すことができれば、上記構成に限定されないのは
いうまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the scope of the invention. Needless to say. For example, the calendar / clock function circuit 3 includes a counter circuit 30 and a buffer circuit 31, and each counter 30a,
Buffer registers 31a, 31b, 31 corresponding to the data of 30b, 30c, 30d, 30e, 30f, 30g
Needless to say, the present invention is not limited to the above configuration as long as the data can be read at the same time via c, 31d, 31e, 31f and 31g.

【0021】また、CPU2の代わりにDMAコントロ
ーラ42を用い、桁上げフラグラッチ回路33からの信
号(上記実施例における割込み要求信号S5に相当す
る。)をDMAコントローラ42に入力し、それに基い
てDMAコントローラ42が直接バッファレジスタ31
a,31b,31c,31d,31e,31f,31g
の各データを読み出し、そのデータをRAMなどに転送
するようにしてもよい。このようにすれば、カウンタの
読出し処理を行っている間も、CPU2は別の処理を行
うことができる。
Further, a DMA controller 42 is used instead of the CPU 2, and a signal from the carry flag latch circuit 33 (corresponding to the interrupt request signal S 5 in the above embodiment) is input to the DMA controller 42, and the DMA is based on the signal. The controller 42 directly transfers the buffer register 31
a, 31b, 31c, 31d, 31e, 31f, 31g
It is also possible to read each of the above data and transfer the data to a RAM or the like. With this configuration, the CPU 2 can perform another process while the counter reading process is being performed.

【0022】さらに、CPUとカレンダ・時計機能用回
路とを同一LSIチップに形成した場合に限らず、CP
U用のLSIチップの他にカレンダ・時計機能用のIC
チップを設ける場合にも適用可能である。
Furthermore, the CPU and the calendar / clock function circuit are not limited to the case of being formed on the same LSI chip.
In addition to U LSI chips, ICs for calendar and clock functions
It is also applicable when a chip is provided.

【0023】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるカレン
ダ・時計機能用のカウンタ回路に適用した場合について
説明したが、この発明はそれに限定されるものではな
く、カレンダ・時計機能用以外の一般のカウンタ回路に
利用することができる。
In the above description, the invention made by the present inventor was mainly applied to a counter circuit for a calendar / clock function, which is the field of application which was the background of the invention, but the invention is not limited thereto. Instead, it can be used for general counter circuits other than those for calendar / clock functions.

【0024】[0024]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
のとおりである。すなわち、カウントアップや桁上げ等
のイベント発生直後にバッファレジスタに入力されてな
る更新されたデータを読み出すようになっているため、
その読み出されたデータより求まる時刻は常に実際の時
刻に一致している。従って、データの読込みを2回行っ
てその一致を確認したり、桁上げフラグを参照して桁上
げが起こっていないことを確認する、などのデータの正
当性の確認を行わずに済み、プログラムの負担軽減を図
ることができる。
The effects obtained by the representative one of the inventions disclosed in the present application will be briefly described as follows. That is, since the updated data input to the buffer register is read immediately after the occurrence of an event such as counting up or carry,
The time obtained from the read data always matches the actual time. Therefore, it is not necessary to confirm the correctness of the data by reading the data twice to confirm the coincidence or by referring to the carry flag to confirm that the carry has not occurred. It is possible to reduce the burden of.

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

【図1】本発明に係るカウンタ読出し回路の一例を示す
ブロック構成図である。
FIG. 1 is a block diagram showing an example of a counter reading circuit according to the present invention.

【符号の説明】[Explanation of symbols]

2 CPU 3 カレンダ・時計機能用回路 7 第2発振器(カウントアップ手段) 8 水晶発振子(カウントアップ手段) 9 分周器(カウントアップ手段) 30 カウンタ回路(カウンタ手段) 30a 秒カウンタ 30b 分カウンタ 30c 時カウンタ 30d 曜日カウンタ 30e 日カウンタ 30f 月カウンタ 30g 年カウンタ 31 バッファ回路(バッファ手段) 32 桁上げ確認回路(データ転送手段) 33 桁上げフラグラッチ回路(データ読出し手段) 34 ゲート群(データ転送手段) 45 ROM(データ読出し手段) 2 CPU 3 Calendar / Clock Function Circuit 7 Second Oscillator (Count Up Means) 8 Crystal Oscillator (Count Up Means) 9 Frequency Divider (Count Up Means) 30 Counter Circuit (Counter Means) 30a Second Counter 30b Minute Counter 30c Hour counter 30d Day counter 30e Day counter 30f Month counter 30g Year counter 31 Buffer circuit (buffer means) 32 Carry confirmation circuit (data transfer means) 33 Carry flag latch circuit (data read means) 34 Gate group (data transfer means) 45 ROM (data reading means)

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 カウント機能を有する複数のカウンタよ
り構成されてなるカウンタ手段と、前記各カウンタに接
続され且つ各カウンタのデータを個別に格納可能なバッ
ファ手段と、単位時間おきに前記カウンタのデータを更
新可能なカウントアップ手段と、そのデータ更新終了後
次のデータ更新前に、各カウンタのデータを前記バッフ
ァ手段に同時又は略同時に転送可能なデータ転送手段と
を備えていることを特徴とするカウンタ読出し回路。
1. A counter means composed of a plurality of counters having a counting function, a buffer means connected to each counter and capable of individually storing data of each counter, and data of the counter at every unit time. And a data transfer means capable of transferring the data of each counter to the buffer means at the same time or substantially the same time after the end of the data update and before the next data update. Counter readout circuit.
【請求項2】 上記そのデータ更新終了後次のデータ更
新前に、上記データ転送手段により転送されてなるデー
タを上記バッファ手段から読み出すデータ読出し手段を
備えていることを特徴とする請求項1記載のカウンタ読
出し回路。
2. The data read means for reading the data transferred by the data transfer means from the buffer means after the end of the data update and before the next data update. Counter reading circuit.
【請求項3】 上記カウンタは、秒カウンタ、分カウン
タ、時カウンタ、曜日カウンタ、日カウンタ、月カウン
タ、年カウンタであることを特徴とする請求項1または
2記載のカウンタ読出し回路。
3. The counter reading circuit according to claim 1, wherein the counter is a second counter, a minute counter, an hour counter, a day of the week counter, a day counter, a month counter, and a year counter.
JP5242695A 1993-09-29 1993-09-29 Counter readout circuit Withdrawn JPH0798618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5242695A JPH0798618A (en) 1993-09-29 1993-09-29 Counter readout circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5242695A JPH0798618A (en) 1993-09-29 1993-09-29 Counter readout circuit

Publications (1)

Publication Number Publication Date
JPH0798618A true JPH0798618A (en) 1995-04-11

Family

ID=17092871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5242695A Withdrawn JPH0798618A (en) 1993-09-29 1993-09-29 Counter readout circuit

Country Status (1)

Country Link
JP (1) JPH0798618A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11200480B2 (en) 2018-11-26 2021-12-14 Murata Manufacturing Co., Ltd. Counter readout circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11200480B2 (en) 2018-11-26 2021-12-14 Murata Manufacturing Co., Ltd. Counter readout circuit

Similar Documents

Publication Publication Date Title
US4218876A (en) Combined timekeeper and calculator with low power consumption features
US4819158A (en) Microprocessor with an interruptable bus cycle
JPH0798618A (en) Counter readout circuit
US4232382A (en) Incrementing signal hold circuit for a clock/calculator
JP2725419B2 (en) Counting circuit
JPH07120571A (en) Clock counter and semiconductor integrated circuit device incorporating the same
ITMI981950A1 (en) PROCEDURE FOR SYNCHRONIZING A COMPUTER SYSTEM AND COMPUTER SYSTEM SO SYNCHRONIZED
JPS5848167A (en) Controller
JP3149864B2 (en) Processing frequency guarantee circuit
JP3109132B2 (en) Time setting device
JP2557785Y2 (en) Single chip microcomputer
KR920006078B1 (en) Time check circuit
JP3216325B2 (en) Microprocessor
JPH06301440A (en) Digital processing system
JP2517943B2 (en) Timer device
JPS6024616A (en) Timer updating system of electronic computer
JPS6131481B2 (en)
JPH0375909A (en) System for reading out counter value
JPH05304466A (en) Clock circuit
JPH05333957A (en) Calendar read control device
JPH0676083A (en) Timer circuit
JPH0721117A (en) DMA controller
JPH04302337A (en) Rerun countermeasure in abort of update processing
JPS6239396B2 (en)
JPS5965365A (en) Electronic calculator with timepiece

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001226