JPH04311228A - Terminal function setting circuit - Google Patents
Terminal function setting circuitInfo
- Publication number
- JPH04311228A JPH04311228A JP3103812A JP10381291A JPH04311228A JP H04311228 A JPH04311228 A JP H04311228A JP 3103812 A JP3103812 A JP 3103812A JP 10381291 A JP10381291 A JP 10381291A JP H04311228 A JPH04311228 A JP H04311228A
- Authority
- JP
- Japan
- Prior art keywords
- input
- data
- output
- terminal
- assertion
- 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.)
- Granted
Links
- 230000002401 inhibitory effect Effects 0.000 claims abstract description 10
- 230000003213 activating effect Effects 0.000 claims 1
- 230000000415 inactivating effect Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 5
- 238000012905 input function Methods 0.000 description 1
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、端子機能設定回路、特
にマイクロコンピュ−タ(以下、マイコンと記述する。
)が暴走した際又はプログラムミスにより、マイコン自
身の出力によりホールドすることを防止するものに関す
るものである。[Industrial Application Field] The present invention prevents a terminal function setting circuit, particularly a microcomputer (hereinafter referred to as a microcomputer), from being held by its own output when it goes out of control or due to a programming error. It is about things.
【0002】0002
【従来の技術】図3は、従来のマイコンの入出力ポート
用と、ホールドリクエスト入力又はレディ入力等の停止
制御入力用とを共有させた端子機能設定回路のブロック
図の1例である。図において1はマイコン内部のデータ
バス(以下、内部データバスと記述する。)でCPUに
接続される。2は出力データをラッチする出力データラ
ッチ、3はポートの入出力方向を制御する方向レジスタ
、4は方向レジスタ3からの出力バッファアクティブ信
号がアサートされている間アクティブとなるゲートとし
ての出力バッファ、5は入出力端子、6はデータ線6a
に介挿されたバッファ6bから成り、入力データを内部
データバス1へ伝達するデータ入力経路、7はデータ線
7aに介挿されたバッファ7bから成り方向レジスタ3
の値をCPUへ伝達する読みだし手段、8はホールドリ
クエスト入力があった際マイコンにホールドをかけるホ
ールド制御手段、9はホールドリクエスト入力又はレデ
ィ入力の機能を選択している場合(以下、停止モードと
記述する。)においてのみ開いてホールドがかかるよう
にするANDゲートである。20はCPU内のデータを
端子5へ出力するデータ出力経路であり、データ線20
aに介挿された出力データラッチ2と出力バッファ4と
より成る。バッファ4又はバッファ6bをオン,オフす
ることにより活性,不活性化される。2. Description of the Related Art FIG. 3 is an example of a block diagram of a terminal function setting circuit in which a conventional microcomputer input/output port and a stop control input such as a hold request input or a ready input are shared. In the figure, reference numeral 1 indicates a data bus (hereinafter referred to as internal data bus) inside the microcomputer, which is connected to the CPU. 2 is an output data latch that latches output data; 3 is a direction register that controls the input/output direction of the port; 4 is an output buffer as a gate that is active while the output buffer active signal from the direction register 3 is asserted; 5 is an input/output terminal, 6 is a data line 6a
A data input path 7 is composed of a buffer 6b inserted in the data line 7a and transmits input data to the internal data bus 1. A direction register 3 is composed of a buffer 7b inserted in the data line 7a.
8 is a hold control means that holds the microcontroller when there is a hold request input, and 9 is a hold control means when the hold request input or ready input function is selected (hereinafter referred to as stop mode). This is an AND gate that is opened and held only at the point (described as ). 20 is a data output path that outputs data in the CPU to terminal 5, and the data line 20
It consists of an output data latch 2 and an output buffer 4 interposed in a. It is activated and deactivated by turning on and off the buffer 4 or the buffer 6b.
【0003】次に動作について説明する。通常の入出力
ポートとして端子5を使用する場合(以下、通常モード
と記述する。)、まず方向レジスタ3に値を書き込むこ
とにより入出力方向を決める。この図の場合“H”で出
力、“L”で入力となる。出力の場合、出力データは内
部データバス1を通って出力データラッチ2に送られ出
力バッファ4を経て入出力端子5に出力される。Next, the operation will be explained. When using the terminal 5 as a normal input/output port (hereinafter referred to as normal mode), the input/output direction is determined by first writing a value to the direction register 3. In this figure, "H" is an output, and "L" is an input. In the case of output, the output data is sent to the output data latch 2 through the internal data bus 1 and output to the input/output terminal 5 via the output buffer 4.
【0004】入力の場合、入出力端子5に入力された入
力データはデータ入力経路6を通って内部データバス1
へ送られる。In the case of input, the input data input to the input/output terminal 5 passes through the data input path 6 to the internal data bus 1.
sent to.
【0005】停止モードを選択している場合は、ポート
は入力に固定される。ここでホールドリクエスト入力が
あった場合、ANDゲート9でホールドリクエスト入力
と停止モード選択信号Bは“H”アクティブの論理積が
取られホールド制御手段8に入力されマイコンにホール
ドがかけられる。つまり、停止モードによりゲート9が
開かれて端子5に入力されるホールドリクエスト入力等
の停止制御入力に基づきホールド制御手段8を介してC
PUが停止される。[0005] When the stop mode is selected, the port is fixed to input. If there is a hold request input here, the AND gate 9 performs a logical product of the "H" active hold request input and the stop mode selection signal B, and inputs the result to the hold control means 8, where a hold is applied to the microcomputer. That is, the gate 9 is opened in the stop mode, and the C
PU is stopped.
【0006】[0006]
【発明が解決しようとする課題】従来のマイコンでは停
止モードを選択時にCPUの暴走、プログラムミス等で
方向レジスタの値が書き変わってしまった場合、マイコ
ン自身の出力データによりホールドがかかってしまうと
いう問題があった。[Problem to be solved by the invention] With conventional microcontrollers, if the value of the direction register is changed due to a CPU runaway or a programming error when the stop mode is selected, the hold is applied by the output data of the microcontroller itself. There was a problem.
【0007】本発明は上記のような欠点を解消するため
になされたもので停止モード選択時は方向レジスタから
の出力バッファアクティブ信号のアサートを禁止するマ
イコンを得ること目的とする。The present invention has been made to solve the above-mentioned drawbacks, and an object of the present invention is to provide a microcomputer that inhibits the assertion of the output buffer active signal from the direction register when the stop mode is selected.
【0008】[0008]
【課題を解決するための手段】本発明は、データ出力経
路20及びデータ入力経路6を活性,不活性化して端子
5を入出力ポートとして使用する通常モード以外(主に
停止モード時)の時にゲート(出力バッファ4)を閉じ
て上記ゲート(出力バッファ4)の方向レジスタ3によ
るアサートを禁止するアサート禁止手段10を備えたも
のである。[Means for Solving the Problems] The present invention enables and deactivates the data output path 20 and the data input path 6 to use the terminal 5 as an input/output port in a mode other than the normal mode (mainly in the stop mode). The device is equipped with an assertion inhibiting means 10 that closes the gate (output buffer 4) and inhibits the direction register 3 from asserting the gate (output buffer 4).
【0009】[0009]
【作用】本発明においては、通常モードの時には、方向
レジスタ3の出力がデータ出力経路20のゲート(出力
バッファ4)に対してアサートされ、データ出力経路2
0及びデータ入力経路6が活性,不活性化されて端子(
入出力端子5)が入出力ポートとして使用されるが、通
常モード以外、主に停止モードの時にはアサート禁止手
段10が閉じて、方向レジスタ3の出力の上記ゲート(
出力バッファ4)へのアサートが禁止される。[Operation] In the present invention, in the normal mode, the output of the direction register 3 is asserted to the gate (output buffer 4) of the data output path 20;
0 and data input path 6 are activated and deactivated, and the terminal (
The input/output terminal 5) is used as an input/output port, but when the mode is other than the normal mode, mainly the stop mode, the assertion inhibiting means 10 closes and the output gate of the direction register 3 (
Assertion to output buffer 4) is prohibited.
【0010】0010
【実施例】以下、本発明の実施例を図に従って説明する
。図1は本発明に関する一実施例を示したブロック図で
ある。図において図3と同一部分又は相当部分には同一
符号を付する。10は通常モード選択信号Aで開かれ、
選択信号Aが供給されないと閉じられ、すなわち通常モ
ードでない時に出力バッファアクティブ信号の出力バッ
ファ4へのアサートを禁止する手段(以下、出力バッフ
ァアクティブ信号アサート禁止手段と記述する。)であ
る。また図2に出力バッファアクティブ信号アサート禁
止手段の構成例を示す。次に動作について説明する。本
実施例においては1〜9は従来のマイコンと同じ動作を
する。方向レジスタ3からの出力バッファアクティブ信
号と通常モード選択信号Aとの“H”アクティブの論理
積を取る出力バッファアクティブ信号アサート禁止手段
10を設けたことにより、通常モード選択時のみ出力バ
ッファ4をアクティブにすることができる。停止モード
の時(通常モード以外の時)は、通常モード選択信号A
は“L”で、アサート禁止手段10が閉であり、出力バ
ッファ4が動作することはなく、従ってCPU暴走時に
ホールドがかかってしまうおそれがなくなる。[Embodiments] Hereinafter, embodiments of the present invention will be explained with reference to the drawings. FIG. 1 is a block diagram showing one embodiment of the present invention. In the figure, the same or equivalent parts as in FIG. 3 are given the same reference numerals. 10 is opened by the normal mode selection signal A,
This means is closed when the selection signal A is not supplied, that is, prohibits assertion of the output buffer active signal to the output buffer 4 when the mode is not normal (hereinafter referred to as output buffer active signal assertion prohibition means). Further, FIG. 2 shows an example of the configuration of the output buffer active signal assertion inhibiting means. Next, the operation will be explained. In this embodiment, 1 to 9 operate in the same way as a conventional microcomputer. By providing the output buffer active signal assertion inhibiting means 10 that takes the logical product of the output buffer active signal from the direction register 3 and the normal mode selection signal A and the "H" active state, the output buffer 4 is activated only when the normal mode is selected. It can be done. When in stop mode (other than normal mode), normal mode selection signal A
is "L", the assertion inhibiting means 10 is closed, and the output buffer 4 does not operate, so there is no possibility that a hold will be applied when the CPU runs out of control.
【0011】[0011]
【発明の効果】以上のように本発明によれば、通常モー
ド以外の時にはデータ出力経路におけるゲートへのアサ
ートを禁止するアサート禁止手段を設けたので、停止モ
ードを選択時にCPUの暴走、プログラムミス等で方向
レジスタの値が書き変わってしまっても、マイコン自身
の出力データによりホールドがかかってしまうことを防
止できるという効果がある。As described above, according to the present invention, since an assertion inhibiting means is provided that inhibits assertion to the gate in the data output path when the mode is other than the normal mode, it is possible to prevent CPU runaway and program errors when the stop mode is selected. Even if the value of the direction register is rewritten due to a change in the value of the direction register, it is possible to prevent the output data from being held by the microcomputer itself.
【図1】本発明の一実施例による端子機能設定回路のブ
ロック図である。FIG. 1 is a block diagram of a terminal function setting circuit according to an embodiment of the present invention.
【図2】本発明の一実施例によるアサート禁止手段のブ
ロック図である。FIG. 2 is a block diagram of an assertion inhibiting means according to an embodiment of the present invention.
【図3】従来例による端子機能設定回路のブロック図で
ある。FIG. 3 is a block diagram of a conventional terminal function setting circuit.
1 内部データバス
3 方向レジスタ
4 出力バッファ
5 入出力端子
6 データ入力経路
8 ホールド制御手段
9 ANDゲート
10 出力バッファアクティブ信号アサート禁止手段
20 データ出力経路1 Internal data bus 3 Direction register 4 Output buffer 5 Input/output terminal 6 Data input path 8 Hold control means 9 AND gate 10 Output buffer active signal assertion prohibition means 20 Data output path
Claims (1)
1つの端子との間に介挿されて、上記内部データバスの
出力データを上記端子に出力するデータ出力経路及び上
記端子からの入力データを上記内部データバスに入力す
るデータ入力経路と、上記データ出力経路及びデータ入
力経路を活性又は不活性化して上記端子を入出力ポート
に設定するためのデータを有する方向レジスタと、外部
からの停止モード選択信号に基づき開閉されて上記端子
からのホールドリクエスト入力又はレディ入力等の停止
制御入力を取込むゲートとを備えた端子機能設定回路に
おいて、上記端子を入出力ポートとして使用する通常モ
ード以外の時に閉じて上記方向レジスタから、データ出
力経路を活性化するゲートへのアサートを禁止するアサ
ート禁止手段を備えたことを特徴とする端子機能設定回
路。1. A data output path that is inserted between an internal data bus connected to a CPU and one terminal, and that outputs output data of the internal data bus to the terminal, and that outputs input data from the terminal. A data input path input to the internal data bus, a direction register having data for activating or inactivating the data output path and the data input path and setting the terminal as an input/output port, and a stop mode from the outside. In a terminal function setting circuit equipped with a gate that is opened and closed based on a selection signal to receive a stop control input such as a hold request input or a ready input from the above terminal, when the above terminal is used as an input/output port in a mode other than the normal mode. A terminal function setting circuit comprising an assertion inhibiting means for inhibiting assertion from the direction register to a gate that activates a data output path when the direction register is closed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3103812A JP2978278B2 (en) | 1991-04-09 | 1991-04-09 | Terminal function setting circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3103812A JP2978278B2 (en) | 1991-04-09 | 1991-04-09 | Terminal function setting circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04311228A true JPH04311228A (en) | 1992-11-04 |
JP2978278B2 JP2978278B2 (en) | 1999-11-15 |
Family
ID=14363818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3103812A Expired - Lifetime JP2978278B2 (en) | 1991-04-09 | 1991-04-09 | Terminal function setting circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2978278B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009104653A (en) * | 2003-07-31 | 2009-05-14 | Fujitsu Microelectronics Ltd | Operation mode control circuit, and microcomputer |
-
1991
- 1991-04-09 JP JP3103812A patent/JP2978278B2/en not_active Expired - Lifetime
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009104653A (en) * | 2003-07-31 | 2009-05-14 | Fujitsu Microelectronics Ltd | Operation mode control circuit, and microcomputer |
Also Published As
Publication number | Publication date |
---|---|
JP2978278B2 (en) | 1999-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH07200413A (en) | Microcomputer | |
JPS61250739A (en) | Data source system | |
JP3025842B2 (en) | Apparatus for protecting a memory area of an electronic system with a microprocessor | |
JPH04311228A (en) | Terminal function setting circuit | |
JPH04311282A (en) | System for controlling terminal function setting circuit | |
KR930011347B1 (en) | Circuit for preventing mis-conduct of non-volatile memory by power input/output signal | |
JPS6167148A (en) | Microcomputer | |
KR0171173B1 (en) | One-chip microcomputer | |
JP2847741B2 (en) | Microcomputer | |
JP3310482B2 (en) | Microcomputer | |
JPH02224044A (en) | Program storage device | |
JPS62184554A (en) | Memory protection circuit | |
JPH01121967A (en) | Microprocessor with built-in prom | |
JPH08137757A (en) | Semiconductor integrated circuit device | |
JPH04311244A (en) | Microcomputer | |
JPS5850409Y2 (en) | information processing equipment | |
JPS62247447A (en) | Microcomputer | |
JPH0574135A (en) | Memory card | |
JPH0934502A (en) | Controller | |
JPH04248632A (en) | Error detecting circuit | |
JPH0612292A (en) | Microcomputer | |
JPH0421123A (en) | Fifo register | |
JPS62149220A (en) | Integrated circuit | |
JPH10143462A (en) | Microcomputer | |
JPH0997247A (en) | Microcomputer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070910 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080910 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080910 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090910 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090910 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100910 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110910 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110910 Year of fee payment: 12 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110910 Year of fee payment: 12 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
EXPY | Cancellation because of completion of term | ||
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110910 Year of fee payment: 12 |