JPH05210447A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JPH05210447A JPH05210447A JP4016623A JP1662392A JPH05210447A JP H05210447 A JPH05210447 A JP H05210447A JP 4016623 A JP4016623 A JP 4016623A JP 1662392 A JP1662392 A JP 1662392A JP H05210447 A JPH05210447 A JP H05210447A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- display
- cpu
- start flag
- key scan
- 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
Links
- 238000001514 detection method Methods 0.000 abstract description 8
- 238000000034 method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 4
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明はマイクロコンピュー
タ、特に外部表示装置を表示させると共に、その表示を
止めキー走査処理するための割込み要求を行なう表示コ
ントローラを有するマイクロコンピュータに関するもの
である。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a microcomputer having a display controller for displaying an external display device, stopping the display, and issuing an interrupt request for key scan processing.
【0002】[0002]
【従来の技術】従来、外部表示装置と複数のキー群から
なるキーボードとを有するマイクロコンピュータシステ
ムでは、マイクロコンピュータが、複数桁からなる外部
表示装置の各桁を表示可能にする桁信号を出力する桁信
号発生回路と、各桁を構成する複数セグメント、例えば
小数点付数字なら8セグメント、のうち表示すべきセグ
メントを特定するセグメント信号発生回路とを有してお
り、データの表示に際しては、桁信号を順次変更しなが
ら、該桁信号と同期を取りつつ、セグメント信号を出力
し、表示装置を表示させていた。また、このようなマイ
クロコンピュータでは、キーボードの走査をセグメント
信号で兼用し、いずれかのキーが押され走査信号がマイ
クロコンピュータの入力端子に印加されると、マイクロ
コンピュータは走査信号の出力されたタイミングと走査
信号の印加された入力端子とから押されたキーをCPU
内のソフトウェアで判別し、入力データを特定してい
た。2. Description of the Related Art Conventionally, in a microcomputer system having an external display device and a keyboard composed of a plurality of key groups, the microcomputer outputs a digit signal which enables each digit of the external display device having a plurality of digits to be displayed. It has a digit signal generation circuit and a segment signal generation circuit that specifies a segment to be displayed among a plurality of segments forming each digit, for example, 8 segments for a number with a decimal point. , The segment signal is output and the display device is displayed while synchronizing with the digit signal. Further, in such a microcomputer, the scanning of the keyboard is also used as the segment signal, and when one of the keys is pressed and the scanning signal is applied to the input terminal of the microcomputer, the microcomputer outputs the timing when the scanning signal is output. And the key pressed from the input terminal to which the scanning signal is applied to the CPU
The input data was identified by the software inside.
【0003】しかし、このようなシステムでは桁信号の
出力タイミングとソフトウェアとの同期が困難である。
そこで、特開昭61−278920では、キー走査期間
の継続中セットされるフラグを有することで、キー走査
時間の終了を正確に判断しようとしている。また、特開
昭62−22390ではキー走査期間のための付加サイ
クルを指定の長さで発生する付加サイクル制御手段を設
けている。これにより、キー群の走査開始前後に入力デ
ータ判別よりも優先度の高い割込みが発生しても、キー
走査期間を確保でき、キースキャンに要する時間も無駄
なくできるようにしている。However, in such a system, it is difficult to synchronize the output timing of the digit signal with the software.
Therefore, Japanese Patent Laid-Open No. 61-278920 attempts to accurately determine the end of the key scanning time by providing a flag that is set during the key scanning period. Further, in Japanese Patent Laid-Open No. 62-22390, additional cycle control means for generating an additional cycle for a key scanning period with a designated length is provided. As a result, even if an interrupt having a higher priority than the input data determination occurs before and after the start of scanning the key group, the key scanning period can be secured and the time required for the key scanning can be saved.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、上述し
た公報に記載された発明においても、キー走査より優先
度の高い割込みが複数存在する場合は、そのうちの最も
処理時間の長い割込み、又はそれらの加算された処理時
間からキー走査期間のための付加サイクルを指定しなけ
ればならない。このため、キー走査開始前後に入力デー
タ判別より優先度の高い割込みが発生しない場合は、付
加サイクルの大半が無駄になってしまうという問題点が
あった。However, even in the inventions described in the above-mentioned publications, when there are a plurality of interrupts having a higher priority than the key scanning, the interrupt having the longest processing time among them or their addition is performed. An additional cycle for the key scan period must be specified from the processing time given. Therefore, there is a problem that most of the additional cycles are wasted unless an interrupt having a higher priority than the input data determination occurs before and after the start of key scanning.
【0005】この発明はこのような付加サイクルの無駄
となる時間を除去し、キー走査処理を正確かつ無駄なく
行える表示コントローラを有するマイクロコンピュータ
を提供することを目的とする。It is an object of the present invention to provide a microcomputer having a display controller which eliminates the wasteful time of such an additional cycle and can perform the key scanning process accurately and without waste.
【0006】[0006]
【課題を解決するための手段】この発明では、CPU
と、このCPUに接続されるデータバスとを有し、表示
装置と接続されるマイクロコンピュータであって、第1
の端子が前記データバスに接続され、第1の端子に入力
されたCPUからの信号により出力信号である表示開始
フラグを第1のレベルにし、第2の端子からの信号によ
り表示開始フラグを第2のレベルにする表示開始フラグ
生成回路と、この表示開始フラグに応答し、クロック信
号をカウントするカウンタと、このカウンタの出力を入
力し、表示装置の各桁の表示信号を出力する桁信号出力
回路と、カウンタの出力に応答して、割り込み要求信号
を出力すると共に、表示開始フラグの第2の端子に信号
を与える回路とを有するマイクロコンピュータを提供す
るものである。According to the present invention, a CPU
And a data bus connected to the CPU, the microcomputer being connected to the display device.
Is connected to the data bus, the signal from the CPU input to the first terminal sets the display start flag which is an output signal to the first level, and the signal from the second terminal sets the display start flag to the first level. A display start flag generation circuit for setting the level to 2, a counter for counting clock signals in response to the display start flag, and a digit signal output for inputting the output of this counter and outputting a display signal for each digit of the display device A microcomputer having a circuit and a circuit for outputting an interrupt request signal in response to the output of a counter and for giving a signal to the second terminal of a display start flag.
【0007】[0007]
【実施例】図1はこの発明の一実施例の回路ブロック図
である。以下、この発明の実施例を図1を参照しつつ説
明する。1 is a circuit block diagram of an embodiment of the present invention. An embodiment of the present invention will be described below with reference to FIG.
【0008】マイクロコンピュータ101は、中央演算
処理装置(CPU)103とデータバス105を有して
いる。これらCPU103,データバス105は公知で
あるのでその機能の説明は省略する。さらに、マイクロ
コンピュータ101はデータバス105に接続された入
出力回路107,桁信号出力回路109及びセグメント
信号出力回路111を有している。入出力回路107は
外部のキー113からの信号を受け取り、CPU101
へ送るための中継点として機能している。桁信号出力回
路109は外部の表示装置115へ桁信号117を出力
すると共にCPU103に割込み信号119を出力す
る。セグメント信号出力回路111は表示装置115に
セグメント信号121を出力する。The microcomputer 101 has a central processing unit (CPU) 103 and a data bus 105. Since the CPU 103 and the data bus 105 are publicly known, description of their functions will be omitted. Further, the microcomputer 101 has an input / output circuit 107 connected to the data bus 105, a digit signal output circuit 109 and a segment signal output circuit 111. The input / output circuit 107 receives a signal from the external key 113 and receives the signal from the CPU 101.
It functions as a relay point for sending to. The digit signal output circuit 109 outputs a digit signal 117 to the external display device 115 and an interrupt signal 119 to the CPU 103. The segment signal output circuit 111 outputs a segment signal 121 to the display device 115.
【0009】ここで、桁信号出力回路はフリップフロッ
プ(FF)123,桁数カウンタ125,デコーダ12
7及び最終桁出力検出回路129から構成されている。
この桁信号出力回路109の動作を図2のタイミングチ
ャートを用いつつ説明する。Here, the digit signal output circuit includes a flip-flop (FF) 123, a digit number counter 125, and a decoder 12.
7 and the final digit output detection circuit 129.
The operation of the digit signal output circuit 109 will be described with reference to the timing chart of FIG.
【0010】まずFF123に、ソフトウェアにより、
即ち、CPU103からデータバス105を介して信号
が与えられ、FF123の出力である表示開始フラグ
(f)を“0”から“1”に変化させる(図2のタイミ
ングA)。これにより、表示装置115の表示が開始す
る。First, in FF123, by software,
That is, a signal is given from the CPU 103 via the data bus 105, and the display start flag (f) which is the output of the FF 123 is changed from "0" to "1" (timing A in FIG. 2). As a result, the display on the display device 115 starts.
【0011】次に表示開始フラグ(f)の“1”レベル
に応答して、桁数カウンタ125は発振器(OSC)1
31のクロックを分周器(DIV)133で分周したク
ロックを桁数としてカウントし、その出力をデコーダ1
27に与える。デコーダ127では桁数カウンタ125
の出力をデコードして桁信号117をセグメント信号
(a)と同期させて0桁(b),1桁(c),2桁
(d)…N桁(e)の順に順次出力する。指定された桁
数の最終桁であるN桁(e)の出力終了を最終桁出力終
了検出回路が検出すると、割り込み信号119を発生す
ると共に、検出信号137をFF123のリセット端子
Rに与える。この検出信号に応答して表示開始フラグ
(f)は“1”から“0”に変化する(図2のタイミン
グB)。なお、割り込み信号119は他の割り込み信号
137と共に割り込み信号制御回路139に入力され
る。割り込み信号制御回路139では割り込み信号の優
先度を考慮して順序を決めて割り込み信号をCPU10
3へ与える。Next, in response to the "1" level of the display start flag (f), the digit number counter 125 causes the oscillator (OSC) 1
The clock of 31 is divided by the frequency divider (DIV) 133 to count the number of digits, and the output is counted by the decoder 1
Give to 27. In the decoder 127, the digit number counter 125
Output is decoded and the digit signal 117 is synchronized with the segment signal (a) to sequentially output 0 digit (b), 1 digit (c), 2 digits (d) ... N digits (e). When the final digit output end detection circuit detects the output end of the N digit (e) which is the final digit of the designated digit number, the interrupt signal 119 is generated and the detection signal 137 is given to the reset terminal R of the FF123. In response to this detection signal, the display start flag (f) changes from "1" to "0" (timing B in FIG. 2). The interrupt signal 119 is input to the interrupt signal control circuit 139 together with other interrupt signals 137. The interrupt signal control circuit 139 determines the order in consideration of the priority of the interrupt signal and outputs the interrupt signal to the CPU 10
Give to 3.
【0012】この後、次のソフトウェアにより表示開始
フラグ(f)が“0”から“1”になる時(図2のタイ
ミングC)までの期間(図2の期間D)、表示装置11
5は表示が停止しており、キー走査を割り込み処理で行
なえる。キー走査処理の終了はキー113から入出力回
路107,データバス105を介してCPU103に伝
えられ、このキー走査終了を受けて次の表示開始フラグ
セット(図2のタイミングC)が命令される。Thereafter, the display device 11 is operated for a period (period D in FIG. 2) from when the display start flag (f) changes from "0" to "1" (timing C in FIG. 2) by the next software.
In No. 5, display is stopped, and key scanning can be performed by interrupt processing. Completion of the key scanning process is transmitted from the key 113 to the CPU 103 via the input / output circuit 107 and the data bus 105, and in response to the completion of the key scanning, the next display start flag set (timing C in FIG. 2) is commanded.
【0013】[0013]
【発明の効果】以上詳細に説明したように、本発明によ
ればキー走査の終了を検知して、CPUからの命令によ
って表示の再開を制御できるため、キー走査を確実に行
える。また、キー走査終了後、時間の無駄なく表示を再
開できる。As described above in detail, according to the present invention, the end of the key scanning can be detected and the restart of the display can be controlled by the instruction from the CPU, so that the key scanning can be surely performed. Further, after the key scanning is completed, the display can be restarted without wasting time.
【0014】図3はこの発明及び従来のキー走査処理時
間及び待ち時間を示す図である。以下この図を参照しつ
つこの発明の効果を従来と比較して説明する。FIG. 3 is a diagram showing the key scanning processing time and waiting time according to the present invention and the related art. Hereinafter, the effect of the present invention will be described in comparison with the related art with reference to this drawing.
【0015】キー走査処理は、表示の停止301後に割
り込み処理の1つとして行なわれる。表示の停止中にキ
ー走査処理のみが行なわれる場合、この発明では(a)
で示すようにキー走査処理303(太い実線で示す)後
すぐに表示の再開305(黒丸で示す)が行なわれる。
ところが、従来は(d)で示すようにキー走査処理30
3が終了後、不要な待ち時間307(細い実線で示す)
が発生してしまう。これは、従来は表示停止301から
表示再開305までが一定期間に決められていたからで
ある。The key scanning process is performed as one of interrupt processes after the display stop 301. When only the key scanning process is performed while the display is stopped, in the present invention, (a)
As indicated by, the display is restarted 305 (indicated by a black circle) immediately after the key scanning process 303 (indicated by a thick solid line).
However, conventionally, as shown in FIG.
Unnecessary waiting time 307 after 3 is finished (thin solid line)
Will occur. This is because conventionally, the period from the display stop 301 to the display restart 305 is determined in a certain period.
【0016】表示の停止301後キー走査処理303よ
り優先度の高い割り込み処理309(点線で示す)があ
った場合はそちらを優先させて行う。従って、この発明
の場合(b),(e)に示すように処理309終了後キ
ー走査処理303が行なわれ、その後すぐに表示再開3
05が行なわれる。しかし、従来は(e)で示すよう
に、他の処理309が短かければキー走査303終了後
やはり待ち時間307が発生してしまう。(f)に示す
ように他の処理309とキー走査処理303があらかじ
め定めた期間に一致した場合のみ従来とこの発明とは同
じ結果になる。If there is an interrupt process 309 (shown by a dotted line) having a higher priority than the key scanning process 303 after the stop 301 of display, that interrupt process is given priority. Therefore, in the case of the present invention, as shown in (b) and (e), the key scanning process 303 is performed after the process 309 is completed, and the display restart is immediately performed 3
05 is performed. However, conventionally, as shown in (e), if the other processing 309 is short, the waiting time 307 also occurs after the end of the key scanning 303. As shown in (f), the same result is obtained as in the related art and the present invention only when the other processing 309 and the key scanning processing 303 coincide with a predetermined period.
【図1】本発明のブロック図FIG. 1 is a block diagram of the present invention.
【図2】図1のタイミングチャートFIG. 2 is a timing chart of FIG.
【図3】本発明及び従来のキー走査処理時間を示す図FIG. 3 is a diagram showing a key scanning processing time according to the present invention and the related art.
103 CPU 105 データバス 107 入出力回路 109 桁信号出力回路 111 セグメント信号出力回路 123 フリップフロップ 125 桁数カウンタ 127 デコーダ 129 最終桁出力終了検出回路 119 割り込み信号 137 検出信号 103 CPU 105 Data Bus 107 Input / Output Circuit 109 Digit Signal Output Circuit 111 Segment Signal Output Circuit 123 Flip-Flop 125 Digit Number Counter 127 Decoder 129 Final Digit Output End Detection Circuit 119 Interrupt Signal 137 Detection Signal
Claims (1)
タバスとを有し、表示装置と接続されるマイクロコンピ
ュータにおいて、第1の端子が前記データバスに接続さ
れ、第1の端子に入力されたCPUからの信号により出
力信号である表示開始フラグを第1のレベルにし、第2
の端子に与えられた信号により表示開始フラグを第2の
レベルにする表示開始フラグ生成回路と、 この表示開始フラグに応答し、クロック信号をカウント
するカウンタと、 このカウンタの出力を入力し、前記表示装置の各桁の表
示信号を出力する桁信号出力回路と、 前記カウンタの出力に応答して、割り込み要求信号を出
力すると共に、前記表示開始フラグの第2の端子に信号
を与える回路とを有するマイクロコンピュータ。1. A microcomputer having a CPU and a data bus connected to the CPU, the first terminal being connected to the data bus and being input to the first terminal in a microcomputer connected to a display device. The display start flag, which is an output signal, is set to the first level by the signal from the CPU, and the second
A display start flag generating circuit for setting the display start flag to a second level by a signal given to the terminal of the counter, a counter for counting a clock signal in response to the display start flag, and an output of the counter, A digit signal output circuit that outputs a display signal of each digit of the display device, and a circuit that outputs an interrupt request signal in response to the output of the counter and that applies a signal to the second terminal of the display start flag. Microcomputer having.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4016623A JPH05210447A (en) | 1992-01-31 | 1992-01-31 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4016623A JPH05210447A (en) | 1992-01-31 | 1992-01-31 | Microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH05210447A true JPH05210447A (en) | 1993-08-20 |
Family
ID=11921475
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4016623A Pending JPH05210447A (en) | 1992-01-31 | 1992-01-31 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH05210447A (en) |
-
1992
- 1992-01-31 JP JP4016623A patent/JPH05210447A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US3932847A (en) | Time-of-day clock synchronization among multiple processing units | |
EP0215236B1 (en) | Data processing machine | |
JPH05210447A (en) | Microcomputer | |
JP2852271B2 (en) | Microcomputer | |
JPH0573296A (en) | Microcomputer | |
JP2738141B2 (en) | Single chip microcomputer | |
JPH09148896A (en) | Pulse generation circuit | |
JPH10255489A (en) | Microcomputer | |
JPH1185684A (en) | I/o access control circuit | |
JPH0217807B2 (en) | ||
JPH09179672A (en) | Key input system | |
JPH05108540A (en) | Input/output processor | |
JPS6175436A (en) | Microprogram controller | |
JPS63298532A (en) | Data processor | |
JPH1091431A (en) | Data processor | |
JPS63101937A (en) | Instruction execution monitoring device | |
JPH0336604A (en) | Timer with batch counter | |
JPS59206957A (en) | Device for supervising execution of instruction | |
JPH0877113A (en) | Multiprocessor system and its start method | |
JPH1196019A (en) | Method for controlling interruption | |
JPH01263740A (en) | Micro-computer | |
JPH05313889A (en) | Digital signal processor | |
JP2000353098A (en) | Interruption control circuit | |
JPH04266148A (en) | Input/output control system | |
JPH04199427A (en) | Data processor |