JPS634675B2 - - Google Patents

Info

Publication number
JPS634675B2
JPS634675B2 JP56138737A JP13873781A JPS634675B2 JP S634675 B2 JPS634675 B2 JP S634675B2 JP 56138737 A JP56138737 A JP 56138737A JP 13873781 A JP13873781 A JP 13873781A JP S634675 B2 JPS634675 B2 JP S634675B2
Authority
JP
Japan
Prior art keywords
signal
switch
output
circuit
data
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
JP56138737A
Other languages
Japanese (ja)
Other versions
JPS5839982A (en
Inventor
Hiroshi Koyama
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 JP56138737A priority Critical patent/JPS5839982A/en
Priority to GB08224813A priority patent/GB2107494B/en
Publication of JPS5839982A publication Critical patent/JPS5839982A/en
Priority to GB08416804A priority patent/GB2143656B/en
Publication of JPS634675B2 publication Critical patent/JPS634675B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G99/00Subject matter not provided for in other groups of this subclass
    • G04G99/006Electronic time-pieces using a microcomputer, e.g. for multi-function clocks

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Calculators And Similar Devices (AREA)
  • Electric Clocks (AREA)

Description

【発明の詳細な説明】 本発明は電子時計の回路に関し、特に4ビツト
のマイクロコンピユータを用いたCPU方式電子
時計のスイツチ回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a circuit for an electronic timepiece, and more particularly to a switch circuit for a CPU type electronic timepiece using a 4-bit microcomputer.

一般にCPU方式の電子時計は仕様変更の場合
にプログラムを記憶するROMのマスクを変える
のみで外種多機能を従来のカウンタ構成に依る分
周方式に比べ極めて容易に実現できる利点を有す
る。しかし従来のCPU方式の電子時計は1命令
の処理時間を基準としてプログラムのステツプ数
を数えて加算処理を行なうためプログラムが長く
複雑となる。更に高速で常時動作しているため消
費電流が増加し電池寿命が短縮してしまう欠点が
あり、電池を電源とするクロツク又は腕時計等に
は不適当であつた。また外部接続されるスイツチ
の機能はAND−ORROM等に依つて固定的に決
定されており、プログラムに依つて機能の設定及
び追加が出来ないものであり、仕様変更時に制約
が生じ不都合であつた。
In general, CPU-based electronic clocks have the advantage that when specifications change, multiple functions can be realized much more easily by simply changing the mask of the ROM that stores the program, compared to the conventional frequency-dividing method based on a counter configuration. However, conventional CPU-based electronic watches perform addition processing by counting the number of program steps based on the processing time of one instruction, resulting in long and complicated programs. Furthermore, since it operates constantly at high speed, it has the drawback of increasing current consumption and shortening battery life, making it unsuitable for clocks, wristwatches, etc. that use batteries as a power source. In addition, the functions of externally connected switches are fixedly determined by AND-ORROM, etc., and functions cannot be set or added by a program, which is inconvenient and restricts when specifications are changed. .

本発明は上述した点に鑑みて為されたものであ
り、時計動作等を割り込み処理で行なうと共に必
要なとき以外はCPUの動作を停止させ、少なく
ともスイツチ操作に依る割り込み処理の場合とプ
ログラムで指定されたスイツチ操作が為された場
合にCPUの動作を再開させることに依りプログ
ラムが簡単で消費電流の少ない電子時計を提供す
るものである。以下図面を参照して本発明を詳述
する。
The present invention has been made in view of the above-mentioned points, and it performs clock operations etc. using interrupt processing, and stops the operation of the CPU except when necessary, at least in the case of interrupt processing by switch operation and when specified by a program. The present invention provides an electronic clock that is easy to program and consumes little current by restarting the operation of the CPU when a switch operation is performed. The present invention will be described in detail below with reference to the drawings.

第1図は本発明の実施例を示すブロツク図であ
り、基準信号発生回路1、クロツクジエネレータ
2、スイツチ入力回路3、状態制御回路4、タイ
マーカウンタ5、クロノグラフカウンタ6、
ROM7、プログラムカウンタ8、スタツク9、
インストラクシヨンレジスタ10、制御回路1
1、ALU12、ACC13、RAM14、デコー
ダ15及びラツチ回路16とから構成される
CPU式の電子時計である。
FIG. 1 is a block diagram showing an embodiment of the present invention, which includes a reference signal generation circuit 1, a clock generator 2, a switch input circuit 3, a state control circuit 4, a timer counter 5, a chronograph counter 6,
ROM7, program counter 8, stack 9,
Instruction register 10, control circuit 1
1. Consists of ALU 12, ACC 13, RAM 14, decoder 15 and latch circuit 16
It is a CPU-type electronic clock.

基準信号発生回路1は外部端子に接続された水
晶振動子17で決定される周波数の信号を発振
し、更にその信号を分周して、所定の分周信号を
クロツクジエネレータ2、スイツチ入力回路3、
タイマーカウンタ5及びクロノグラフカウンタ6
等に供給している。更に基準周波数発生回路1か
らは一定時間、例えば0.5秒毎に時刻計数動作を
行なわせるための割り込み信号INT2が出力さ
れる。
A reference signal generation circuit 1 oscillates a signal with a frequency determined by a crystal oscillator 17 connected to an external terminal, further divides the signal, and sends a predetermined frequency-divided signal to a clock generator 2 and a switch input. circuit 3,
Timer counter 5 and chronograph counter 6
etc. Further, the reference frequency generating circuit 1 outputs an interrupt signal INT2 for causing a time counting operation to be performed at fixed intervals, for example, every 0.5 seconds.

クロツクジエネレータ2は基準周波数発生回路
1から印加された分周信号に依りCPU動作を行
なうためのクロツク信号を作成し各部に供給す
る。このクロツクジエネレータ2には状態制御回
路4からクロツク信号作成動作を停止させる停止
信号CLKSTOPが印加されると共に割り込み信
号INT0,1,2,3及びタイマー出力
TIMEROUTさらには動作開始信号
CLKSTARTが印加されこれらの信号に依り停
止した動作が再開される。
The clock generator 2 generates a clock signal for operating the CPU based on the frequency-divided signal applied from the reference frequency generating circuit 1, and supplies it to each section. A stop signal CLKSTOP for stopping the clock signal generation operation is applied from the state control circuit 4 to the clock generator 2, and interrupt signals INT0, 1, 2, 3 and a timer are output.
TIMEROUT and operation start signal
CLKSTART is applied and these signals restart the stopped operation.

スイツチ入力回路3は外部端子M1〜M4及びS1
〜S4を有し、各外部端子に接続されたスイツチの
チヤタリング防止及びスイツチの開閉データの取
り込みを行なうものであり、そのデータは各々デ
ータバスDBに送出される。特に外部端子S1〜S4
に接続されたスイツチの開閉は状態制御回路3の
スイツチ制御信号SWCONで指定することがで
き、指定されたスイツチの開閉に依り動作開始信
号CLKSTARTを出力することができる。更に
外部端子S1〜S4に接続されたスイツチの閉成に依
り割り込み信号INT3を出力することもできる。
またクロノグラフモードに於いては端子S1及びS2
に接続されたスイツチの開閉に依りクロノグラフ
カウンタ6のスタート、ラツプ及びストツプを制
御するクロノグラフ制御信号CHRCONを出力す
る。
Switch input circuit 3 has external terminals M 1 to M 4 and S 1
~ S4 , which prevents the switches connected to each external terminal from chattering and captures switch opening/closing data, and the data is sent to the respective data buses DB. Especially external terminals S 1 ~ S 4
The opening/closing of the switch connected to can be specified by the switch control signal SWCON of the state control circuit 3, and the operation start signal CLKSTART can be output depending on the opening/closing of the specified switch. Further, an interrupt signal INT3 can be output by closing a switch connected to external terminals S1 to S4 .
In addition, in chronograph mode, terminals S 1 and S 2
A chronograph control signal CHRCON is output that controls the start, lap, and stop of the chronograph counter 6 by opening and closing a switch connected to the chronograph counter 6.

状態制御回路4はインストラクシヨンバスIB
に送出されるプログラムに依つて制御され、各種
モードに於ける各部回路の状態を制御するもので
あり、スイツチ入力回路3を制御するスイツチ制
御信号SWCON、タイマーカウンタ5のリセツ
ト、スタート及びタイマー時間の選択等を行なう
タイマー制御信号TIMCON及びクロツクジエネ
レータ2の動作を停止させる停止信号
CLKSTOP等を出力する。更にランプを接続す
るための外部端子LAMP及びアラーム音発生装
置に接続される外部端子ALMが設けられている。
State control circuit 4 is instruction bus IB
It controls the state of each circuit in various modes, and controls the switch control signal SWCON that controls the switch input circuit 3, the reset and start of the timer counter 5, and the timer time. Timer control signal TIMCON for making selections, etc. and stop signal for stopping the operation of clock generator 2
Output CLKSTOP etc. Furthermore, an external terminal LAMP for connecting a lamp and an external terminal ALM for connecting to an alarm sound generator are provided.

タイマーカウンタ5はインストラクシヨンバス
IBに送出されたプログラムに依つてタイマー時
間を設定することができ、タイマー時間が経過す
るとクロツクジエネレータ2の動作を開始させる
信号TIMEROUTを出力する。クロノグラフカ
ウンタ6は1/100秒のパルス計数するカウンタで
あり、1/10秒毎に割り込み信号INT1を出力す
る。またクロノグラフカウンタ6のカウント内容
はクロノデータバスCDBを介してデコーダ15
に印加される。
Timer counter 5 is the instruction bus
The timer time can be set according to the program sent to the IB, and when the timer time elapses, a signal TIMEROUT is output to start the operation of the clock generator 2. The chronograph counter 6 is a counter that counts pulses of 1/100 seconds, and outputs an interrupt signal INT1 every 1/10 seconds. In addition, the count contents of the chronograph counter 6 are sent to the decoder 15 via the chronograph data bus CDB.
is applied to

ROM7は1392×14ビツトから成り、計時動作
及び各部制御等を行なうためのプログラムが固定
的に書き込まれたものであり、11ビツトのプログ
ラムカウンタ8に依つて指定されるアドレスに書
き込まれた14ビツトから成る命令コードをインス
トラクシヨンレジスタ10に出力する。インスト
ラクシヨンレジスタ10はROM7から出力され
た命令コードを記憶しインストラクシヨンバス
IBに出力する。プログラムカウンタ8は1命令
の処理が済むと次のアドレスあるいはジヤンプ制
御信号を受けてジヤンプ先のアドレス信号を
ROM7に出力する。スタツク9は8レベルの容
量を有し、割り込み処理あるいはサブルーチンへ
移行する場合にプログラムカウンタ8の内容に1
が加算されたものを記憶する。しかしクロツクジ
エネレータ2の動作を停止するための命令
“SCP”が実行された後、割り込み処理を行なう
場合にはプログラムカウンタ8の内容はそのまま
スタツク9に記憶され、割り込み処理終了後は再
びクロツクの停止命令“SCP”がアドレスされて
実行される。
The ROM 7 consists of 1392 x 14 bits, in which programs for timekeeping operations and control of various parts are written in a fixed manner. An instruction code consisting of the following is output to the instruction register 10. The instruction register 10 stores the instruction code output from the ROM 7 and is connected to the instruction bus.
Output to IB. After processing one instruction, the program counter 8 receives the next address or jump control signal and outputs the jump destination address signal.
Output to ROM7. The stack 9 has a capacity of 8 levels, and when transitioning to an interrupt process or subroutine, the contents of the program counter 8 are set to 1.
The added value is memorized. However, after the instruction "SCP" to stop the operation of the clock generator 2 is executed, when interrupt processing is performed, the contents of the program counter 8 are stored as they are in the stack 9, and after the interrupt processing is completed, the clock is restarted. The stop command “SCP” is addressed and executed.

RAM14は84×4ビツトから成り、現在時
刻、アラーム時刻、タイマー時刻等のデータが所
定の領域に記憶される。RAM14のアドレスは
インストラクシヨンに依つて指定され、送出命令
あるいは書き込み命令に依り、指定されたアドレ
スに記憶されたデータをデータバスDBに送出
し、あるいはデータバスDBに送出されたデータ
を指定されたアドレスに記憶する。ALU12は
データバスDBに送出されたデータを入力し、加
減算等の処理を行ないその結果をACC13に記
憶させ、再びデータバスDBに送出する。
The RAM 14 consists of 84×4 bits, and data such as current time, alarm time, timer time, etc. is stored in a predetermined area. The address of the RAM 14 is specified by an instruction, and the data stored at the specified address is sent to the data bus DB, or the data sent to the data bus DB is specified by a send command or a write command. The address is saved. The ALU 12 inputs the data sent to the data bus DB, performs processing such as addition and subtraction, stores the results in the ACC 13, and sends the data to the data bus DB again.

デコーダ15及びラツチ回路16は表示回路を
構成し、デコーダ15は印加された4ビツトのデ
ータを表示のための7個のセグメント信号に変換
しセグメントバスSBに出力する。ラツチ回路1
6はセグメントバスSBに出力されたセグメント
信号を記憶保持し外部端子a〜gに出力するもの
であり、表示要素の数だけ設けられている。変換
されたセグメント信号をどのラツチ回路16に記
憶させるかはプログラムに依つて指定されるもの
であり、例えば現在時刻の秒の第1桁目のデータ
を変換した場合には、その秒の第1桁目を表示す
べき表示素子に対応するラツチ回路16をプログ
ラムで指定する。一方デコーダ15にはデータバ
スDBの他にクロノグラフカウンタ6からの出力
クロノデータバスCDBが印加されており、プロ
グラムに依つてデータバスDBあるいはクロノデ
ータバスCDBのいずれかを切り換え選択できる。
The decoder 15 and the latch circuit 16 constitute a display circuit, and the decoder 15 converts the applied 4-bit data into 7 segment signals for display and outputs them to the segment bus SB. Latch circuit 1
Reference numeral 6 stores and holds the segment signals output to the segment bus SB and outputs them to external terminals a to g, and there are as many as the number of display elements. Which latch circuit 16 is to store the converted segment signal is specified by the program. For example, when converting the data of the first digit of the second of the current time, the latch circuit 16 stores the converted segment signal. The latch circuit 16 corresponding to the display element on which the digit is to be displayed is specified by the program. On the other hand, in addition to the data bus DB, the output chronograph data bus CDB from the chronograph counter 6 is applied to the decoder 15, and either the data bus DB or the chronograph data bus CDB can be switched and selected depending on the program.

制御回路11はインストラクシヨンバスIBに
送出されたROM7の命令を解読し、その命令に
相当する動作を行なわせるために各回路をクロツ
クジエネレータ2から出力されるタイミング信号
で制御するものであり、更に割り込み信号INT
0,1,2,3が出力された時その割り込みに対
応した処理を行なう様プログラムカウンタ8及び
ROM7を制御する。
The control circuit 11 decodes the instructions from the ROM 7 sent to the instruction bus IB and controls each circuit using the timing signal output from the clock generator 2 in order to perform the operation corresponding to the instruction. Yes, plus interrupt signal INT
When 0, 1, 2, or 3 is output, the program counter 8 and
Controls ROM7.

第2図は第1図に示されたスイツチ入力回路3
の一部回路図である。外部端子S1〜S4は各々全く
同じ回路構成である入力回路18〜21に接続さ
れ、外部端子S1〜S4にはスイツチSW1〜SW4が接
続される。入力回路18〜21は各々チヤタリン
グ防止回路22、NORゲート23、ラツチ回路
24,25、インバータ26及びNORゲート2
7,28から構成されている。チヤタリング防止
回路22はNANDゲート29,30を介して印
加される基準信号発生回路1からの分周出力φ1
0に依り、スイツチSW1〜SW4の開閉時生じるチ
ヤタリングを除去し、その信号をNORゲート2
3に印加すると共に各々NANDゲート31にも
印加する。NANDゲート31の出力が印加され
たD−FF(Dタイプフリツプフロツプ)32の
出力はNORゲート23に印加され、各チヤタリ
ング防止回路22の信号を遅延させてNORゲー
ト23から出力させる。NORゲート23の出力
はトランスミツシヨンゲート33を介してデータ
バスDBの各ビツトDB0、DB1、DB2及びDB3に
接続される。ラツチ回路24とNORゲート27
はスイツチSW1〜SW4が閉成されたとき動作し、
またラツチ回路25とNORゲート28はスイツ
チSW1〜SW4が開成されたとき動作するが、この
動作はラツチ回路24,25のリセツト端子Rに
印加される状態制御回路4からのスイツチ動作指
定信号14及び14に依つて決定
される。またラツチ回路24,25にはNAND
ゲート29,30を介して分周出力φ10が印加
される。NORゲート27,28の各出力はNOR
ゲート34に印加され、NORゲート34の出力
はNANDゲート29に印加されて分周出力φ1
0を制御すると共にインバータ35を介して動作
開始信号CLKSTARTとしてクロツクジエネレ
ータ2に印加される。
Figure 2 shows the switch input circuit 3 shown in Figure 1.
FIG. The external terminals S 1 -S 4 are connected to input circuits 18 - 21 having exactly the same circuit configuration, respectively, and the switches SW 1 -SW 4 are connected to the external terminals S 1 -S 4 . The input circuits 18 to 21 each include a chattering prevention circuit 22, a NOR gate 23, latch circuits 24 and 25, an inverter 26, and a NOR gate 2.
It consists of 7 and 28. The chattering prevention circuit 22 receives the divided output φ1 from the reference signal generation circuit 1 applied via the NAND gates 29 and 30.
0, removes the chattering that occurs when switches SW 1 to SW 4 open and close, and sends the signal to NOR gate 2.
3 and also to each NAND gate 31. The output of a D-FF (D type flip-flop) 32 to which the output of the NAND gate 31 is applied is applied to a NOR gate 23, and the signals of each chattering prevention circuit 22 are delayed and outputted from the NOR gate 23. The output of NOR gate 23 is connected via transmission gate 33 to each bit DB0, DB1, DB2 and DB3 of data bus DB. Latch circuit 24 and NOR gate 27
operates when switches SW 1 to SW 4 are closed,
The latch circuit 25 and the NOR gate 28 operate when the switches SW 1 to SW 4 are opened, but this operation is controlled by the switch operation designation signal from the state control circuit 4 applied to the reset terminal R of the latch circuits 24 and 25. 1 to 4 and 1 to 4 . In addition, the latch circuits 24 and 25 have NAND
A frequency-divided output φ10 is applied via gates 29 and 30. Each output of NOR gates 27 and 28 is NOR
The output of the NOR gate 34 is applied to the NAND gate 29 and the divided output φ1 is applied to the gate 34.
0 and is applied to the clock generator 2 via the inverter 35 as the operation start signal CLKSTART.

一方割り込み発生回路36はスイツチSW1
SW4のいずれかが閉成されたとき割り込み信号出
力可能状態であればセツトされ、その出力がイン
バータ37を介してNANDゲート38及びNOR
ゲート23を制御するFF(フリツプフロツプ)3
9と、NANDゲート38から出力された信号を
切り出すラツチ回路40及びNORゲート41と、
NORゲート41の出力に依つてセツトされ割り
込み要求であることを記憶し割り込み信号INT
3を出力するFF42と、割り込み信号出力可能
状態及びスイツチデータの出力禁止であるかを記
憶するFF43とから構成される。
On the other hand, the interrupt generation circuit 36 switches SW 1 to
When any of SW 4 is closed, if the interrupt signal output is possible, it is set, and the output is sent to the NAND gate 38 and NOR via the inverter 37.
FF (flip-flop) 3 that controls the gate 23
9, a latch circuit 40 and a NOR gate 41 that cut out the signal output from the NAND gate 38,
The interrupt signal INT is set by the output of the NOR gate 41 to remember that it is an interrupt request.
It is composed of an FF 42 that outputs 3, and an FF 43 that stores the state in which interrupt signal output is enabled and whether output of switch data is prohibited.

次に第2図に示された回路の動作を説明する。
先ずNORゲート34の出力が“1”であると動
作開始信号CLKSTARTは“0”でありクロツ
クジエネレータ2の動作開始を指令していない。
またスイツチデータ保持解除信号−が
“1”であると分周出力φ10はNANDゲート2
9,30を介して出力され、ラツチ回路24,2
5,40及びD−FF32のクロツク端子φにク
ロツクを供給している。一方割り込み発生回路3
6がセツト状態にない場合はインバータ37の出
力“0”がNORゲート23に印加される。そこ
で例えばスイツチSW1が閉成され、外部端子S1
VDDレベル即ち“1”が印加されると、チヤタリ
ング防止回路22の出力は“1”から“0”にな
り、NANDゲート31の出力は“1”となる。
D−FF32は分周出力φ10の1周期遅れて反
転し出力“0”をNORゲート23に印加する。
“0”となつた出力に依りNORゲート23は導
通し、スイツチSW1が閉成されたことを示す信号
“1”を出力する。このとき、ラツチ回路24の
リセツト端子Rに印加されるスイツチ動作指定信
1が“1”であるとき、即ちスイツチSW1
の閉成が指定されていないときは、ラツチ回路2
4はリセツトされたままでありNORゲート27
の出力は“0”である。またラツチ回路25のス
イツチ動作指定信号1が“0”であつて
もラツチ回路25及びNORゲート28は入力信
号の立ち下がり時に動作するものであるからこの
時はNORゲート28の出力は“0”である。よ
つてNORゲート34の出力は“1”のままであ
り動作開始信号CLKSTARTは出力されない。
一方スイツチ動作指定信号1が“0”である
とき、インバータ26を介してNORゲート23
の出力の反転信号が印加されたラツチ回路24の
出力は“0”となつているためNORゲート2
7からは“1”が出力される。よつてNORゲー
ト34の出力は“0”となり、動作開始信号
CLKSTAT“1”が出力され、クロツクジエネレ
ータ2の動作が停止している場合には動作が再開
される。更にNORゲート34の出力“0”は
NANDゲート29に於いて分周出力φ10を遮
断するので、チヤタリング防止回路22、D−
FF32及びラツチ回路24,25の動作は停止
し、そのままの状態即ちスイツチデータが保持さ
れる。クロツクジエネレータ2の動作開始に依り
第1図に示されたROM7のプログラムは先に進
み、そのプログラム中のスイツチデータの入力命
令が実行されるとトランスミツシヨンゲート33
が開かれ、スイツチデータがデータバスDBに送
出される。
Next, the operation of the circuit shown in FIG. 2 will be explained.
First, when the output of the NOR gate 34 is "1", the operation start signal CLKSTART is "0" and does not instruct the clock generator 2 to start operating.
In addition, when the switch data hold release signal - is "1", the frequency divided output φ10 is output from the NAND gate 2.
9 and 30, and the latch circuits 24 and 2
A clock is supplied to the clock terminals φ of 5, 40 and D-FF 32. On the other hand, interrupt generation circuit 3
6 is not in the set state, the output "0" of the inverter 37 is applied to the NOR gate 23. So, for example, switch SW 1 is closed and external terminal S 1 is connected.
When the V DD level, that is, "1" is applied, the output of the chattering prevention circuit 22 changes from "1" to "0", and the output of the NAND gate 31 becomes "1".
The D-FF 32 is inverted one cycle after the frequency division output φ10 and applies an output “0” to the NOR gate 23.
The NOR gate 23 becomes conductive due to the output becoming "0" and outputs a signal " 1 " indicating that the switch SW1 is closed. At this time, when the switch operation designation signal 1 applied to the reset terminal R of the latch circuit 24 is "1", that is, the switch SW 1
When the closing of latch circuit 2 is not specified,
4 remains reset and NOR gate 27
The output of is "0". Furthermore, even if the switch operation designation signal 1 of the latch circuit 25 is "0", the latch circuit 25 and the NOR gate 28 operate at the falling edge of the input signal, so the output of the NOR gate 28 is "0" at this time. It is. Therefore, the output of the NOR gate 34 remains at "1" and the operation start signal CLKSTART is not output.
On the other hand, when the switch operation designation signal 1 is "0", the NOR gate 23
Since the output of the latch circuit 24 to which the inverted signal of the output of is applied is "0", the NOR gate 2
7 outputs "1". Therefore, the output of the NOR gate 34 becomes "0", and the operation start signal is
CLKSTAT "1" is output, and if the operation of the clock generator 2 has stopped, the operation is restarted. Furthermore, the output “0” of the NOR gate 34 is
Since the divided output φ10 is cut off at the NAND gate 29, the chattering prevention circuit 22, D-
The operation of the FF 32 and the latch circuits 24 and 25 is stopped, and the same state, that is, the switch data is maintained. When the clock generator 2 starts operating, the program in the ROM 7 shown in FIG. 1 advances, and when the switch data input command in the program is executed, the transmission gate 33
is opened and the switch data is sent to the data bus DB.

スイツチデータの保持を解除する信号−
RESETに“0”となるパルスが出力されると
NANDゲート30の出力は“1”となる。この
信号に依りラツチ回路24は反転しを“1”と
するためNORゲート27の出力は“0”となる。
よつてNORゲート34の出力は“1”となり動
作開始信号CLKSTARTは“0”となると共に
NANDゲート29は分周出力φ10を通過させ
る。
Signal to release switch data retention
When a pulse that becomes “0” is output to RESET
The output of the NAND gate 30 becomes "1". This signal causes the latch circuit 24 to invert and set the signal to "1", so the output of the NOR gate 27 becomes "0".
Therefore, the output of the NOR gate 34 becomes "1" and the operation start signal CLKSTART becomes "0".
The NAND gate 29 passes the divided output φ10.

スイツチSW1が開成された場合にはチヤタリン
グ防止回路22の出力は“0”から“1”とな
り、NORゲート23の出力は“1”から“0”
となる。前述した如くラツチ回路25にスイツチ
動作指定信号1“0”が印加されていれ
ばNORゲート28の出力は“1”となり、動作
開始信号CLKSTART“1”が出力されると共に
スイツチデータが保持される。
When switch SW 1 is opened, the output of the chattering prevention circuit 22 changes from “0” to “1”, and the output of the NOR gate 23 changes from “1” to “0”.
becomes. As mentioned above, if the switch operation designation signal 1 "0" is applied to the latch circuit 25, the output of the NOR gate 28 becomes "1", the operation start signal CLKSTART "1" is outputted, and the switch data is held. .

この様にラツチ回路24,25のリセツト端子
Rに印加されるスイツチ指定信号14及び
S1〜S4DOWNを選択することに依りスイツチ動
作の指定を設定することができ、指定されたスイ
ツチ動作が行なわれたときクロツクジエネレータ
2の動作を開始させることができる。尚スイツチ
指定信号14及び14は状態制御
回路4にその信号の数だけ設けられたFF(フリツ
プフロツプ)の出力が用いられ、またそのFFは
スイツチ動作指定命令の実行、例えばその命令コ
ードを110000XXXXXXXXとすると下位8ビツ
トのデータに依りセツトされる。
In this way, the switch designation signals 1 to 4 and
By selecting S 1 -S 4 DOWN, the designation of the switch operation can be set, and the operation of the clock generator 2 can be started when the designated switch operation is performed. For the switch designation signals 1 to 4 and 1 to 4 , the outputs of FFs (flip-flops) provided in the state control circuit 4 for the number of signals are used, and the FFs are used to execute the switch operation designation command, for example, the instruction code thereof. If it is 110000XXXXXXXX, it is set based on the data of the lower 8 bits.

一方スイツチSW1〜SW4のいずれかのスイツチ
の閉成に依り割り込み処理を行なうこともでき
る。即ち割り込みとするための命令が実行される
と割り込みセツト信号に“0”のパル
スが生じる。この信号に依りFF43は
セツトされ、その出力となり、NORゲート4
4の出力は“1”となる。“1”が印加されたFF
39はセツトされインバータ37の出力を“1”
としNANDゲート38を導通状態とすると共に
NORゲート23を遮断する。この状態でスイツ
チSW1〜SW4のいずれかが閉成されるとNAND
ゲート31の出力は“1”となるが、チヤタリン
グ防止回路22の出力はNORゲート23からは
出力されない。NANDゲート31の出力が“1”
となることに依つてNANDゲート38の出力は
“0”となりラツチ回路40及びNORゲート41
はその立ち下がりを切り出しFF42に“1”の
パルスを印加する。FF42はこのパルスに依つ
てセツトされ出力、即ち割り込み信号3を
“0”とする。割り込み信号3“0”に依つ
てクロツクジエネレータ2の動作は再開し、所定
の割り込み処理が為される。また割り込みが受付
けられるとリセツト信号INT3RESETが“1”
となるパルスが生じラツチ回路40及びFF42,
43がリセツトされる。一方FF39のリセツト
はスイツチSW1〜SW4を開成したときにD−FF
32の出力Q及びNANDゲート31の出力が印
加されたNORゲート45の出力が“1”となる
ことに依つて為される。
On the other hand, interrupt processing can also be performed by closing any one of the switches SW1 to SW4 . That is, when an instruction for setting an interrupt is executed, a pulse of "0" is generated in the interrupt set signal. FF43 is set by this signal and becomes its output, and NOR gate 4
The output of 4 becomes "1". FF to which “1” is applied
39 is set and the output of the inverter 37 is "1"
and makes the NAND gate 38 conductive.
Block NOR gate 23. If any of switches SW 1 to SW 4 is closed in this state, NAND
The output of the gate 31 becomes "1", but the output of the chattering prevention circuit 22 is not output from the NOR gate 23. The output of NAND gate 31 is “1”
As a result, the output of the NAND gate 38 becomes “0” and the latch circuit 40 and the NOR gate 41
cuts out the falling edge and applies a pulse of "1" to the FF42. The FF 42 is set by this pulse and outputs, ie, interrupt signal 3, to "0". The operation of the clock generator 2 is restarted in response to the interrupt signal 3 "0", and predetermined interrupt processing is performed. Also, when an interrupt is accepted, the reset signal INT3RESET becomes “1”.
A pulse is generated and the latch circuit 40 and FF 42,
43 is reset. On the other hand, FF39 is reset when switches SW 1 to SW 4 are opened.
This is done when the output of the NOR gate 45 to which the output Q of 32 and the output of the NAND gate 31 are applied becomes "1".

また割り込み発生回路36は命令に依つて強制
的に割り込みをかけることもできる。割り込み要
求の命令が実行されると割り込み要求信号
3REQ“0”が出力され、インバータ46を介
してFF42をセツトし割り込み信号3“0”
を出力させる。一方割り込み発生回路36がセツ
ト状態にあればFF43,39をリセツトする。
この割り込み要求命令が実行されるのは例えばア
ラーム発音中にモードチエンジ等が行なわれた場
合に強制的に割り込みをかけアラーム音を停止さ
せるときに用いられる。
The interrupt generation circuit 36 can also forcibly issue an interrupt depending on a command. When the interrupt request instruction is executed, interrupt request signal 3REQ "0" is output, FF42 is set via inverter 46, and interrupt signal 3 "0" is output.
output. On the other hand, if the interrupt generation circuit 36 is in the set state, the FFs 43 and 39 are reset.
This interrupt request command is executed, for example, when a mode change or the like is performed while an alarm is sounding, and it is used to forcibly interrupt and stop the alarm sound.

第3図及び第4図はROM7に書き込まれるプ
ログラム例を示すフローチヤートであり、第3図
はメインプログラム、第4図は割り込み処理プロ
グラムを示す。第3図及び第4図を参照して第1
図に示されたブロツク図の全体的な動作を説明す
る。
3 and 4 are flowcharts showing examples of programs written to the ROM 7, with FIG. 3 showing a main program and FIG. 4 showing an interrupt processing program. 1 with reference to Figures 3 and 4.
The overall operation of the block diagram shown in the figure will be explained.

先ず電源が印加されるとイニシヤルクリアが働
き各回路はリセツトされ、プログラムカウンタ8
はROM7の0番地を指定する。0番地からは初
期設定のためのプログラムが書き込まれており、
このプログラムの実行に依りRAM14内には
“0”あるいは所定のデータが記憶され初期設定
がされる。次にモードチエンジのプログラムが実
行される。このプログラムはスイツチ入力回路3
からスイツチの開閉を示すデータをデータバス
DBを介して入力し、そのデータの内容に依り現
在時刻モード、アラームモード、タイマーモード
あるいはクロノグラフモード更に他の機能が設け
られていればそのモードのいずれかが選択されて
いるのかを判定し、各モードに対応するRAM1
4内のフラツグをセツトする。そして選択された
プログラムが書き込まれたROM7の所定アドレ
スを指定し、そこへプログラムはジヤンプする。
本実施例ではモード選択を外部端子M1〜M4及び
S4に接続されたスイツチ(このスイツチを各々
MS1〜MS4及びSW4とする)で行ない、また外部
端子S1〜S3に接続されたスイツチ(このスイツチ
をSW1〜SW3とする)で修正の実行、ランプ点灯
及びアラーム音停止を行なう様プログラムされて
いる。しかし2個〜4個程度の任意のスイツチを
用いてモード選択あるいはその他の動作を行なわ
せる様にすることはプログラムの変更で容易にで
きる。またモードが変わつたとき、アラーム発音
中であれば割り込み要求信号INT3REQを出力
させ、割り込み処理INT3に依りアラーム音を
停止させる。
First, when power is applied, initial clear is activated, each circuit is reset, and the program counter 8 is reset.
specifies address 0 of ROM7. Starting from address 0, a program for initial settings is written.
By executing this program, "0" or predetermined data is stored in the RAM 14 and initial settings are made. Next, a mode change program is executed. This program is switch input circuit 3
Data indicating whether the switch is open or closed is transferred from the data bus.
Input via DB and determine whether current time mode, alarm mode, timer mode, chronograph mode, or other modes are selected depending on the content of the data. , RAM1 corresponding to each mode
Set the flags in 4. Then, a predetermined address of the ROM 7 in which the selected program is written is specified, and the program jumps there.
In this embodiment, mode selection is performed using external terminals M 1 to M 4 and
switch connected to S 4 (each
MS 1 to MS 4 and SW 4 ), and switches connected to external terminals S 1 to S 3 (these switches are SW 1 to SW 3 ) are used to execute corrections, turn on the lamp, and stop the alarm sound. It is programmed to do this. However, by changing the program, it is possible to use two to four arbitrary switches to select a mode or perform other operations. Furthermore, when the mode is changed, if an alarm is being sounded, an interrupt request signal INT3REQ is output, and the alarm sound is stopped according to the interrupt processing INT3.

現在時刻モードの場合、先ず現在時刻表示が行
なわれる。これはRAM14のアドレス指定がで
きる表示命令に依つてRAM14内の所定アドレ
スに各桁毎に記憶された秒、分、時、月、日、曜
等を順次アドレスして、そのデータをデータバス
DBに送出させ、デコーダ15で変換されたセグ
メント信号を表示すべきラツチ回路16に記憶さ
せる。このときデコーダ15には予めデータバス
DBが接続される様に命令で制御しておく。特に
時の表示の場合には12時間表示あるいは24時間表
示のいずれが選択されているかを判定し、その表
示に合つた処理を行ないその結果をデコーダ15
に印加して表示する。一方曜日表示の場合にはデ
コーダ15の機能を曜日変換用に命令で切り換え
てから曜日のデータを印加する。ラツチ回路16
は記憶されたセグメント信号を次に新しいセグメ
ントデータが書き変えられるまで外部端子a〜g
に出力し続けるのでクロツクジエネレータ2の動
作が停止しても表示は為される。
In the current time mode, the current time is first displayed. This is done by sequentially addressing the seconds, minutes, hours, month, day, day, etc. stored in each digit at a predetermined address in the RAM 14 using a display command that can specify addresses in the RAM 14, and transmitting the data to the data bus.
The segment signal converted by the decoder 15 is stored in the latch circuit 16 to be displayed. At this time, the decoder 15 has a data bus in advance.
Control with commands so that the DB is connected. In particular, in the case of hour display, it is determined whether 12-hour display or 24-hour display is selected, processing is performed that suits the display, and the result is sent to the decoder 15.
is applied and displayed. On the other hand, in the case of displaying the day of the week, the function of the decoder 15 is switched by a command for converting the day of the week, and then data on the day of the week is applied. Latch circuit 16
is the stored segment signal until the next new segment data is rewritten to the external terminals a to g.
Since the clock generator 2 continues to be outputted, the display will continue even if the clock generator 2 stops operating.

上述の様に表示が行なわれると、次にRAM1
4内の修正モードであるか否かを示すフラツグの
判定を行ない、通常表示モードであればスイツチ
SW1の閉成、修正モードであればスイツチSW1〜3
の閉成を設定する。即ちこの命令の実行に依り状
態制御回路4はスイツチ制御信号SWCONを出力
しスイツチ入力回路3を制御して指定されたスイ
ツチの指定された動作、即ちスイツチSW1の閉成
あるいはスイツチSW1〜3の閉成が為されたときだ
け動作開始信号CLKSTARTが出力される様に
制御する。スイツチの設定が完了すると次にクロ
ツクジエネレータ2の動作を停止させるための命
令“SCP”が実行される。この命令コードがイン
ストラクシヨンバスIBに送出され状態制御回路
4に印加されると状態制御回路4は停止信号
CLKSTOPを出力し、クロツクジエネレータ2
内のフリツプフロツプをセツトする。このフリツ
プフロツプのセツトに依り基準信号発生回路1か
らの分周信号を遮断しシステムクロツクの発生が
停止される。従つてプログラムの実行は停止命令
“SCP”のまま次に進まず、プログラムに依る動
作はすべて停止している。よつてこの間はシステ
ムに流れる電流は激減する。
After the display is performed as described above, RAM1
4, which indicates whether the mode is in correction mode or not, and if it is in normal display mode, the switch is turned on.
Close SW 1 , switch SW 1 to 3 if in correction mode
Set the closure of That is, in response to the execution of this command, the state control circuit 4 outputs the switch control signal SWCON and controls the switch input circuit 3 to perform the specified operation of the specified switch, that is, to close switch SW 1 or to switch SW 1 to SW 3. Control is performed so that the operation start signal CLKSTART is output only when the closing is performed. When the switch settings are completed, a command "SCP" for stopping the operation of the clock generator 2 is executed. When this instruction code is sent to the instruction bus IB and applied to the state control circuit 4, the state control circuit 4 sends a stop signal.
Output CLKSTOP and clock generator 2
Set the flip-flop inside. By setting this flip-flop, the divided signal from the reference signal generating circuit 1 is cut off, and generation of the system clock is stopped. Therefore, the execution of the program does not proceed to the next step with the stop command "SCP", and all operations based on the program are stopped. Therefore, during this time, the current flowing through the system is drastically reduced.

再びクロツクジエネレータ2の動作が開始され
るのは指定されたスイツチの動作が為された場
合、割り込み要求INT0,1,2,3があつた
場合及びタイマーカウンタ5がカウントアツプし
た場合であり、クロツクジエネレータ2のフリツ
プフロツプはそれらの信号でリセツトされる。割
り込みの場合にはクロツクジエネレータ2の動作
は開始するが、プログラムカウンタ8の内容即ち
停止命令“SCP”をアドレスする内容がスタツク
9に退避し、第4図に示された割り込み処理プロ
グラムを示すアドレスがプログラムカウンタ8に
セツトされる。そして割り込み処理が終了すると
スタツク9に退避したアドレスがプログラムカウ
ンタ8にセツトされるため再び停止命令“SCP”
が実行され動作が停止する。一方指定されたスイ
ツチの動作が為されるとスイツチ入力回路3は動
作開始信号CLKSTARTを出力し、またタイマ
ーカウンタ5はカウントアツプするとタイマー出
力TIMEROUTを出力する。これら出力に依り
クロツクジエネレータ2のフリツプフロツプはリ
セツトされ動作が再開し、プログラムは次に進
む。
The clock generator 2 starts operating again when a specified switch is operated, when an interrupt request INT0, 1, 2, or 3 is received, or when the timer counter 5 counts up. , the flip-flops of clock generator 2 are reset by these signals. In the case of an interrupt, the clock generator 2 starts operating, but the contents of the program counter 8, that is, the contents addressing the stop instruction "SCP", are saved to the stack 9, and the interrupt processing program shown in FIG. The address indicated is set in the program counter 8. When the interrupt processing is completed, the address saved in stack 9 is set in program counter 8, so the stop command "SCP" is issued again.
is executed and the operation stops. On the other hand, when the specified switch is operated, the switch input circuit 3 outputs an operation start signal CLKSTART, and when the timer counter 5 counts up, it outputs a timer output TIMEROUT. These outputs reset the flip-flop of clock generator 2 to resume operation and the program proceeds to the next step.

次のプログラムはRAM14内のモードチエン
ジフラツグを調べモードチエンジ要求があるか否
か判定する。モードチエンジ要求ならば前述した
モードチエンジのプログラムにジヤンプし、要求
がないならば次のプログラムに進む。モードチエ
ンジフラツグをセツトあるいはリセツトするのは
割り込み処理INT0で行なわれる。INT0は後
述するが、モードを選択するスイツチMS1〜MS4
及びSW4の状態を定期的に調べモードチエンジな
らばそのフラツグを“1”とし、タイマーカウン
タ5をスタートさせている。従つてモードチエン
ジ要求のときにタイマー出力TIMEROUTを用
いてクロツクジエネレータ2を動作させモードチ
エンジを行なうのである。
The next program checks the mode change flag in the RAM 14 and determines whether there is a mode change request. If a mode change is requested, the program jumps to the mode change program described above, and if there is no request, the program proceeds to the next program. The mode change flag is set or reset by interrupt processing INT0. INT0 will be described later, but it is a switch for selecting the mode MS 1 to MS 4
The status of SW 4 is periodically checked, and if the mode is changed, the flag is set to "1" and the timer counter 5 is started. Therefore, when a mode change is requested, the timer output TIMEROUT is used to operate the clock generator 2 to perform the mode change.

一方モードチエンジ要求がない場合は指定され
たスイツチの動作が為された場合であり、次のプ
ログラムに依つて修正モードであるか否か、スイ
ツチSW1〜SW3のいずれが閉成されたかを判定
し、その操作に対応する処理を行なう。例えば通
常モードでスイツチSW1が閉成された場合にはラ
ンプ点灯の命令を実行し、状態制御回路4の外部
端子LAMPを“1”とし、次の命令でスイツチ
SW1の開成を指定しクロツクの停止命令“SCP”
を実行する。そしてスイツチSW1が開成されると
前述の如く動作が再び開始し、ランプ消灯の命令
が実行され、再びスイツチ設定のプログラムにジ
ヤンプする。また修正モードに於いてスイツチ
SW1が閉成された場合にはRAM14内に記憶さ
れた秒のデータを“0”に書き変える。このとき
29秒か30秒かを判定して30秒以上であれば桁止げ
処理を行なう。スイツチSW2あるいはSW3が閉成
された場合にはRAM14内の時あるいは分を
ALU12に転送し1を加算し再びRAM14に書
き込む。更にスイツチSW2あるいはSW3が閉成さ
れ続けられている場合には早送り修正とする。こ
の場合にもスイツチ動作の指定とクロツクの動作
停止命令“SCP”を用いて行う。即ち、タイマー
カウンタ5を1秒に設定してスタートさせ次にス
イツチSW2及びSW3の開成を指定した後停止命令
“SCP”を実行する。従つてクロツクジエネレー
タ2が動作開始するのはスイツチSW2あるいは
SW3が開成された場合とタイマーカウンタ5が1
秒計数した場合であり、動作開始後のプログラム
でスイツチSW2あるいはSW3を判定することに依
り一定時間閉成されていたか否かが判別でき、閉
成の場合にはRAM14内の時あるいは分に1を
加算した後タイマーカウンタ5に250msを設定
し再びスイツチSW2及びSW3の開成を指定するプ
ログラムにジヤンプする。これに依り250ms毎
にスイツチSW2あるいはSW3が開成されるまで加
算され早送りされる。この修正のプログラムに於
いて、秒のリセツト、分あるいは時の加算処理が
行なわれると表示命令に依つて修正されたデータ
が直ちにデータバスDBに送出され表示される。
スイツチSW2及びSW3が開成されると修正のプロ
グラムから前述したスイツチ設定のプログラムに
ジヤンプする。
On the other hand, if there is no mode change request, it means that the specified switch has been operated, and the next program will determine whether it is in the correction mode or not and which of switches SW 1 to SW 3 has been closed. It makes a judgment and performs the processing corresponding to the operation. For example, when switch SW 1 is closed in normal mode, a command to turn on the lamp is executed, the external terminal LAMP of state control circuit 4 is set to "1", and the next command turns on the switch.
Specify SW 1 open and clock stop command “SCP”
Execute. When the switch SW1 is opened, the operation starts again as described above, the command to turn off the lamp is executed, and the program jumps to the switch setting program again. Also, in the correction mode, switch
When SW 1 is closed, the second data stored in the RAM 14 is rewritten to "0". At this time
Determine whether it is 29 seconds or 30 seconds, and if it is 30 seconds or more, perform digit stop processing. When switch SW 2 or SW 3 is closed, the hour or minute in RAM 14 is
It is transferred to the ALU 12, incremented by 1, and written to the RAM 14 again. Furthermore, if switch SW 2 or SW 3 continues to be closed, fast-forward correction is performed. In this case as well, the switch operation is designated and the clock operation stop command "SCP" is used. That is, the timer counter 5 is set to 1 second and started, and after specifying the opening of switches SW 2 and SW 3 , the stop command "SCP" is executed. Therefore, clock generator 2 starts operating when switch SW 2 or
When SW 3 is opened and timer counter 5 is 1
This is a case where seconds are counted, and by determining switch SW 2 or SW 3 in the program after the operation starts, it can be determined whether it has been closed for a certain period of time. After adding 1 to , it sets 250 ms to timer counter 5 and jumps to the program that specifies opening of switches SW 2 and SW 3 again. As a result, the values are added and fast-forwarded every 250 ms until switch SW 2 or SW 3 is opened. In this modification program, when the seconds are reset and the minutes or hours are added, the data modified by the display command is immediately sent to the data bus DB and displayed.
When switches SW 2 and SW 3 are opened, the program jumps from the modification program to the switch setting program described above.

アラームモード、タイマーモード及びクロノグ
ラフモードも前述の現在時刻モードと同様のパタ
ーンでプログラムされている。
Alarm mode, timer mode, and chronograph mode are also programmed in the same pattern as the current time mode described above.

アラームモードになると表示命令に依つて
RAM14のアラーム時刻の記憶されているアド
レスのデータを桁毎に順次指定し表示する。スイ
ツチの指定はアラーム設定モードではスイツチ
SW13の閉成を指定し、アラーム表示モードで
はスイツチSW1の閉成を指定し、動作停止命令
“SCP”を実行する。モードチエンジ要求がなく
指定されたスイツチの閉成が為されるとアラーム
時刻設定、表示及びランプ点滅プログラムに進
む。アラームモードの場合スイツチSW1が閉成さ
れるとアラーム設定モードであつてもランプ点灯
命令、スイツチSW1の開成指定及び動作停止命令
“SCP”が実行され、動作開始後ランプ消灯命令
を実行することに依りランプの点灯及び消灯が為
される。一方スイツチSW2又はSW3が閉成された
場合はアラーム時刻設定モードであり、アラーム
時刻の分又は時の設定が為される。このプログラ
ムは現在時刻の修正プログラムと同じものが用い
られ、加算処理を行なうプログラムをサブルーチ
ンとし、アラーム時刻の時又は分を記憶する
RAM14のアドレスを指定する様プログラムし
ておく。もちろん設定された内容は直ちに表示命
令で表示される。
When in alarm mode, depending on the display command
The data at the address where the alarm time is stored in the RAM 14 is sequentially designated and displayed digit by digit. The switch can be specified in alarm setting mode.
Specify the closing of SW 1 to 3 , specify the closing of switch SW 1 in alarm display mode, and execute the operation stop command “SCP”. If there is no mode change request and the specified switch is closed, the program proceeds to alarm time setting, display and lamp blinking programs. In the alarm mode, when switch SW 1 is closed, the lamp lighting command, switch SW 1 open designation, and operation stop command "SCP" are executed even in the alarm setting mode, and after the operation starts, the lamp extinguishing command is executed. Depending on the situation, the lamp is turned on and off. On the other hand, when the switch SW 2 or SW 3 is closed, the mode is the alarm time setting mode, and the minute or hour of the alarm time is set. This program uses the same program as the current time correction program, and uses the addition process as a subroutine to memorize the hour or minute of the alarm time.
Program it to specify the address of RAM14. Of course, the set contents are immediately displayed by a display command.

タイマーモードの場合も同様にタイマー時間表
示プログラム、スイツチ設定プログラム及び動作
停止命令“SCP”が順次実行される。この場合の
タイマーはタイマーカウンタ5ではなく、RAM
14内に記憶された秒、分、時のタイマーであ
る。従つて表示命令はRAM14内のタイマーを
アドレスする。タイマーモードの場合には修正モ
ードは無く、スイツチ設定のときにはアラーム音
発生を行なうか否かを判定し、アラーム音を発生
するときはスイツチSW1〜SW3の閉成を設定し、
アラーム音の発生をしないときはスイツチSW1
閉成のみを設定する。動作が再開してモードチエ
ンジがなければプログラムはタイマー時間設定、
表示、スタート、ストツプ及びランプ点滅プログ
ラムに進む。スイツチSW1が閉成されたときアラ
ーム音を発生しないモードであればランプの点灯
及び消灯を現在時刻モード、アラームモードの場
合と同様にランプ点滅プログラムで行なう。一方
アラーム音を発生するモードでスイツチSW2又は
SW3が閉成されると分又は時や修正プログラムに
依つて修正される。またアラーム音を発生するモ
ードでスイツチSW1が閉成されると、タイマーが
セツトされている場合にはタイマースタート用の
フラツグをRAM14内にセツトし、タイマーが
セツトされていない場合には何も行なわずにスイ
ツチ設定にジヤンプする。
In the timer mode, the timer time display program, switch setting program, and operation stop command "SCP" are similarly executed in sequence. In this case, the timer is not timer counter 5, but RAM
It is a timer with seconds, minutes, and hours stored in 14. The display command therefore addresses a timer in RAM 14. In the timer mode, there is no correction mode, and when setting the switch, it is determined whether or not to generate an alarm sound, and when the alarm sound is to be generated, switches SW 1 to SW 3 are set to close.
When not generating an alarm sound, only set switch SW 1 to close. If the operation resumes and there is no mode change, the program will set the timer time,
Proceed to display, start, stop and lamp flashing programs. If the mode does not generate an alarm sound when the switch SW 1 is closed, the lamp is turned on and off using the lamp blinking program in the same way as in the current time mode and alarm mode. On the other hand, switch SW 2 or
Once SW 3 is closed, it will be modified depending on the minute or hour and modification program. Also, when switch SW 1 is closed in a mode that generates an alarm sound, a flag for starting the timer is set in the RAM 14 if the timer is set, and nothing is done if the timer is not set. Jump to the switch setting without doing so.

クロノグラフモードの場合のクロノ表示は先ず
RAM14内のクロノグラフ時間の1/10秒、秒、
分、時を順次表示命令で表示し、更にデータバス
DBとクロノデータバスCDBの切り換え命令でデ
コーダ15にクロノデータバスCDBを切り換え
ることに依り、クロノグラフカウンタ6の1/100
秒のデータが表示される。この様に直接1/100秒
のデータをデコーダ15に印加するのはプログラ
ムで桁毎に表示を行なつていたのでは処理時間が
長く1/100秒のデータに追従することができず正
確な表示ができないからである。
The chronograph display in chronograph mode is
1/10 second of the chronograph time in RAM14, second,
The minutes and hours are displayed sequentially using the display command, and the data bus
1/100 of the chronograph counter 6 by switching the chronograph data bus CDB to the decoder 15 with a switching command between DB and chronograph data bus CDB.
Second data is displayed. Directly applying 1/100 second data to the decoder 15 in this way would require a program to display each digit, which would take a long processing time and would not be able to track 1/100 second data, resulting in accurate data. This is because it cannot be displayed.

スイツチ設定ではスイツチSW1及び2の閉成が
設定される。スイツチSW1又は2が閉成されると
動作が開始してプログラムが先に進むが、クロノ
グラフモードの場合にはプログラムとは無関係に
スイツチ入力回路3からクロノグラフ制御信号
CHRCONが出力されクロノグラフカウンタ6を
制御する。即ちスイツチSW1の閉成で出力される
クロノグラフ制御信号CHRCONに依りクロノグ
ラフカウンタ6内のスタート及びストツプを制御
するフリツプフロツプがセツト又はリセツトさ
れ、スイツチSW2の閉成で出力されるクロノグラ
フ制御信号CHRCONは1/100秒のラツプを表示
させるためのラツプフラツグ用のフリツプフロツ
プをセツトあるいはリセツトする。
In the switch setting, switches SW 1 and 2 are set to close. When switch SW 1 or 2 is closed, the operation starts and the program proceeds, but in the case of chronograph mode, the chronograph control signal is sent from switch input circuit 3 regardless of the program.
CHRCON is output and controls the chronograph counter 6. That is, the flip-flop that controls start and stop in the chronograph counter 6 is set or reset by the chronograph control signal CHRCON output when switch SW 1 is closed, and the chronograph control signal CHRCON is output when switch SW 2 is closed. Signal CHRCON sets or resets the flip-flop for the lap flag to display 1/100 second laps.

一方プログラムはクロノグラフカウンタ6がス
タートしているか否か、またラツプ状態にあるか
否かをクロノグラフカウンタ6内の制御用フリツ
プフロツプ及びラツプフラツグ用のフリツプフロ
ツプを調べ、RAM14内のクロノストツプフラ
ツグ及びラツプフラツグをセツト又はリセツトす
る。更に、クロノグラフカウンタ6がストツプ状
態に於いてスイツチSW2が閉成され、ラツプフラ
ツグがセツトされたときはRAM14内のクロノ
グラフのデータをリセツトする。このプログラム
の終りにRAM14内のクロノグラフデータを表
示命令で表示し、スイツチ設定にジヤンプする。
尚クロノグラフカウンタ6から1/10秒毎に出力さ
れる割り込み信号INT1に依りRAM14内のク
ロノグラフデータに加算処理が為される。
On the other hand, the program checks the control flip-flop and wrap flag flip-flop in the chronograph counter 6 to determine whether the chronograph counter 6 has started or is in a wrap state, and checks the chrono stop flag and wrap flag in the RAM 14. Set or reset. Further, when the switch SW 2 is closed while the chronograph counter 6 is in the stopped state and the wrap flag is set, the chronograph data in the RAM 14 is reset. At the end of this program, the chronograph data in the RAM 14 is displayed using a display command, and a jump is made to the switch settings.
Incidentally, addition processing is performed on the chronograph data in the RAM 14 according to the interrupt signal INT1 output from the chronograph counter 6 every 1/10 seconds.

第3図に示された割り込み処理INT0は一定
時間例えば62.5ms毎にかかるものであり、スイ
ツチMS1〜MS4及びSW4のサンプリングを行な
う。即ちスイツチMS1〜MS4及びSW4のデータを
スイツチ入力回路3から入力してRAM14内に
記憶させ、前回にサンプリングしたデータと比較
する。その結果変化が無い場合はRAM14内の
モードチエンジフラツグをリセツトしてメインプ
ログラムにリターンし、変化がある場合にはモー
ドチエンジフラツグをセツトし且つタイマーカウ
ンタ5を32msにセツトしスタートさせてリター
ンする。
The interrupt processing INT0 shown in FIG. 3 takes a certain period of time, for example, every 62.5 ms, and samples the switches MS 1 to MS 4 and SW 4 . That is, the data of the switches MS 1 to MS 4 and SW 4 are inputted from the switch input circuit 3, stored in the RAM 14, and compared with the data sampled last time. If there is no change as a result, reset the mode change flag in RAM 14 and return to the main program; if there is a change, set the mode change flag and timer counter 5 to 32ms, start it, and return. do.

割り込み処理INT1はクロノグラフカウンタ
6がスタートしているとき1/10秒毎にかかるもの
である。この処理はRAM14内のクロノグラフ
データの1/10秒データに1を加算し、キヤリーが
あればクロノグラフの秒データに桁上げし更にキ
ヤリーがあればその上位桁にと順次桁上げ処理を
行なう。次にクロノモードで且つラツプ状態でな
ければクロノグラフのデータを表示命令で表示し
メインプログラムにリターンする。
Interrupt processing INT1 takes place every 1/10 second when the chronograph counter 6 is started. This process adds 1 to the 1/10 second data of the chronograph data in RAM 14, and if there is a carry, it is carried to the chronograph second data, and if there is a carry, it is carried to the upper digit, and so on. . Next, if the chronograph mode is not in the lap state, the chronograph data is displayed using a display command and the process returns to the main program.

割り込み処理INT2は1/2秒毎に基準信号発生
回路1からかかるものであり、計時処理等を行な
う。先ずRAM14内の1/2秒フラツグのデータ
をALU12に取り込み1を加算し、その結果
“1”であるが“2”であるか判定する。“1”で
あればメインプログラムにリターンする。“2”
のときは1/2秒フラツグに“0”を入れ、タイマ
ー処理を行なう。タイマー処理はタイマーがスタ
ートしている場合のみ実行され、スタートしてい
る場合にはRAM14内のタイマーデータの秒か
ら1を減算し、ボローがあれば更に上位桁から1
を減算してボロー処理を行なう。またその結果、
秒、分、時がすべて“0”になつたか判定し
“0”であればアラーム発音命令を実行しタイマ
ー用のアラーム音を外部端子ALMに出力する。
次に現在時刻の秒データに1を加算しキヤリーが
あれば桁上げ処理を行なう。この桁上げ処理で分
桁への桁上げがあるとアラーム処理及びスヌーズ
処理を行なう。アラーム処理はRAM14内に記
憶された時及び分データと桁上げ処理後の現在時
刻の時及び分データを各桁毎にALU12に取り
出し一致しているか否か判定する。一致していれ
ばアラーム音発生命令及び割り込みINT3のセ
ツト命令を実行しスイツチ入力回路3からの割り
込みを可能とする。スヌーズ処理はスヌーズ要求
があるか否か判定し、スヌーズ要求の場合には
RAM14内のスヌーズ分データに1を加算し、
その結果が所定の時間例えば5分になつたならば
アラーム音発生命令及び割り込みINT3のセツ
ト命令を再び実行する。次にRAM14内のモー
ドフラツグが現在時刻モードであるか判定し、現
在時刻モードであれば桁上げされた新しい現在時
刻データを表示し、他のモードであればそのまま
メインプログラムにリターンする。
The interrupt processing INT2 is generated from the reference signal generation circuit 1 every 1/2 second, and performs timekeeping processing and the like. First, the data of the 1/2 second flag in the RAM 14 is taken into the ALU 12 and 1 is added to it, and it is determined whether the result is "1" or "2". If it is "1", it returns to the main program. “2”
In this case, set "0" to the 1/2 second flag and perform timer processing. Timer processing is executed only when the timer has started. If it has started, 1 is subtracted from the seconds of the timer data in RAM 14, and if there is a borrow, 1 is further added from the upper digit.
Perform borrow processing by subtracting . Also, as a result,
It is determined whether the seconds, minutes, and hours have all become "0", and if they are "0", an alarm sound command is executed and an alarm sound for the timer is output to the external terminal ALM.
Next, 1 is added to the second data of the current time, and if there is a carry, carry processing is performed. If there is a carry to the minute digit in this carry process, alarm processing and snooze processing are performed. In the alarm process, the hour and minute data stored in the RAM 14 and the hour and minute data of the current time after the carry process are extracted for each digit into the ALU 12 and it is determined whether they match. If they match, an alarm sound generation command and an interrupt INT3 set command are executed to enable an interrupt from the switch input circuit 3. Snooze processing determines whether there is a snooze request, and if there is a snooze request,
Add 1 to the snooze data in RAM14,
When the result reaches a predetermined time, for example, 5 minutes, the alarm sound generation command and interrupt INT3 set command are executed again. Next, it is determined whether the mode flag in the RAM 14 is the current time mode, and if the mode is the current time mode, the new, carried current time data is displayed, and if it is another mode, the process returns to the main program.

割り込み処理INT3はアラーム音の発生時に
スイツチ入力回路3にセツトされスイツチSW1
SW4のいずれかを閉成したときに要求される。こ
の処理は状態制御回路4の外部端子ALMから出
力されているアラーム信号をアラーム音停止命令
で停止させ、スヌーズ要求があればスヌーズフラ
ツグをセツトすると共にRAM14内のスヌーズ
分データをセツトしてリターンする。またスヌー
ズ要求がなければアラーム音マークの点滅表示を
ストツプしスヌーズフラツグをリセツトしてリタ
ーンする。割り込みINT3がセツトされている
場合にはスイツチ指定が為されたSW1〜SW4のい
ずれを操作しても割り込み信号INT3のみがス
イツチ入力回路3から出力されるだけであり、ス
イツチ指定は無視される。
Interrupt processing INT3 is set to switch input circuit 3 when an alarm sound occurs, and switches SW 1 to
Required when any SW 4 is closed. This process stops the alarm signal output from the external terminal ALM of the state control circuit 4 with an alarm sound stop command, sets the snooze flag if there is a snooze request, sets the snooze data in the RAM 14, and returns. do. If there is no snooze request, the flashing of the alarm sound mark is stopped, the snooze flag is reset, and the process returns. If interrupt INT3 is set, even if any of SW 1 to SW 4 for which a switch is specified is operated, only the interrupt signal INT3 will be output from the switch input circuit 3, and the switch specification will be ignored. Ru.

割り込み処理の優先順位はINT0,1,2,
3の順番であり、これは制御回路11に依つて決
定されている。また割り込み信号INT0,1,
2,3は制御回路11のフリツプフロツプを各々
セツトする様接続され、割り込み禁止の場合には
その禁止が解除されてから割り込み処理が為され
る。これら割り込み処理がシステムクロツクの停
止中に要求された場合は割り込み処理後は再び動
作停止命令“SCP”が実行される。
The priority order of interrupt processing is INT0, 1, 2,
3, which is determined by the control circuit 11. Also, interrupt signals INT0, 1,
2 and 3 are connected to set the flip-flops of the control circuit 11, respectively, and when interrupts are disabled, interrupt processing is performed after the inhibition is canceled. If these interrupt processing are requested while the system clock is stopped, the operation stop command "SCP" is executed again after the interrupt processing.

上述の如く本発明に依ればスイツチの閉成に依
る割り込み処理とスイツチ操作の指定が行なえ、
指定されたスイツチの操作が為された場合にだけ
クロツクジエネレータの動作を再開できるもので
あり、またスイツチの機能をプログラムに依つて
設定できるので仕様変更の際の規制が無くなり汎
用性のある電子時計が得られ、更に必要なとき以
外はシステムの動作を停止させているため消費電
力が大幅に減少するものである。
As described above, according to the present invention, interrupt processing and switch operation can be specified by closing the switch.
The clock generator can restart operation only when the specified switch is operated, and since the switch functions can be set by a program, there are no restrictions when changing specifications, making it highly versatile. An electronic clock is obtained, and power consumption is greatly reduced because the system stops operating except when necessary.

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

第1図は本発明の実施例を示すブロツク図、第
2図は第1図に示されたスイツチ入力回路の一部
回路図、第3図及び第4図はプログラムの例を示
すフローチヤートである。 1……基準信号発生回路、2……クロツクジエ
ネレータ、3……スイツチ入力回路、4……状態
制御回路、5……タイマーカウンタ、6……クロ
ノグラフカウンタ、7……ROM、8……プログ
ラムカウンタ、9……スタツク、10……インス
トラクシヨンレジスタ、11……制御回路、12
……ALU、13……ACC、14……RAM、1
5……デコーダ、16……ラツチ回路。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a partial circuit diagram of the switch input circuit shown in FIG. 1, and FIGS. 3 and 4 are flowcharts showing example programs. be. DESCRIPTION OF SYMBOLS 1... Reference signal generation circuit, 2... Clock generator, 3... Switch input circuit, 4... State control circuit, 5... Timer counter, 6... Chronograph counter, 7... ROM, 8... ...Program counter, 9...Stack, 10...Instruction register, 11...Control circuit, 12
...ALU, 13...ACC, 14...RAM, 1
5...Decoder, 16...Latch circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 基準信号発生回路と、該基準信号発生回路の
出力に基いて回路全体の動作を制御するクロツク
信号を発生するクロツクジエネレータと、外部に
接続された複数のスイツチの開閉信号を取り込む
スイツチ入力回路と、計時動作を行うプログラム
が書き込まれたROMと、時、分、秒等のデータ
が記憶されるRAMと、演算処理等を行うALU
と、前記RAM及びALU等に接続されデータの伝
達を行うデータバスと、該データバスに送出され
たデータをセグメント信号に変換し記憶する表示
回路と、前記ROMから順次読み出された命令を
解読し、前記各回路を制御する信号を出力する制
御回路と、該制御回路から出力された信号に基い
て、前記クロツクジエネレータの動作を停止させ
る信号を出力すると共に、前記複数のスイツチの
各々の閉成及び開放の検出を指示する信号、及
び、前記複数のスイツチのいずれかが操作された
とき割込み信号を発生するか否かを指示する信号
を出力する状態制御回路とを備え、前記スイツチ
入力回路が前記状態制御回路の出力によつて指定
されたスイツチの閉成あるいは開放を検出した信
号、あるいは、スイツチの操作により発生する割
込み信号で前記クロツクジエネレータの動作を再
開させることを特徴とする電子時計。
1. A reference signal generation circuit, a clock generator that generates a clock signal that controls the operation of the entire circuit based on the output of the reference signal generation circuit, and a switch input that receives open/close signals from multiple externally connected switches. A circuit, a ROM in which a program for timekeeping operations is written, a RAM in which data such as hours, minutes, seconds, etc. are stored, and an ALU that performs arithmetic processing, etc.
, a data bus that is connected to the RAM, ALU, etc. and transmits data; a display circuit that converts the data sent to the data bus into segment signals and stores them; and a display circuit that decodes instructions sequentially read from the ROM. a control circuit that outputs a signal to control each of the circuits; and a control circuit that outputs a signal that stops the operation of the clock generator based on the signal output from the control circuit, and that controls each of the plurality of switches. and a state control circuit that outputs a signal instructing detection of closing and opening of the plurality of switches, and a signal instructing whether or not to generate an interrupt signal when any of the plurality of switches is operated. The clock generator is characterized in that the input circuit restarts the operation of the clock generator in response to a signal that detects the closing or opening of a switch designated by the output of the state control circuit, or an interrupt signal generated by the operation of a switch. Electronic clock.
JP56138737A 1981-09-01 1981-09-02 Electronic clock Granted JPS5839982A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP56138737A JPS5839982A (en) 1981-09-02 1981-09-02 Electronic clock
GB08224813A GB2107494B (en) 1981-09-01 1982-08-31 Electronic timepiece with microprocessor
GB08416804A GB2143656B (en) 1981-09-01 1984-07-02 Electronic timepiece with microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56138737A JPS5839982A (en) 1981-09-02 1981-09-02 Electronic clock

Publications (2)

Publication Number Publication Date
JPS5839982A JPS5839982A (en) 1983-03-08
JPS634675B2 true JPS634675B2 (en) 1988-01-29

Family

ID=15228989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56138737A Granted JPS5839982A (en) 1981-09-01 1981-09-02 Electronic clock

Country Status (1)

Country Link
JP (1) JPS5839982A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0717047U (en) * 1993-06-18 1995-03-28 武盛 豊永 Pet seat for male dogs

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2707961B2 (en) * 1993-12-24 1998-02-04 日本電気株式会社 Duplex system
JP6447802B2 (en) * 2014-01-20 2019-01-09 セイコーエプソン株式会社 Electrophoretic display device, electronic timepiece, wristwatch, and operation method of electrophoretic display device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS514302U (en) * 1974-06-26 1976-01-13
JPS515732U (en) * 1974-06-29 1976-01-16
JPS5368051A (en) * 1976-11-29 1978-06-17 Sharp Corp Integrated circuit device
JPS53143368A (en) * 1977-05-20 1978-12-13 Seiko Instr & Electronics Ltd Electronic watch
JPS53146666A (en) * 1977-05-26 1978-12-20 Seiko Instr & Electronics Ltd Watch logic circuit
JPS5441776A (en) * 1977-09-08 1979-04-03 Sharp Corp Microprocessor system for watches
JPS55142272A (en) * 1979-04-24 1980-11-06 Citizen Watch Co Ltd Electronic watch

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4919924U (en) * 1972-05-23 1974-02-20
JPS4951307U (en) * 1972-08-07 1974-05-07

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS514302U (en) * 1974-06-26 1976-01-13
JPS515732U (en) * 1974-06-29 1976-01-16
JPS5368051A (en) * 1976-11-29 1978-06-17 Sharp Corp Integrated circuit device
JPS53143368A (en) * 1977-05-20 1978-12-13 Seiko Instr & Electronics Ltd Electronic watch
JPS53146666A (en) * 1977-05-26 1978-12-20 Seiko Instr & Electronics Ltd Watch logic circuit
JPS5441776A (en) * 1977-09-08 1979-04-03 Sharp Corp Microprocessor system for watches
JPS55142272A (en) * 1979-04-24 1980-11-06 Citizen Watch Co Ltd Electronic watch

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0717047U (en) * 1993-06-18 1995-03-28 武盛 豊永 Pet seat for male dogs

Also Published As

Publication number Publication date
JPS5839982A (en) 1983-03-08

Similar Documents

Publication Publication Date Title
US5289452A (en) Multifunction electronic analog timepiece
KR940009375B1 (en) Electronically corrected electronic timepiece
US5309413A (en) Method, integrated circuit, mechanical analog clock movement and completed assembly for a talking analog clock
JPS634675B2 (en)
US4384790A (en) Alarm device for electronic watches
JPH0334111B2 (en)
US4370066A (en) Correction signal input system for electronic timepiece
GB2107494A (en) Electronic timepiece with microprocessor
JPS625677Y2 (en)
JPS6045388B2 (en) Electronic equipment with notification function
JPS6233554B2 (en)
JPH0429433Y2 (en)
JPS5838883A (en) Electronic timepiece
JPS6117436Y2 (en)
JPS6232428B2 (en)
KR940008706B1 (en) Analog electronic watch with ic chip for analog electronic watch
JPH0439597Y2 (en)
JPS5916868Y2 (en) Calendar display electronic clock
JPS6133391B2 (en)
JPS636717Y2 (en)
JPS6244387Y2 (en)
JPS63749B2 (en)
JPH0447277B2 (en)
JPS6045389B2 (en) electronic digital clock
JPS63298089A (en) Analog type world timepiece