JPH01304564A - Single chip microcomputer - Google Patents
Single chip microcomputerInfo
- Publication number
- JPH01304564A JPH01304564A JP63135888A JP13588888A JPH01304564A JP H01304564 A JPH01304564 A JP H01304564A JP 63135888 A JP63135888 A JP 63135888A JP 13588888 A JP13588888 A JP 13588888A JP H01304564 A JPH01304564 A JP H01304564A
- Authority
- JP
- Japan
- Prior art keywords
- serial interface
- uart
- terminal
- chip microcomputer
- interrupt
- 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
- 230000005540 biological transmission Effects 0.000 abstract description 13
- 238000010586 diagram Methods 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 4
- 238000003708 edge detection Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000001702 transmitter Effects 0.000 description 1
Landscapes
- Microcomputers (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はシングルチップマイクロコンピュータに関し、
特に外部機能端子を有するシリアルインタフェースヲ内
蔵するシングルチップマイクロコンピュータに関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a single-chip microcomputer,
In particular, the present invention relates to a single-chip microcomputer with a built-in serial interface having external function terminals.
近年、シングルチップマイクロコンピュータには多種多
数の周辺ハードウェアが内蔵されるようになり、外部端
子の数が増加したり、内部で処理する各周辺ハードウェ
アの割込み信号も非常に多くなってきている。In recent years, single-chip microcomputers have come to incorporate a wide variety of peripheral hardware, the number of external pins has increased, and the number of interrupt signals processed internally by each peripheral hardware has also increased significantly. .
従来、外部機能端子及び割込み要求フラグを有したシリ
アルインタフェースを内蔵するシングルチップマイクロ
コンピュータにおいては、前記シリアルインタフェース
を停止させている場合、その機能端子及びシリアルイン
タフェースの割込み要求フラグは全く機能せず、無用な
ものとなっている。Conventionally, in a single-chip microcomputer that has a built-in serial interface with an external function terminal and an interrupt request flag, when the serial interface is stopped, the function terminal and the interrupt request flag of the serial interface do not function at all. It has become useless.
例えば第3図のようにUART (Universal
Asychronous receiver Tran
smitter:調歩同期式シリアルインタフェース)
3を内蔵するシングルチップマイクロコンピュータ1に
おいては、送信端子7、受信端子8、送信部4の送信完
了時にセットする割込み要求フラグ20、及び受信部5
の受信完了時にセットする割込み要求フラグ21を有し
ている。For example, as shown in Figure 3, UART (Universal
Asynchronous receiver Tran
smitter: asynchronous serial interface)
In the single-chip microcomputer 1 that incorporates the transmitting terminal 7, the receiving terminal 8, the interrupt request flag 20 that is set when the transmission of the transmitting section 4 is completed, and the receiving section 5.
It has an interrupt request flag 21 that is set upon completion of reception.
ところが従来は、このUARTの機能を停止させている
場合は、送信端子7、受信端子8は、せいぜいポートと
しての機能しかもたせていなかった。However, in the past, when the UART function was stopped, the transmitting terminal 7 and the receiving terminal 8 had no more than a port function.
さらに割込み要求フラグ20.21はUARTの機能を
停止させている時は全く使用せず、無用なものとなって
しまっていた。Furthermore, the interrupt request flags 20 and 21 are not used at all when the UART function is stopped, making them useless.
上述した従来のシングルチップマイクロコンピュータに
おいては、シリアルインタフェースを停止させている場
合、送信端子、受信端子などの機能端子及び前記シリア
ルインタフェースの割込み要求フラグは、全く使用する
ことがなく無用なものであった。In the conventional single-chip microcomputer described above, when the serial interface is stopped, the functional terminals such as the transmitting terminal and the receiving terminal and the interrupt request flag of the serial interface are never used and are useless. Ta.
このように、多種多数の周辺機能を内蔵するシングルチ
ップマイクロコンピュータ内に、使用しない端子及び使
用しない割込み要求フラグが存在することは、不要な回
路部分を有することにもなり、非常に経済性が悪いとい
う欠点がある。例えば各周辺ハードウェアに対応した割
込み要求フラグが所定のビット長のレジスタとなってい
る場合などは、そのレジスタ数が増加してしまうことに
もなる。In this way, the presence of unused pins and unused interrupt request flags in a single-chip microcomputer that incorporates a wide variety of peripheral functions means that it has unnecessary circuit parts, making it very economical. It has the disadvantage of being bad. For example, if the interrupt request flag corresponding to each peripheral hardware is a register with a predetermined bit length, the number of registers will increase.
本発明のシングルチップマイクロコンピュータは機能端
子を有するシリアルインタフェース及び前記シリアルイ
ンタフェースの割込み要求フラグを内蔵する場合におい
て、
前記シリアルインタフェースの動作、停止を制御する制
御レジスタを有し、
前記シリアルインタフェースを動作させている時は、前
記割込み要求フラグを前記シリアルインタフェースの割
込み信号によってセットし、前記シリアルインタフェー
スを使用していない時は、前記機能端子への入力レベル
の変化によって前記割込み要求フラグをセットする切り
換え手段を内蔵していることを特徴とする。In the case where the single-chip microcomputer of the present invention has a built-in serial interface having a functional terminal and an interrupt request flag for the serial interface, the single-chip microcomputer has a control register for controlling operation and stop of the serial interface, and a control register for controlling operation and stop of the serial interface. switching means for setting the interrupt request flag by an interrupt signal of the serial interface when the serial interface is being used; and for setting the interrupt request flag by a change in the input level to the function terminal when the serial interface is not being used; It is characterized by having a built-in
次に第1図を用いて本発明の実施例について述べる。本
発明の実施例においては、UARTの送受信端子と外部
割込み入力端子とを1本の端子で共用する場合の例につ
いて述べる。Next, an embodiment of the present invention will be described using FIG. In the embodiment of the present invention, an example will be described in which a single terminal is used in common as a UART transmitting/receiving terminal and an external interrupt input terminal.
第1図は本発明の実施例におけるシングルチップマイク
ロコンピュータのブロック図である。FIG. 1 is a block diagram of a single-chip microcomputer in an embodiment of the present invention.
シングルチップマイクロコンピュータ1はエツジ検圧回
路2、UART3、割込み信号セレクタ10及び割込み
要求フラグ20.21を内蔵する。The single-chip microcomputer 1 includes an edge detection circuit 2, a UART 3, an interrupt signal selector 10, and interrupt request flags 20 and 21.
UART3は非同期式シリアル・インクフェイス機能を
有するブロックで、送信部4、受信部5、及びUART
3全体を制御するモードレジスタ6を有している。UART3 is a block having an asynchronous serial interface function, and includes a transmitter 4, a receiver 5, and a UART
It has a mode register 6 that controls the entire 3.
送信部4は、送信端子7よりデータを送信し終えると、
送信完了割込み信号13を出力する。When the transmitter 4 finishes transmitting data from the transmitter terminal 7,
A transmission completion interrupt signal 13 is output.
受信部5は、受信端子8より所定のデータを受信し終え
ると、受信完了割込み信号14を出力する。When the receiving unit 5 finishes receiving predetermined data from the receiving terminal 8, it outputs a reception completion interrupt signal 14.
送信端子7、受信端子8は外部割込み信号入力の端子と
しての機能も兼ね備えており、前記2本の端子に入力す
る信号をそのまま外部割込み入力信号11.12として
割込み信号セレクタ10に出力する。The transmitting terminal 7 and the receiving terminal 8 also have the function of external interrupt signal input terminals, and the signals inputted to the two terminals are outputted as they are to the interrupt signal selector 10 as external interrupt input signals 11 and 12.
割込み信号セレクタ10は、モードレジスタ6の値によ
って外部割込み入力信号11.12と、送信完了割込み
信号13、受信完了割込み信号14を切り換えて選択し
、エツジ検出回路2を介して割込み要求フラグ20.2
1をセ、ツトする回路である。The interrupt signal selector 10 switches and selects an external interrupt input signal 11 . 2
This is a circuit that sets and turns 1.
モードレジスタ6により送信許可に指定すると、割込み
信号セレクタ10は、送信完了割込み信号13によって
、割込み要求フラグ20をセットする。またモードレジ
スタ6により送信禁止に指定すると割込み信号セレクタ
10は、外部割込み入力信号12によって割込み要求フ
ラグ20をセツトする。When the mode register 6 specifies transmission permission, the interrupt signal selector 10 sets the interrupt request flag 20 in response to the transmission completion interrupt signal 13. Further, when the mode register 6 specifies that transmission is prohibited, the interrupt signal selector 10 sets the interrupt request flag 20 in response to the external interrupt input signal 12.
上記の動作は割込み要求フラグ21に関しても同様で、
モードレジスタ6により受信許可に指定すると受信完了
割込み信号14により、また受信禁止に指定すると外部
割込み入力信号12により、割込み要求フラグ21をセ
ットする。The above operation is the same for the interrupt request flag 21.
When the mode register 6 specifies reception permission, the reception completion interrupt signal 14 sets the interrupt request flag 21, and when reception prohibition is specified, the external interrupt input signal 12 sets the interrupt request flag 21.
エツジ検出回路2は送信完了割込み信号13、受信完了
割込み信号14、及び外部割込み入力信号11.12の
所定のエツジを検出して割込み要求フラグ20.21を
セットする回路である。The edge detection circuit 2 is a circuit that detects predetermined edges of the transmission completion interrupt signal 13, the reception completion interrupt signal 14, and the external interrupt input signal 11.12, and sets an interrupt request flag 20.21.
このように本発明のシングルチップマイクロコンピュー
タでは、割込み信号セレクタ10を設けることにより、
UART3を動作させている時には送信端子7、受信端
子8をUARTの機能端子として、UART3を停止さ
せている時は前記2本の端子を外部割込み入力端子とし
て使用できるようになる。As described above, in the single-chip microcomputer of the present invention, by providing the interrupt signal selector 10,
When the UART 3 is operating, the transmitting terminal 7 and the receiving terminal 8 can be used as functional terminals of the UART, and when the UART 3 is stopped, the two terminals can be used as external interrupt input terminals.
さらに割込み要求フラグ20,21はUART3を動作
させている時はUART専用のものに、UART3を停
止させている時には外部割込み入力信号用のものにと切
り換えて使用することができ、1つの割込み要求フラグ
で外部割込みとシリアルインタフェースの割込み要求フ
ラグが共用できる。Furthermore, the interrupt request flags 20 and 21 can be switched to be used exclusively for the UART when the UART3 is operating, and used for external interrupt input signals when the UART3 is stopped. External interrupts and serial interface interrupt request flags can be shared.
次に本発明の手段を内蔵したシグルチップマイクロコン
ピュータにおいて、スタンバイ解除ト受信動作を1本の
外部端子を行なう例について第1図、第2図を用いて説
明する。Next, an example will be described using FIGS. 1 and 2 in which, in a single-chip microcomputer incorporating the means of the present invention, standby release and reception operations are performed through one external terminal.
第2図は本発明第1図のシグルチップマイクロコンピュ
ータにより、スタンバイ解除と受信動作を連続して行な
う時のシーケンス図である。FIG. 2 is a sequence diagram when the single-chip microcomputer shown in FIG. 1 of the present invention successively performs standby release and reception operations.
ま−1初に、シングルチップマイクロコンピュータ1で
はUART3を停止させておき、受信端子8を外部割込
みの機能端子として動作させておいて、スタンバイ状態
になっているものとする。そして受信端子8には外部よ
りハイレベルの信号を入力しておく。またシングルチッ
プマイクロコンピュータ1においては、外部割込み端子
への有効エツジ入力によりスタンバイモードを解除でき
るものとする。First, assume that the single-chip microcomputer 1 is in a standby state with the UART 3 stopped and the reception terminal 8 operated as an external interrupt function terminal. A high level signal is input to the receiving terminal 8 from the outside. In the single-chip microcomputer 1, the standby mode can be canceled by inputting a valid edge to an external interrupt terminal.
前記のように状態で、シングルチップマイクロコンピュ
ータ1がスタンバイ状態になっている場合、まず、受信
端子8より、負極性パルス(第2図■参照)を入力する
。するとシングルチップマイクロコンピュータ1は外部
割込み入力端子へと有効エツジ入力を検知し、スタンバ
イ状態を解除してスタンバイ解除(外部割込み入力)の
割込み処理ルーチンを実行する。そこで前記割込み処理
ルーチン内でUART3を受信許可にすれば、受信端子
8はUART3の受信端子として機能し、以後UART
3は受信端子8に入力される受信テークを受信できる。When the single-chip microcomputer 1 is in the standby state as described above, first, a negative polarity pulse (see (2) in FIG. 2) is inputted from the receiving terminal 8. Then, the single-chip microcomputer 1 detects a valid edge input to the external interrupt input terminal, cancels the standby state, and executes an interrupt processing routine for canceling standby (external interrupt input). Therefore, if the UART3 is enabled to receive data in the interrupt processing routine, the receiving terminal 8 will function as the receiving terminal of the UART3, and from then on the UART
3 can receive the reception take input to the reception terminal 8.
このように本発明の手段を用いると、従来はスタンバイ
解除と受信動作を別個の端子で行なっていたものを、1
本の端子で行なえるようになる。As described above, when the means of the present invention is used, standby release and reception operations were performed using separate terminals, whereas in the past, standby release and reception operations were performed using separate terminals.
You will be able to do it using the terminal of the book.
以上本発明のシングルチップマイクロコンピュータにお
いて、スタンバイ解除と受信動作を連続して1本の外部
端子で行なう例について述べたが、送信端子においても
、送信端子なハイインピーダンス状態(入力状態)に設
定できる様にしておけば、同様の動作が可能であること
は言うまでもない。In the single-chip microcomputer of the present invention, an example has been described in which standby release and reception operations are performed continuously using one external terminal, but the transmission terminal can also be set to a high impedance state (input state) similar to the transmission terminal. It goes without saying that the same operation is possible if you do the same.
以上説明したように本発明のシングルチップマイクロコ
ンピュータは、シリアルインタフェースを使用しない場
合でも、シリアルインタフェースの機能端子を外部割込
み入力端子として使用するものである。そして割込み信
号セレクタを設けることによって、シリアルインタフェ
ースの機能を停止している時でも、前記シリアルインタ
フェースに対応した割込み要求フラグを外部割込みの割
込み要求フラグとして使用するものである。As described above, the single-chip microcomputer of the present invention uses the functional terminal of the serial interface as an external interrupt input terminal even when the serial interface is not used. By providing an interrupt signal selector, even when the function of the serial interface is stopped, the interrupt request flag corresponding to the serial interface is used as the interrupt request flag for external interrupts.
よって、前記機能端子及び割込み要求フラグはシリアル
インタフェースを停止させている時でも、別の機能とし
て使用するため、シングルチップマイクロコンピュータ
が有する端子及び割込み要求フラグを有効に活用できる
という効果がある。Therefore, even when the serial interface is stopped, the functional terminals and interrupt request flags are used for other functions, so that the terminals and interrupt request flags of the single-chip microcomputer can be effectively utilized.
また一般に割込み処理回路においては、1つの割込み要
求フラグに付随する制御レジスタ・制御回路のチップ上
の占有面積は比較的大きなものとなっている。ところが
本発明によれば、同時に使用しない2種類の割込み要求
信号を1つの割込み要求信号として処理するため、制御
レジスタ・制御回路部分の大きさを縮小することができ
るという効果もある。Furthermore, in general, in an interrupt processing circuit, the area occupied by the control register/control circuit associated with one interrupt request flag on the chip is relatively large. However, according to the present invention, since two types of interrupt request signals that are not used simultaneously are processed as one interrupt request signal, there is also the effect that the size of the control register/control circuit portion can be reduced.
第1図は本発明のシングルチップマイクロコンピュータ
のブロック図、
第2図は本発明のシングルチップマイクロコンピュータ
においてスタンバイ解除と受信動作を連続で行なう時の
シーケンス図、
第3図は従来のシングルチップマイクロコンピュータの
ブロック図である。
1・・・・・・シングルチップマイクロコンピュータ、
2・・・・・・エツジ検出回路、3・・・・・・UAR
T、4・・・・・・送信部、5・・・・・・受信部、6
・・・・・・モードレジスタ、7・・・・・・送信端子
、8・・・・・・受信端子、10・・・・・・割込み信
号セレクタ、11.12・・・・・・外部割込み入力信
号、13・・・・・・送信完了割込み信号、14・・・
・・・受信完了割込み信号、20.21・・・・・・割
込み要求フラグ。
代理人 弁理士 内 原 音
第3目Fig. 1 is a block diagram of the single-chip microcomputer of the present invention, Fig. 2 is a sequence diagram when standby release and reception operations are performed continuously in the single-chip microcomputer of the present invention, and Fig. 3 is a block diagram of the single-chip microcomputer of the present invention. FIG. 2 is a block diagram of a computer. 1...Single-chip microcomputer,
2...Edge detection circuit, 3...UAR
T, 4...Transmitter section, 5...Receiver section, 6
...Mode register, 7...Transmission terminal, 8...Reception terminal, 10...Interrupt signal selector, 11.12...External Interrupt input signal, 13... Transmission completion interrupt signal, 14...
...Reception completion interrupt signal, 20.21...Interrupt request flag. Agent Patent Attorney Uchihara Oto 3rd
Claims (1)
アルインタフェースの割込み要求フラグを内蔵するシン
グルチップマイクロコンピュータにおいて、 前記シリアルインタフェースの動作、停止を制御する制
御レジスタを有し、前記シリアルインタフェースを動作
させている時は、前記割込み要求フラグを前記シリアル
インタフェースの割込み信号によってセットし、 前記シリアルインタフェースを停止させている時は、前
記機能端子への入力レベルの変化によって前記割込み要
求フラグをセットする切り換え手段を内蔵していること
を特徴とするシングルチップマイクロコンピュータ。[Scope of Claims] A single-chip microcomputer that includes a serial interface having a functional terminal and an interrupt request flag for the serial interface, further comprising a control register that controls operation and stop of the serial interface, and a control register that controls operation and stop of the serial interface. When the serial interface is stopped, the interrupt request flag is set by the interrupt signal of the serial interface, and when the serial interface is stopped, the interrupt request flag is set by a change in the input level to the function terminal. A single-chip microcomputer characterized by having built-in means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63135888A JPH01304564A (en) | 1988-06-01 | 1988-06-01 | Single chip microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63135888A JPH01304564A (en) | 1988-06-01 | 1988-06-01 | Single chip microcomputer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH01304564A true JPH01304564A (en) | 1989-12-08 |
Family
ID=15162139
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63135888A Pending JPH01304564A (en) | 1988-06-01 | 1988-06-01 | Single chip microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH01304564A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07105175A (en) * | 1993-10-08 | 1995-04-21 | Nec Corp | Microcomputer |
| KR100393959B1 (en) * | 1996-06-04 | 2003-10-10 | 주식회사 하이닉스반도체 | Uart |
| JP2006187467A (en) * | 2005-01-06 | 2006-07-20 | Daiman:Kk | Game machine |
| JP5432125B2 (en) * | 2008-04-08 | 2014-03-05 | エクセン株式会社 | Civil engineering machinery / equipment with a microcomputer capable of writing individual information |
-
1988
- 1988-06-01 JP JP63135888A patent/JPH01304564A/en active Pending
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07105175A (en) * | 1993-10-08 | 1995-04-21 | Nec Corp | Microcomputer |
| KR100393959B1 (en) * | 1996-06-04 | 2003-10-10 | 주식회사 하이닉스반도체 | Uart |
| JP2006187467A (en) * | 2005-01-06 | 2006-07-20 | Daiman:Kk | Game machine |
| JP5432125B2 (en) * | 2008-04-08 | 2014-03-05 | エクセン株式会社 | Civil engineering machinery / equipment with a microcomputer capable of writing individual information |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8706917B1 (en) | General purpose input/output controller | |
| JPH02224140A (en) | Interrupt test equipment | |
| JPH01304564A (en) | Single chip microcomputer | |
| CA2403754C (en) | A communication interface system, method and apparatus | |
| US6052746A (en) | Integrated circuit having programmable pull device configured to enable/disable first function in favor of second function according to predetermined scheme before/after reset | |
| US5274766A (en) | Universal keyboard and keyboard/spatial input device controller | |
| JPH0267979A (en) | Testing circuit for logic circuit | |
| JPS603747A (en) | Program selecting control system | |
| JP2001188770A (en) | One chip microcomputer | |
| JP3310482B2 (en) | Microcomputer | |
| JPS62168258A (en) | Cpu switching circuit | |
| JPH02230356A (en) | Bus extension device for information processor | |
| JP2550273Y2 (en) | Communication device | |
| JPS59188769A (en) | Control circuit of common memory | |
| JPH04155481A (en) | Microprocessor | |
| JPS6329872A (en) | Microcomputer | |
| JP2722908B2 (en) | Single chip microcomputer | |
| JPS63268053A (en) | Bus controller | |
| JPH04239985A (en) | Parallel interface circuit | |
| JPH06124257A (en) | Serial I / O control circuit | |
| JPH04369065A (en) | Direct memory access controller | |
| JPH04213182A (en) | Ic card reader/writer | |
| JPH05334101A (en) | Strength judging circuit | |
| JPH04167043A (en) | portable electronics | |
| JPH05204878A (en) | Interface control system |