JPS6285327A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JPS6285327A JPS6285327A JP60225229A JP22522985A JPS6285327A JP S6285327 A JPS6285327 A JP S6285327A JP 60225229 A JP60225229 A JP 60225229A JP 22522985 A JP22522985 A JP 22522985A JP S6285327 A JPS6285327 A JP S6285327A
- Authority
- JP
- Japan
- Prior art keywords
- counter
- nibble
- bit counter
- level
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Microcomputers (AREA)
Abstract
Description
【発明の詳細な説明】 〔概要〕 マイクロコンピュータのカウンタであって。[Detailed description of the invention] 〔overview〕 It's a microcomputer counter.
4ビットカウンタとして動作させたり、あるいは8ビッ
トカウンタとして動作させることにより、汎用性に優れ
、かつ高速のカウント処理を可能とする。By operating it as a 4-bit counter or as an 8-bit counter, it has excellent versatility and enables high-speed counting processing.
本発明はマイクロコンピュータに関するものであり、特
に演算処理を行うカウンタを備えたマイクロコンピュー
タに関するものである。The present invention relates to a microcomputer, and more particularly to a microcomputer equipped with a counter that performs arithmetic processing.
従来のマイクロコンピュータにおいて、8ビットカウン
タにより、演算処理を行う場合がある。In conventional microcomputers, arithmetic processing is sometimes performed using an 8-bit counter.
いま例えば元のデータが16進数表現でA 3 (+6
1であり、この数にカウントを1つ増やす場合がある。For example, the original data is expressed in hexadecimal as A 3 (+6
1, and the count may be increased by one.
この場合は通常のインクリメント動作であるから、デー
タA 3 (+6)を1バイトずつ入力し、下位バイト
のカウントを1増やして出力すればA 4 (16)が
得られ、問題はない、すなわちデータが8ビツト(1バ
イト)単位で処理される場合には従来例の8ビットカウ
ンタは有効である。In this case, it is a normal increment operation, so if you input the data A 3 (+6) one byte at a time, increase the count of the lower byte by 1, and output it, you will get A 4 (16), and there is no problem, that is, the data The conventional 8-bit counter is effective when the data is processed in units of 8 bits (1 byte).
〔発11が解決しようとする問題点〕
しかし1バイト単位でなく4ピツ)(1ニブル)単位で
処理する場合、処理が複雑化するとともに、処理時間が
長くなるという問題がある。これを第2図に示すフロー
チャートによって説IJする。[Problems to be Solved by System No. 11] However, when processing is performed not in units of 1 byte but in units of 4 bits (1 nibble), there is a problem that the processing becomes complicated and the processing time increases. This will be explained using the flowchart shown in FIG.
第2図は従来例の8ビツトカウントを用いて元のデータ
A 3 (16)の」−位二ブルAのカウントを1つ増
やしてB 3 (16>にする場合の処理の流れを示し
ている。Figure 2 shows the flow of processing when increasing the count of the original data A 3 (16) by 1 to B 3 (16>) using a conventional 8-bit count. There is.
まずデータA3臼も)を4ビツト右ヘシフトしてOA
(16)にする0次に8ビットカウンタによりカウント
を1つ増やしてOB (161にし、さらに4ビツト左
ヘシフトしてB O(164とする・一方、別のフロー
において元のデータ
A 3 (16)を4ビツト左ヘシフトして30 (1
61とした後、さらに4ビツト右ヘシフトして03(1
6)とする。First, shift data A3 (also data A3) to the right by 4 bits and OA
(16) 0 Next, the 8-bit counter increments the count by 1 to OB (161, and then shifts 4 bits to the left to BO (164).Meanwhile, in another flow, the original data A 3 (16 ) to the left by 4 bits to obtain 30 (1
After setting it to 61, it is further shifted to the right by 4 bits and becomes 03 (1
6).
次にこの03(16)と前述のB O(16>の論理和
をもとめてB3(16)を得る。Next, the logical sum of this 03(16) and the above-mentioned B O(16>) is obtained to obtain B3(16).
このように従来例の8ビットカウンタによれば、1バイ
トについてのカウントの増減は有利であるが、lニブル
についでのカウントの増減の場合、処理が複雑で、かつ
処理Ilf間が長くなる問題がある。As described above, according to the conventional 8-bit counter, it is advantageous to increase or decrease the count for one byte, but when increasing or decreasing the count for one nibble, the problem is that the processing is complicated and the processing interval becomes long. There is.
本発明はかかる従来の問題点に鑑み創作されたものであ
り、筒中な構成でバイト中位のカウント動作だけでなく
ニブル学位のカウント動作をも高速で行うことのできる
カウンタを愉えたマイクロコンピュータの提供を目的と
する。The present invention was created in view of such conventional problems, and provides a microcomputer that enjoys a counter that has a compact configuration and can perform not only medium-byte counting operations but also nibble-degree counting operations at high speed. For the purpose of providing.
〔問題点を解決するための−Llllffi)未発11
は第1の4ビットカウンタと、第2の4ビットカウンタ
と、命令に応じて第1の4ビットカウンタと第2の4ビ
ットカウンタとをJa k&することにより8ビットカ
ウンタとし、て動作させたり、あるいは:1IJ1の4
ビットカウンタと:f42の4ビットカウンタとを切り
離してそれぞれ独立の4ビットカウンタとして動作させ
る制御回路とを備えたことを特徴とする。[To solve problems-Lllllffi) Unissued 11
The first 4-bit counter, the second 4-bit counter, and the first 4-bit counter and the second 4-bit counter are operated as an 8-bit counter by performing Ja k&. , or: 1IJ1 of 4
The present invention is characterized in that it includes a control circuit which separates the bit counter and the 4-bit counter of f42 and causes them to operate as independent 4-bit counters.
バイト単位でカウントする場合には、制御回路により第
1の4ビットカウンタと第2の4ビットカウンタとを接
続して8ビットカウンタとして動作させる。When counting in bytes, the control circuit connects the first 4-bit counter and the second 4-bit counter to operate as an 8-bit counter.
一方ニプル学位でカウントする場合には、制御回路によ
り第1の4ピントカウンタと第2の4ビットカウンタと
を分離してそれぞれ独tのカウンタとして動作させる。On the other hand, when counting in nipple degrees, the first 4-pin counter and the second 4-bit counter are separated by the control circuit and operated as independent counters.
このように処理データの大きさに対応してカウンタの大
きさを変えることができるので、高速のカウント処理を
可能となる。Since the size of the counter can be changed in accordance with the size of processing data in this way, high-speed counting processing is possible.
次に図を参照しながら本発明の実施例について説明する
。第1図は本発明の実施例に係るマイクロコンピュータ
の部分構成図であり、1はアキュームレータ、2は第1
の内部/ヘス、3は第2の内部バスである。4は入力部
が第1の内部バス2に、出力部が第2の内部バスに接続
された上位ニブルカウンタであり、I/D制御信号Cに
よりインクリメントカウント又はディクリメントカウン
トが選択される。5は入力部が第1の内部バス2に、出
力部が第2の内部バス3に接続された下位ニブルカウン
タであり、I/D制御信号eによりインクリメントカウ
ント又はディクリメントカウントが選択されるとともに
、アクティブ信号dによりカウント動作又は非動作が選
択される。Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a partial configuration diagram of a microcomputer according to an embodiment of the present invention, in which 1 is an accumulator, 2 is a first
3 is the second internal bus. 4 is an upper nibble counter whose input part is connected to the first internal bus 2 and whose output part is connected to the second internal bus, and increment counting or decrement counting is selected by I/D control signal C. 5 is a lower nibble counter whose input part is connected to the first internal bus 2 and whose output part is connected to the second internal bus 3; increment counting or decrement counting is selected by the I/D control signal e; , active signal d selects counting operation or non-operation.
6はオア回路7とアンド回路8,9とインへ−タ回路1
0からなる制御回路であり、コネクト信号aによりF位
ニブルカウンタ5のCO出力と上位ニブルカウンタ4の
CI大入力の接続又は分離が制御するとともに、アクテ
ィブ信号すを介して−に1位ニブルカウンタ4のカウン
トe作又は非動作が制御する。6 is an OR circuit 7, an AND circuit 8, 9, and an input circuit 1
This is a control circuit consisting of 0, which controls the connection or separation of the CO output of the F-rank nibble counter 5 and the CI large input of the upper nibble counter 4 by the connect signal a, and connects the 1st-rank nibble counter to - via the active signal S. A count of 4 operation or non-operation controls.
別表は本発明の実施例の動作を説明するための真理値表
である。8ビットカウンタとして動作させるときにはコ
ネクト信号aをOレベルにして上位ニブルカウンタ4と
下位ニブルカウンタ5とを接続し、アクティブ信号dを
Oレベルにする。そしてインクリメント動作させるとき
にはI10制御回路c、dをルベルにし、ディクリメン
ト動作させるときにはI/DM御信号c、dをOレベル
にする。The attached table is a truth table for explaining the operation of the embodiment of the present invention. When operating as an 8-bit counter, connect signal a is set to O level to connect upper nibble counter 4 and lower nibble counter 5, and active signal d is set to O level. When performing an increment operation, the I10 control circuits c and d are set to level, and when performing a decrement operation, the I/DM control signals c and d are set to O level.
次に4ビットカウンタとして動作させるときにはコネク
ト信号allレベルにして上位ニブルカウンタ4と下位
ニブルカウンタ5とを分離する。Next, when operating as a 4-bit counter, the connect signal is set to all level to separate the upper nibble counter 4 and the lower nibble counter 5.
1−位カウンタ4を動作させるときにはさらにアクティ
ブ信号すをOレベルにする。そしてインクリメント動作
させるときにはI/D制御信号Cをlレベルにし、ディ
クリメント動作させるときにはI/DM御信号dをθレ
ベルにする。When operating the 1-place counter 4, the active signal S is further set to O level. When performing an increment operation, the I/D control signal C is set to L level, and when performing a decrement operation, the I/DM control signal d is set to θ level.
一方、下位ニブルカウンタ4を動作させるときにはアク
ティブ信号dftOレベルにし、インクリメント動作さ
せるときにはI10制御信号eをルベルに、ディクリメ
ント動作させるときには1/D制御信号eをOレベルに
する。On the other hand, when operating the lower nibble counter 4, the active signal dftO level is set, when performing an increment operation, the I10 control signal e is set to level, and when performing a decrement operation, the 1/D control signal e is set to O level.
次に本発明の実施例に係るカウンタを用いてアキューム
レータ1のデータA 3 (16)の上位ニブルのカウ
ントを1つ増やす場合について説明する。Next, a case will be described in which the count of the upper nibble of the data A 3 (16) of the accumulator 1 is increased by one using the counter according to the embodiment of the present invention.
アキュームレータl内の上位ニブルのデータAは上位ニ
ブルカウンタ4に、下位ニブルのデータ3は下位ニブル
カウンタ4に入力する。このときコネクト信号aをルベ
ルに、アクティブ信号すをOレベルに、I10制御信号
Cをルベルに、アクティブ信号dを1にする。The data A of the upper nibble in the accumulator l is input to the upper nibble counter 4, and the data 3 of the lower nibble is input to the lower nibble counter 4. At this time, the connect signal a is set to level, the active signal S is set to O level, the I10 control signal C is set to level, and the active signal d is set to 1.
これによりL位ニブルカウンタ4はインクリメント動作
してBを出力し、下位ニブルカウンタ5はカウンタ動作
することなくそのまま3を出力する。従ってカウンタの
出力としてB 3 (+61が得られる。As a result, the L-order nibble counter 4 performs an increment operation and outputs B, and the lower nibble counter 5 directly outputs 3 without performing a counter operation. Therefore, B 3 (+61) is obtained as the output of the counter.
このように本発明の実施例によれば、バイト単位のカウ
ント処理だけでなく、ニブル単位のカウント処理を高速
に行うことができる。As described above, according to the embodiment of the present invention, not only byte-by-byte counting processing but also nibble-by-nibble counting processing can be performed at high speed.
以上説明したように、本発明によればカウント処理デー
タの大きさに対応してカウンタの大きさを適宜変えるこ
とができるので、高速のカウント処理がIT能となる。As described above, according to the present invention, the size of the counter can be appropriately changed in accordance with the size of the count processing data, so high-speed counting processing becomes IT-enabled.
第1図は本9!、明の実施例に係るマ・fクロコンピユ
ータの部分構成図であり、第2図は従来例の問題点を説
明するためのフローチャートである。
l・・・アキュームレータ
2・・・第1の内部バス
3・・・第2の内部バス
4・・・上位ニブルカウンタ
5・・・下位ニブルカウンタ
6・・・1υI御回路
7・・・オア回路
8.9・・・アンド回路
10・・・インバータ回路Figure 1 is book 9! FIG. 2 is a partial configuration diagram of a macrocomputer according to an embodiment of the present invention, and FIG. 2 is a flowchart for explaining problems in the conventional example. l...Accumulator 2...First internal bus 3...Second internal bus 4...Upper nibble counter 5...Lower nibble counter 6...1υI control circuit 7...OR circuit 8.9...AND circuit 10...Inverter circuit
Claims (1)
4ビットカウンタとを接続することにより8ビットカウ
ンタとして動作させたり、あるいは前記第1の4ビット
カウンタと前記第2の4ビットカウンタとを切り離して
それぞれ独立の4ビットカウンタとして動作させる制御
回路とを備えたことを特徴とするマイクロコンピュータ
。[Claims] A first 4-bit counter, a second 4-bit counter, and an 8-bit counter by connecting the first 4-bit counter and the second 4-bit counter according to an instruction. A microcomputer comprising: a control circuit for operating the first 4-bit counter and the second 4-bit counter as independent 4-bit counters;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60225229A JPS6285327A (en) | 1985-10-09 | 1985-10-09 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60225229A JPS6285327A (en) | 1985-10-09 | 1985-10-09 | Microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6285327A true JPS6285327A (en) | 1987-04-18 |
Family
ID=16826010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP60225229A Pending JPS6285327A (en) | 1985-10-09 | 1985-10-09 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6285327A (en) |
-
1985
- 1985-10-09 JP JP60225229A patent/JPS6285327A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0353652B2 (en) | ||
JPS595349A (en) | Adder | |
JPS6285327A (en) | Microcomputer | |
JPS5937639U (en) | industrial processing equipment | |
JPS6152493B2 (en) | ||
JP2792141B2 (en) | Misalignment control device | |
JPH0683618A (en) | Flag control circuit | |
US5179668A (en) | Signal processor | |
JPS61255433A (en) | Arithmetic unit | |
JP2566139B2 (en) | Bus interface circuit | |
JPS6288031A (en) | Register filing system | |
JPS6370450A (en) | Semiconductor integrated circuit | |
JPS62192085A (en) | Bit processing circuit | |
JPS628195A (en) | Microcomputer with built-in liquid crystal driving circuit | |
JPH026683Y2 (en) | ||
SU1675897A1 (en) | Variable length data processor | |
JP2558815B2 (en) | Normalization circuit | |
JPS6158074A (en) | Microcomputer | |
JPS60225958A (en) | Information processor | |
JPS6022356A (en) | Large scale integrated circuit | |
JPS61221931A (en) | Arithmetic element | |
JPH04155481A (en) | Microprocessor | |
JPS636656A (en) | Array processor | |
JPS604499B2 (en) | Addressing device in data processing equipment | |
JPH07114791A (en) | Access circuit of dual port memory |