JPH0793281A - Key-on wakeup mode setting circuit - Google Patents

Key-on wakeup mode setting circuit

Info

Publication number
JPH0793281A
JPH0793281A JP5235212A JP23521293A JPH0793281A JP H0793281 A JPH0793281 A JP H0793281A JP 5235212 A JP5235212 A JP 5235212A JP 23521293 A JP23521293 A JP 23521293A JP H0793281 A JPH0793281 A JP H0793281A
Authority
JP
Japan
Prior art keywords
key
wakeup
input
register
port
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
Application number
JP5235212A
Other languages
Japanese (ja)
Inventor
Takashi Harada
尚 原田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5235212A priority Critical patent/JPH0793281A/en
Publication of JPH0793281A publication Critical patent/JPH0793281A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To automatically validize key-on wakeup by writing a clock signal and data for stopping an oscilator into a register for clock signal control when validizing interruption. CONSTITUTION:By writing '1' in a register 20 for automatic key-on wakeup setting, a pull-up transistor 11 is turned on and at the same time, '0' is written in a direction register 5. Therefore, a P channel transistor 12 is turned on, and pull-up is turned to a valid state. On the other hand, when the clock signal and the data for stopping the osicllator are written in a register 22 for clock signal control, the osicllator is stopped and the clock signal is stopped. Further, when an 'L' level to hit an 'H' level outputted from the pull-up transistor 11 is inputted to an external input/output terminal 3 by a key input for validizing the interruption, the 'L' of an interrupt signal 19 as a key-on wakeup interrupting input is outputted through a Schmift circuit 10.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、キー入力による割り
込みによりストップ状態,ウェイト状態からワンチップ
マイクロコンピュータなどの動作を再開するキーオンウ
ェイクアップモード設定回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a key-on wake-up mode setting circuit for restarting the operation of a one-chip microcomputer or the like from a stop state or a wait state by interruption by a key input.

【0002】[0002]

【従来の技術】図6は従来のキーオンウェイクアップ機
能回路を示すブロック図であり、図において、1は半導
体集積回路の電源(以下、Vccという)、2は接地、
3は外部入出力端子、4はデータバス、5はI/Oポー
トの入出力を決定するレジスタ(以下、方向レジスタと
いう)である。
2. Description of the Related Art FIG. 6 is a block diagram showing a conventional key-on wakeup function circuit. In the figure, 1 is a power supply (hereinafter referred to as Vcc) of a semiconductor integrated circuit, 2 is a ground,
Reference numeral 3 is an external input / output terminal, 4 is a data bus, and 5 is a register (hereinafter referred to as a direction register) that determines the input / output of the I / O port.

【0003】また、6はI/Oポートへ出力するデータ
を格納するレジスタ(以下、ポートラッチという)、7
はプルアップトランジスタを有効にするか非有効にする
かを決定するレジスタ(以下、プルレジスタという)で
ある。
Further, 6 is a register for storing data to be output to the I / O port (hereinafter referred to as port latch), 7
Is a register (hereinafter referred to as a pull register) that determines whether to enable or disable the pull-up transistor.

【0004】8はポートラッチ6の内容をデータバス4
へ出力するためのバッファ、9はI/Oポートが入力状
態の時にデータバス4へ入力データを出力するためのバ
ッファ、10はキーオンウェイクアップ用シュミット回
路、11はプルアップ用Pチャネルトランジスタ(以
下、プルアップトランジスタという)である。
Reference numeral 8 indicates the contents of the port latch 6 on the data bus 4
To output data to the data bus 4 when the I / O port is in an input state, 10 is a Schmitt circuit for key-on wakeup, 11 is a P-channel transistor for pullup (hereinafter , Called a pull-up transistor).

【0005】また、12はI/Oポートが入力に設定さ
れている時にのみ、プルアップが有効となるように制御
されるPチャネルトランジスタ、13は外部入出力端子
3へデータを出力するためのPチャネルトランジスタ、
14は外部入出力端子3へデータを出力するためのNチ
ャネルトランジスタ、15は外部出力を制御するための
ナンドゲートである。
Further, 12 is a P-channel transistor controlled so that pull-up is effective only when the I / O port is set to input, and 13 is for outputting data to the external input / output terminal 3. P-channel transistor,
Reference numeral 14 is an N-channel transistor for outputting data to the external input / output terminal 3, and 15 is a NAND gate for controlling external output.

【0006】さらに、16は外部出力を制御するための
ノアゲート、17は外部出力を制御するためのインバー
タ、18はプルアップトランジスタ18を制御するめた
のインバータ、19はキーオンウェイクアップ割り込み
入力を示している。
Further, 16 is a NOR gate for controlling an external output, 17 is an inverter for controlling the external output, 18 is an inverter for controlling the pull-up transistor 18, and 19 is a key-on wake-up interrupt input. There is.

【0007】また、プルアップトランジスタ11のオン
抵抗は数十kΩ、Pチャネルトランジスタ12のオン抵
抗はプルアップトランジスタ11に比べて十分に小さい
ものとする。ワンチップマイコンにおいて割り込みを有
効にしている場合に、キー入力による割り込み信号が有
効であるものとする。
The pull-up transistor 11 has an ON resistance of several tens of kΩ and the P-channel transistor 12 has an ON resistance sufficiently smaller than that of the pull-up transistor 11. When the interrupt is enabled in the one-chip microcomputer, it is assumed that the interrupt signal by the key input is valid.

【0008】次に動作について説明する。ここでは、ワ
ンチップマイクロコンピュータ(以下、ワンチップマイ
コンという)を一例として説明する。一般に、ワンチッ
プマイコンは、クロック信号を用いて他のワンチップマ
イコンなどと同期を行っている。
Next, the operation will be described. Here, a one-chip microcomputer (hereinafter referred to as one-chip microcomputer) will be described as an example. Generally, a one-chip microcomputer synchronizes with another one-chip microcomputer using a clock signal.

【0009】また、上記クロック信号は、ワンチップマ
イコンに発振子を接続し、ワンチップマイコン内部でク
ロック信号を発生し、他の半導体集積回路に供給してい
る。
The clock signal is supplied to another semiconductor integrated circuit by connecting an oscillator to the one-chip microcomputer to generate a clock signal inside the one-chip microcomputer.

【0010】上記発振子を停止し、ワンチップマイコン
を発振子を停止させる前の状態で保持することが可能で
ある(以下、この状態をストップ状態という)。ワンチ
ップマイコンは、発振子が停止し、内部クロックを発生
することができないため、ストップ状態の間動作してい
ない。
It is possible to stop the oscillator and hold the one-chip microcomputer in a state before stopping the oscillator (hereinafter, this state is called a stop state). The one-chip microcomputer does not operate during the stop state because the oscillator stops and the internal clock cannot be generated.

【0011】また、発振子を停止することなくワンチッ
プマイコンの内部クロックのみを停止させ、ワンチップ
マイコンを上記内部クロックの停止前の状態に保持する
ことができる(以下、この状態をウェイト状態とい
う)。
Further, it is possible to stop only the internal clock of the one-chip microcomputer without stopping the oscillator, and hold the one-chip microcomputer in the state before the stop of the internal clock (hereinafter, this state is referred to as a wait state). ).

【0012】これらのストップ状態,ウェイト状態から
ワンチップマイコンを動作させるには、割り込みによる
復帰またはリセット入力によるワンチップマイコンの初
期化を行うことで実現できる。
In order to operate the one-chip microcomputer from the stop state and the wait state, it is possible to carry out restoration by interrupt or initialization of the one-chip microcomputer by reset input.

【0013】このうち、上記割り込みの一例として、キ
ーオンウェイクアップがある。このキーオンウェイクア
ップとは、ワンチップマイコンのキーオンウェイクアッ
プ機能を有するI/Oポートで、入力状態へ設定されて
いるI/Oポートへ”L”レベルの入力があった場合に
割り込み信号を発生する機能を有している。
Of these, a key-on wakeup is an example of the above-mentioned interrupt. This key-on wakeup is an I / O port that has a key-on wakeup function of a one-chip microcomputer, and generates an interrupt signal when an "L" level is input to an I / O port set to the input state. It has a function to do.

【0014】つまり、このI/Oポートに”L”レベル
が入力されることにより、ストップ状態、またはウェイ
ト状態から動作状態へ復帰させることができ、テンキー
等のキー入力によりそのI/Oポートへ”L”レベルが
印加されるような回路を半導体集積回路に接続すれば、
キー入力によって割り込みを発生することができるた
め、キー入力をトリガとして色々なことができる。
That is, by inputting the "L" level to this I / O port, it is possible to return from the stop state or the wait state to the operating state, and to the I / O port by key input such as ten keys. If a circuit to which the “L” level is applied is connected to the semiconductor integrated circuit,
Since an interrupt can be generated by key input, various things can be done with the key input as a trigger.

【0015】また、I/Oポートには入力状態と出力状
態があり、入出力は方向レジスタ5により決定される。
方向レジスタ5が”1”である場合、I/Oポートは出
力状態、一方、”0”である場合は、入力状態に設定さ
れる。
The I / O port has an input state and an output state, and the input / output is determined by the direction register 5.
When the direction register 5 is "1", the I / O port is set to the output state, while when it is "0", it is set to the input state.

【0016】方向レジスタ5が”1”、ポートラッチ6
内のデータが”0”である場合、ナンドゲート15,ノ
アゲート16からは”H”が出力され、Pチャネルトラ
ンジスタ13はオフ状態、Nチャネルトランジスタ14
はオン状態となり、”L”が外部入出力端子3に出力さ
れる。
Direction register 5 is "1", port latch 6
When the data inside is "0", "H" is output from the NAND gate 15 and the NOR gate 16, the P-channel transistor 13 is in the OFF state, and the N-channel transistor 14 is in the OFF state.
Is turned on, and “L” is output to the external input / output terminal 3.

【0017】方向レジスタが”1”、ポートラッチ6内
のデータが”1”である場合、ナンドゲート15,ノア
ゲート16からは”L”が出力され、Nチャネルトラン
ジスタ14はオフ状態、Pチャネルトランジスタ13は
オン状態となり、”H”が外部入出力端子3に出力され
る。
When the direction register is "1" and the data in the port latch 6 is "1", "L" is output from the NAND gate 15 and the NOR gate 16, the N-channel transistor 14 is in the off state, and the P-channel transistor 13 is in the off state. Is turned on, and "H" is output to the external input / output terminal 3.

【0018】次に、割り込みが無効、方向レジスタが”
0”、プルレジスタが”0”の場合、バッファ9は出力
有効、外部入出力端子3は入力状態となり、入力信号は
バッファ9からデータバス4へ出力される。
Next, the interrupt is disabled and the direction register is set to "
When 0 ”and the pull register are“ 0 ”, the output of the buffer 9 is valid, the external input / output terminal 3 is in the input state, and the input signal is output from the buffer 9 to the data bus 4.

【0019】割り込みが無効、方向レジスタが”0”、
プルレジスタが”1”である場合、プルアップトランジ
スタ11、Pチャネルトランジスタ12がオン状態、バ
ッファ9は出力有効となり、外部入出力端子3に”1”
が出力される。
Interrupt disabled, direction register "0",
When the pull register is "1", the pull-up transistor 11 and the P-channel transistor 12 are on, the output of the buffer 9 is valid, and the external input / output terminal 3 is "1".
Is output.

【0020】このとき、プルアップトランジスタ11の
オン抵抗が数十kΩのため、外部入出力端子3にプルア
ップトランジスタ11が出力する”H”レベルに打ち勝
つ”L”レベルが入力されるとバッファ9から”L”が
データバス4へ出力される。
At this time, since the ON resistance of the pull-up transistor 11 is several tens of kΩ, when the "L" level that overcomes the "H" level output by the pull-up transistor 11 is input to the external input / output terminal 3, the buffer 9 is input. To "L" are output to the data bus 4.

【0021】上記”L”レベル以下の”L”レベルの入
力または”H”レベルの入力時は、バッファ9から”
H”がデータバスへ出力される。また、ポートラッチ6
に格納されているデータは、方向レジスタが”1”であ
る場合、バッファ8からデータバスへ出力される。
When an "L" level input below the "L" level or an "H" level is input, the buffer 9 outputs "
H "is output to the data bus. Also, the port latch 6
The data stored in the buffer is output from the buffer 8 to the data bus when the direction register is "1".

【0022】割り込みが有効、方向レジスタが”0”、
プルレジスタが”0”の場合、バッファ9は出力有効、
外部入出力端子3は入力状態となり、外部入出力端子3
にプルアップトランジスタ11が出力する”H”レベル
に打ち勝つ”L”レベルが入力されると、シュミット回
路10を介して割り込み信号”L”が出力される。この
とき割り込みが発生し、データバスへの出力信号は無効
となる。
Interrupt is valid, direction register is "0",
When the pull register is "0", the output of the buffer 9 is valid,
The external input / output terminal 3 becomes the input state, and the external input / output terminal 3
When the "L" level that overcomes the "H" level output by the pull-up transistor 11 is input to the, the interrupt signal "L" is output via the Schmitt circuit 10. At this time, an interrupt occurs and the output signal to the data bus becomes invalid.

【0023】図7はキー入力に割り当てられた複数ポー
トのうち、いずれかひとつのキー入力による割り込みを
行うためのキーオンウェイクアップ機能回路を示し、図
において、24は図6で示したI/Oポート1ビットの
キーオンウェイクアップ回路、25はキースイッチを示
している。
FIG. 7 shows a key-on wake-up function circuit for performing an interrupt by any one of the plurality of ports assigned to key input, and in the figure, 24 is the I / O shown in FIG. A port 1-bit key-on wake-up circuit, and 25 a key switch.

【0024】一般に、多数のキー入力が必要であるた
め、キーオンウェイクアップ機能を有するI/Oポート
は1ビットで構成されていることはなく、図7で示した
ように、複数ビットで構成されている。複数ビットのキ
ーオンウェイクアップ機能を有するI/Oポートの場
合、各ビットの割り込み信号の論理積をノアゲート26
でとり、これをキー入力による割り込み信号としてい
る。なお、これら従来技術の関連技術文献として「三菱
電機株式会社製 納入規格 北ノキ−M38200MX
−XXXP−00−A P15,P19 1993年1
月発行」がある。
Generally, since a large number of key inputs are required, the I / O port having the key-on wakeup function is not composed of 1 bit, but is composed of a plurality of bits as shown in FIG. ing. In the case of an I / O port having a multi-bit key-on wakeup function, the logical product of the interrupt signals of each bit is NOR gate 26.
Then, this is used as an interrupt signal by key input. In addition, as a related technical document of these conventional technologies, "Mitsubishi Electric Corporation, Delivery Standard Kitanoki-M38200MX"
-XXXP-00-A P15, P19 1993 1
There is a monthly issue.

【0025】[0025]

【発明が解決しようとする課題】従来のキーオンウェイ
クアップ機能回路は以上のように構成されているので、
キーオンウェイクアップを有効とするためには、キーオ
ンウェイクアップ機能を有したI/Oポートを入力状態
にし、プルアップトランジスタ11,12を有効にした
後に、ストップ状態、またはウェイト状態に設定する必
要があるため、プログラムには上記3つのことを実行す
るためにキーオンウェイクアップを有効とするためのプ
ログラムにメモリを多く必要とするなどの問題点があっ
た。
Since the conventional key-on wakeup function circuit is configured as described above,
In order to enable the key-on wake-up, it is necessary to set the I / O port having the key-on wake-up function to the input state, enable the pull-up transistors 11 and 12, and then set the stop state or the wait state. Therefore, the program has a problem that a large amount of memory is required for the program for enabling the key-on wakeup in order to execute the above three things.

【0026】請求項1の発明は上記のような問題点を解
消するためになされたもので、キーオンウェイクアップ
に割り付けられた各ポートを、キーオンウェイクアップ
の割り込み受付の設定をキーオンウェイクアップ自動設
定用レジスタにデータを書き込むだけで、容易に色々な
種類に設定できるキーオンウェイクアップモード設定回
路を得ることを目的とする。
The invention of claim 1 has been made to solve the above-mentioned problems, and each port assigned to key-on wake-up is automatically set to key-on wake-up interrupt acceptance setting for each port assigned to key-on wake-up. An object of the present invention is to obtain a key-on wake-up mode setting circuit that can be easily set to various types simply by writing data in the register for use.

【0027】請求項2の発明はウェイト状態でキーオン
ウェイクアップを有効に設定できるキーオンウェイクア
ップモード設定回路を得ることを目的とする。
It is an object of the present invention to provide a key-on wakeup mode setting circuit capable of effectively setting the key-on wakeup in the wait state.

【0028】請求項3の発明はキーオンウェイクアップ
自動設定用レジスタの特定ビットにデータを書き込むこ
とで、特定のポートがキーオンウェイクアップによる割
り込みを受け付け可能にできるキーオンウェイクアップ
モード設定回路を得ることを目的とする。
According to a third aspect of the present invention, a key-on wake-up mode setting circuit capable of accepting a key-on wake-up interrupt by a specific port can be obtained by writing data to a specific bit of the key-on wake-up automatic setting register. To aim.

【0029】請求項4の発明は各バイトのキーオンウェ
イクアップ自動設定用レジスタにそれぞれ書き込みを行
うことで、それぞれキーオンウェイクアップを有効に
し、ストップ状態を設定し、ウェイト状態を設定できる
キーオンウェイクアップモード設定回路を得ることを目
的とする。
According to a fourth aspect of the present invention, the key-on wakeup mode can be enabled, the stop state can be set, and the wait state can be set by writing to the key-on wakeup automatic setting register of each byte. The purpose is to obtain a setting circuit.

【0030】請求項5の発明はキーオンウェイクアップ
に割り付けられたポートが複数ある場合でも、キーオン
ウェイクアップ自動設定用レジスタに書き込むデータに
より、キーオンウェイクアップに使用する各ポートのビ
ットを容易に指定できるキーオンウェイクアップモード
設定回路を得ることを目的とする。
According to the fifth aspect of the present invention, even when there are a plurality of ports assigned to the key-on wakeup, the bit of each port used for the key-on wakeup can be easily specified by the data written to the key-on wakeup automatic setting register. The purpose is to obtain a key-on wake-up mode setting circuit.

【0031】[0031]

【課題を解決するための手段】請求項1の発明に係るキ
ーオンウェイクアップモード設定回路は、データの書き
込みによりプルアップを有効にし、かつ割り込みを有効
とするキーオンウェイクアップ自動設定用レジスタを設
け、上記割り込みを有効とする際に、クロック信号制御
用レジスタに、クロック信号および発振子停止のための
データを書き込ませるようにしたものである。
According to a first aspect of the present invention, there is provided a key-on wake-up mode setting circuit, which is provided with a key-on wake-up automatic setting register for enabling pull-up by writing data and enabling an interrupt. When the above interrupt is enabled, the clock signal and the data for stopping the oscillator are written in the clock signal control register.

【0032】請求項2の発明に係るキーオンウェイクア
ップモード設定回路は、キーオンウェイクアップ自動設
定用レジスタに書き込むデータにより、発振制御におい
て、クロック信号制御用レジスタに書き込まれた発振子
の停止,内部クロックのみの停止および発振制御は現状
維持を選択可能としたものである。
In the key-on wake-up mode setting circuit according to the invention of claim 2, in the oscillation control, the oscillator stopped and the internal clock written in the clock signal control register are controlled by the data to be written in the key-on wake-up automatic setting register. The current stop and oscillation control are selectable.

【0033】請求項3の発明に係るキーオンウェイクア
ップモード設定回路は、キーオンウェイクアップ自動設
定用レジスタの各ビットに対応した入力機能を有したポ
ートがあり、上記キーオンウェイクアップ自動設定用レ
ジスタのビットにデータが書き込まれることにより、キ
ー入力による割り込みを受付可能にするためにポートを
入力状態にし、プルアップ有効の設定を上記データの書
き込まれたビットに対応したポートのみに可能としたも
のである。
The key-on wakeup mode setting circuit according to the invention of claim 3 has a port having an input function corresponding to each bit of the key-on wakeup automatic setting register, and the bit of the key-on wakeup automatic setting register is By writing the data to the port, the port is set to the input state to accept the interrupt by the key input, and the pull-up enable setting is enabled only to the port corresponding to the bit in which the data is written. .

【0034】請求項4の発明に係るキーオンウェイクア
ップモード設定回路は、キーオンウェイクアップ自動設
定用レジスタの各ビットに対応した数ビットを1グルー
プ,あるいは1ビットをグループとする入力機能を有し
たポートがあり、上記キーオンウェイクアップ自動設定
用レジスタのビットにデータが書き込まれることによ
り、キー入力による割り込みを受付可能にするためにポ
ートを入力状態にし、プルアップ有効の設定を上記デー
タの書き込まれたビットに対応したポートのグループの
みに可能としたものである。
A key-on wake-up mode setting circuit according to a fourth aspect of the present invention is a port having an input function of grouping several bits corresponding to each bit of the key-on wake-up automatic setting register as one group or one bit as a group. When the data is written to the bit of the key-on wakeup automatic setting register, the port is set to the input state to accept the interrupt by the key input, and the pull-up enable setting is written. This is possible only for a group of ports corresponding to bits.

【0035】請求項5の発明に係るキーオンウェイクア
ップモード設定回路は、ポートが機能的に割り振られた
ポート群が複数であり、1グループ内の複数のポートは
必ず同一ポート群に設定し、上記キーオンウェイクアッ
プ自動設定用レジスタに書き込むデータにより、上記グ
ループに対してキー入力による割り込みを受付可能にす
るためにポートを入力状態にし、プルアップ有効の設定
を上記データの書き込まれたビットに対応したポートの
グループのみに可能としたものである。
In the key-on wakeup mode setting circuit according to the fifth aspect of the present invention, there are a plurality of port groups to which the ports are functionally assigned, and a plurality of ports in one group must be set to the same port group. With the data written to the key-on wakeup automatic setting register, the port is set to the input state in order to accept the interrupt by key input to the above group, and the pullup enable setting corresponds to the bit in which the above data is written. This is possible only for a group of ports.

【0036】[0036]

【作用】請求項1の発明におけるキーオンウェイクアッ
プモード設定回路は、キーオンウェイクアップ自動設定
用レジスタの割り込みを有効とするデータを書き込むこ
とにより、自動的にキーオンウェイクアップを有効にす
る。
The key-on wake-up mode setting circuit according to the first aspect of the present invention automatically enables the key-on wake-up by writing the data for enabling the interrupt of the key-on wake-up automatic setting register.

【0037】請求項2の発明におけるキーオンウェイク
アップモード設定回路は、キーオンウェイクアップ自動
設定用レジスタの1ビット目に”1”を書き込むこと
で、方向レジスタに”0”が書き込まれて割り込みを有
効にし、さらにクロック信号制御用レジスタに発振子が
停止した状態のデータ,クロックが停止するようなデー
タを書き込んで、ウェイト状態で、キーオンウェイクア
ップを有効に設定可能にする。
In the key-on wakeup mode setting circuit according to the second aspect of the present invention, by writing "1" in the first bit of the key-on wakeup automatic setting register, "0" is written in the direction register to enable the interrupt. Further, data in which the oscillator is stopped and data in which the clock is stopped are written in the clock signal control register to enable the key-on wakeup to be enabled in the wait state.

【0038】請求項3の発明におけるキーオンウェイク
アップモード設定回路は、キーオンウェイクアップ自動
設定用レジスタの特定ビットに”1”を書き込むことに
より、特定のポートがキーオンウェイクアップによる割
り込みを受け付け可能にする。
In the key-on wakeup mode setting circuit according to the third aspect of the present invention, by writing "1" to the specific bit of the key-on wakeup automatic setting register, the specific port can accept the interrupt due to the key-on wakeup. .

【0039】請求項4の発明におけるキーオンウェイク
アップモード設定回路は、1バイト目,2バイト目,3
バイト目の各キーオンウェイクアップ自動設定用レジス
タへの書き込みによって、それぞれキーオンウェイクア
ップを有効にし、ストップ状態を設定し、ウエイト状態
に設定可能にする。
In the key-on wakeup mode setting circuit according to the invention of claim 4, the first byte, the second byte, and the third byte
By writing each key-on wakeup automatic setting register at the byte, the key-on wakeup is enabled, the stop state is set, and the wait state can be set.

【0040】請求項5の発明に係るキーオンウェイクア
ップモード設定回路は、キーオンウェイクアップに割り
付けられたポートが複数ある場合でも、キーオンウェイ
クアップ自動設定用レジスタに書き込むデータにより、
キーオンウェイクアップに使用する各ポートのビットを
指定可能にする。
According to the fifth aspect of the present invention, the key-on wake-up mode setting circuit uses the data written in the key-on wake-up automatic setting register even when there are a plurality of ports assigned to the key-on wake-up.
Allows you to specify the bit for each port used for key-on wakeup.

【0041】[0041]

【実施例】【Example】

実施例1.以下、請求項1の発明の一実施例を図1につ
いて説明する。図において、1は半導体集積回路のVc
c、2は接地、3は外部入出力端子、4はデータバス、
5はI/Oポートの入出力を決定する方向レジスタであ
る。
Example 1. An embodiment of the invention of claim 1 will be described below with reference to FIG. In the figure, 1 is Vc of the semiconductor integrated circuit
c, 2 is ground, 3 is an external input / output terminal, 4 is a data bus,
Reference numeral 5 is a direction register that determines the input / output of the I / O port.

【0042】また、6はI/Oポートへ出力するデータ
を格納するポートラッチ、7はプルアップトランジスタ
を有効にするか非有効にするかを決定するプルレジスタ
である。
Further, 6 is a port latch for storing the data to be output to the I / O port, and 7 is a pull register for deciding whether to enable or disable the pull-up transistor.

【0043】8はポートラッチ6の内容をデータバス4
へ出力するためのバッファ、9はI/Oポートが入力状
態の時にデータバス4へ入力データを出力するためのバ
ッファ、10はキーオンウェイクアップ用シュミット回
路、11はプルアップトランジスタである。
Reference numeral 8 indicates the contents of the port latch 6 on the data bus 4
A buffer for outputting input data to the data bus 4 when the I / O port is in an input state, 10 a Schmitt circuit for key-on wakeup, and 11 a pull-up transistor.

【0044】また、12はI/Oポートが入力に設定さ
れている時にのみ、プルアップが有効となるように制御
されるPチャネルトランジスタ、13は外部入出力端子
3へデータを出力するためのPチャネルトランジスタ、
14は外部入出力端子3へデータを出力するためのNチ
ャネルトランジスタ、15は外部出力を制御するための
ナンドゲートである。
Further, 12 is a P-channel transistor which is controlled so that pull-up becomes effective only when the I / O port is set to input, and 13 is for outputting data to the external input / output terminal 3. P-channel transistor,
Reference numeral 14 is an N-channel transistor for outputting data to the external input / output terminal 3, and 15 is a NAND gate for controlling external output.

【0045】さらに、16は外部出力を制御するための
ノアゲート、17は外部出力を制御するためのインバー
タ、19はキーオンウェイクアップ割り込み入力を示し
ている。
Further, 16 is a NOR gate for controlling external output, 17 is an inverter for controlling external output, and 19 is a key-on wakeup interrupt input.

【0046】なお、上記Pチャネルトランジスタ13,
Nチャネルトランジスタ14,ナンドゲート15および
ノアゲート16は外部入出力端子3へ出力信号を切り換
える切換回路Xを構成している。
The P-channel transistor 13,
The N-channel transistor 14, the NAND gate 15 and the NOR gate 16 form a switching circuit X that switches an output signal to the external input / output terminal 3.

【0047】また、20はキーオンウェイクアップ自動
設定用レジスタ、21はプルアップトランジスタ11を
制御するためのノアゲート、22はクロック信号制御用
レジスタ、23はキーオンウェイクアップ自動設定用レ
ジスタ20の内容の反転信号を出力するインバータであ
る。
Reference numeral 20 is a key-on wakeup automatic setting register, 21 is a NOR gate for controlling the pull-up transistor 11, 22 is a clock signal control register, and 23 is the inversion of the contents of the key-on wakeup automatic setting register 20. It is an inverter that outputs a signal.

【0048】また、プルアップトランジスタ11のオン
抵抗は数十kΩ、Pチャネルトランジスタ12のオン抵
抗はプルアップトランジスタ11に比べて十分に小さい
ものとする。ワンチップマイコンにおいて割り込みを有
効にしている場合に、キー入力による割り込み信号が有
効であるものとする。
The pull-up transistor 11 has an ON resistance of several tens of kΩ, and the P-channel transistor 12 has an ON resistance sufficiently smaller than that of the pull-up transistor 11. When the interrupt is enabled in the one-chip microcomputer, it is assumed that the interrupt signal by the key input is valid.

【0049】ここで、キーオンウェイクアップ自動設定
用レジスタ20に”1”が書き込まれる時、方向レジス
タ5には”0”が書き込まれ、クロック信号制御用レジ
スタ22にはクロック信号、発振子が停止するようなデ
ータが書き込まれ、割り込みを有効とするように設定さ
れているものとする。
Here, when "1" is written in the key-on wakeup automatic setting register 20, "0" is written in the direction register 5, and the clock signal and the oscillator are stopped in the clock signal control register 22. It is assumed that such data is written and the interrupt is set to be valid.

【0050】次に動作について説明する。上記従来例と
異なる動作以外の動作については従来例と同じ動作であ
るので、その重複する説明を省略する。
Next, the operation will be described. The operation other than the operation different from the above-mentioned conventional example is the same as that of the conventional example, and thus the duplicate description thereof will be omitted.

【0051】この実施例ではキーオンウェイクアップ自
動設定用レジスタ20に”1”を書き込むことにより、
プルアップトランジスタ11はオン状態となると同時
に、方向レジスタ5には”0”が書き込まれるため、P
チャンネルトランジスタ12がオン状態となり、プルア
ップが有効状態となる。
In this embodiment, by writing "1" in the key-on wakeup automatic setting register 20,
At the same time that the pull-up transistor 11 is turned on, "0" is written in the direction register 5, so that P
The channel transistor 12 is turned on and the pull-up is enabled.

【0052】また、クロック信号制御用レジスタ22へ
クロック信号および発振子停止のためのデータの書き込
みにより、発振子が停止し、クロック信号が停止する。
さらに、割り込みを有効とするため、キー入力により、
外部入出力端子3にプルアップトランジスタ11が出力
する”H”レベルに打ち勝つ”L”レベルが入力される
と、シュミット回路(10)を介してキーオンウェイク
アップ割り込み入力としての割り込み信号19の”L”
が出力される。
Further, by writing the clock signal and the data for stopping the oscillator to the clock signal control register 22, the oscillator is stopped and the clock signal is stopped.
Furthermore, in order to enable the interrupt, by key input,
When the "L" level that overcomes the "H" level output by the pull-up transistor 11 is input to the external input / output terminal 3, the "L" level of the interrupt signal 19 as the key-on wakeup interrupt input is input via the Schmitt circuit (10). ”
Is output.

【0053】このとき割り込みが発生し、データバスへ
の出力信号は無効となる。さらに、割り込み処理が終了
すると、自動的にキーオンウェイクアップ自動設定用レ
ジスタ20には”0”が書き込まれる。この実施例で
は、方向レジスタ5,プルレジスタ7の設定および割り
込み許可を行った上に、キーオンウェイクアップ自動設
定用レジスタ20にデータを書き込むと、自動的にスト
ップ状態となる。
At this time, an interrupt occurs and the output signal to the data bus becomes invalid. Further, when the interrupt processing is completed, "0" is automatically written in the key-on wakeup automatic setting register 20. In this embodiment, when data is written to the key-on wakeup automatic setting register 20 after the direction register 5 and pull register 7 are set and interrupts are enabled, the stop state is automatically set.

【0054】なお、この実施例では方向レジスタ5を有
したポートについて示したが、方向レジスタのない入力
専用ポートの場合でも、効果は小さいが同様の効果は得
られる。また、上記回路より出力を制御する回路である
方向レジスタ5,ポートラッチ6および切換回路Xを除
いた入力専用端子についても、同様の効果が得られる。
Although the port having the direction register 5 is shown in this embodiment, the same effect can be obtained even in the case of an input-only port having no direction register although the effect is small. Further, the same effect can be obtained with respect to the input-only terminals excluding the direction register 5, the port latch 6, and the switching circuit X, which are circuits for controlling the output from the above circuit.

【0055】実施例2.図2はキーオンウェイクアップ
自動設定用レジスタ20の内容を示している。ここで、
キーオンウェイクアップ自動設定用レジスタ20Aは図
1におけるキーオンウェイクアップ自動設定用レジスタ
20に相当するものである。このキーオンウェイクアッ
プ自動設定用レジスタ20Aでは、0ビット目に”1”
が書き込まれると、図1における方向レジスタ5には”
0”が書き込まれ、割り込みを有効にするとともに、図
1におけるクロック信号制御用レジスタ22へ発振子が
停止するようなデータや、クロック信号が停止するよう
なデータが書き込まれる。この結果、キーオンウェイク
アップ自動設定用レジスタ20Aの0ビット目に書き込
むことにより、実施例1と同様の効果が得られる。ま
た、割り込み処理が終了すると、自動的にキーオンウェ
イクアップ自動設定用レジスタ20Aの0ビット目に
は”0”が書き込まれる。すなわち、発振制御をウエイ
ト状態,ストップ状態,現状のままの3状態のいずれか
にするかを、キーオンウェイクアップ自動設定用レジス
タに書き込むデータにより決定する。
Example 2. FIG. 2 shows the contents of the key-on wakeup automatic setting register 20. here,
The key-on wakeup automatic setting register 20A corresponds to the key-on wakeup automatic setting register 20 in FIG. In this key-on wakeup automatic setting register 20A, "1" is set at the 0th bit.
Is written in the direction register 5 in FIG.
0 "is written to enable the interrupt, and data for stopping the oscillator and data for stopping the clock signal are written to the clock signal control register 22 in FIG. 1. As a result, the key-on wake By writing to the 0th bit of the automatic up setting register 20A, the same effect as that of the embodiment 1 is obtained, and when the interrupt processing is completed, the 0th bit of the automatic key-on wakeup automatic setting register 20A is automatically obtained. Is written with 0. That is, whether the oscillation control is to be in the wait state, the stop state, or the current state is determined by the data written in the key-on wakeup automatic setting register.

【0056】また、上記キーオンウェイクアップ自動設
定用レジスタ20の1ビット目に”1”を書き込むこと
により、図1における方向レジスタ5には”0”が書き
込まれ、割り込みを有効にするとともに、図1における
クロック信号制御用レジスタ22へ発振子が発振した状
態のデータ、クロック信号が停止するようなデータを書
き込む。
By writing "1" in the first bit of the key-on wakeup automatic setting register 20, "0" is written in the direction register 5 in FIG. 1 to enable the interrupt, and The data in which the oscillator oscillates and the data for stopping the clock signal are written in the clock signal control register 22 in 1.

【0057】この結果、ウェイト状態でキーオンウェイ
クアップを有効にする設定を設けることができる。さら
に、割り込み処理が終了すると、自動的にキーオンウェ
イクアップ自動設定用レジスタ20の1ビット目には”
0”が書き込まれるものとする。
As a result, it is possible to provide a setting for enabling the key-on wakeup in the wait state. Further, when the interrupt processing is completed, the first bit of the key-on wakeup automatic setting register 20 is automatically set to "
It is assumed that 0 "is written.

【0058】さらに、上記キーオンウェイクアップ自動
設定用レジスタの2ビット目に”1”を書き込むことに
より、図1における方向レジスタ5には”0”が書き込
まれ、割り込みを有効にするとともに、図1におけるク
ロック信号制御用レジスタ22にはデータを書き込まな
いものとする。
Further, by writing "1" in the second bit of the key-on wakeup automatic setting register, "0" is written in the direction register 5 in FIG. 1 to enable the interrupt, and Data is not written in the clock signal control register 22 in FIG.

【0059】この結果、キー入力による割り込みにより
データの処理を開始するようなプログラムに適用でき
る。また、割り込み処理が終了すると、自動的にキーオ
ンウェイクアップ自動設定用レジスタ20の2ビット目
には”0”が書き込まれる。
As a result, the present invention can be applied to a program in which data processing is started by interruption by key input. When the interrupt processing is completed, "0" is automatically written in the second bit of the key-on wakeup automatic setting register 20.

【0060】実施例3.図3はキーオンウェイクアップ
自動設定用レジスタの他の実施例を示す。このキーオン
ウェイクアップ自動設定用レジスタ20Bは図1におけ
るキーオンウェイクアップ自動設定用レジスタ20に相
当するものである。
Example 3. FIG. 3 shows another embodiment of the key-on wakeup automatic setting register. The key-on wakeup automatic setting register 20B corresponds to the key-on wakeup automatic setting register 20 in FIG.

【0061】この実施例においては、8ビットのI/O
がキーオンウェイクアップ用のポートに割り付けられて
いる。
In this embodiment, 8-bit I / O
Is assigned to the key-on wakeup port.

【0062】キーオンウェイクアップ自動設定用レジス
タ20Bの0ビット目に”1”を書き込むことにより、
上記キーオンウェイクアップ用のポートの8ビットすべ
ての方向レジスタ(各々1ビットは図1における方向レ
ジスタ5に相当する)に”0”を書き込み、割り込みを
有効にするように設定する。
By writing "1" to the 0th bit of the key-on wakeup automatic setting register 20B,
"0" is written to all the 8-bit direction registers of the key-on wakeup port (1 bit each corresponds to the direction register 5 in FIG. 1), and the interrupt is set to be valid.

【0063】また、割り込み処理が終了すると、自動的
にキーオンウェイクアップ自動設定用レジスタ20Bの
0ビット目には、”0”が書き込まれる。
When the interrupt process is completed, "0" is automatically written to the 0th bit of the key-on wakeup automatic setting register 20B.

【0064】また、キーオンウェイクアップ自動設定用
レジスタ20Bの1ビット目に”1”を書き込むことに
より、上記キーオンウェイクアップ用のポートの8ビッ
トのうち特定の4ビットの方向レジスタ(各々1ビット
は図1における方向レジスタ5に相当する)に”0”を
書き込み、割り込みを有効にするように設定する。
Further, by writing "1" to the first bit of the key-on wakeup automatic setting register 20B, a specific 4-bit direction register (each 1-bit is 1 bit) of the 8 bits of the key-on wakeup port. "0" is written in (corresponding to the direction register 5 in FIG. 1) to set the interrupt to be valid.

【0065】この場合、方向レジスタに”0”が書き込
まれない残り4ビットについては、何も影響を受けな
い。さらに、割り込み処理が終了すると、自動的にキー
オンウェイクアップ自動設定用レジスタ20Bの1ビッ
ト目には”0”が書き込まれる。
In this case, the remaining 4 bits for which "0" is not written in the direction register are not affected. Further, when the interrupt processing is completed, "0" is automatically written in the first bit of the key-on wakeup automatic setting register 20B.

【0066】さらに、キーオンウェイクアップ自動設定
用レジスタ20Bの2ビット目に”1”を書き込むこと
により、上記キーオンウェイクアップ用のポートの8ビ
ットのうち特定の2ビットの方向レジスタ(各々1ビッ
トは図1における方向レジスタ5に相当する)に”0”
を書き込み、割り込みを有効にするように設定する。
Further, by writing "1" to the second bit of the key-on wakeup automatic setting register 20B, a specific 2-bit direction register (each 1-bit is 1 bit) among the 8 bits of the key-on wakeup port. "0" in (corresponding to the direction register 5 in FIG. 1)
And set to enable interrupts.

【0067】この場合、方向レジスタに”0”が書き込
まれない残り6ビットについては、何も影響を受けない
ものとする。また、割り込み処理が終了すると、自動的
にキーオンウェイクアップ自動設定用レジスタ20Bの
2ビット目には”0”が書き込まれる。
In this case, the remaining 6 bits in which "0" is not written in the direction register are not affected. When the interrupt process is completed, "0" is automatically written in the second bit of the key-on wakeup automatic setting register 20B.

【0068】このように、キーオンウェイクアップ自動
設定用レジスタ20Bのある特定ビットに”1”を書き
込むことにより、キーオンウェイクアップ用ポートのう
ちの特定された複数ビット、または特定されたビットの
方向レジスタのみに”0”を書き込み、割り込みを有効
にするように設定することができる。
As described above, by writing "1" to a specific bit of the key-on wakeup automatic setting register 20B, the specified plural bits of the key-on wakeup port or the direction register of the specified bit. It is possible to write "0" only in that and enable the interrupt.

【0069】この場合、方向レジスタに”0”が書き込
まれない残りのビットについては、何も影響を受けない
ものとする。
In this case, the remaining bits for which "0" is not written in the direction register are not affected at all.

【0070】さらに、キーオンウェイクアップ用ポート
のうち特定された複数ビット、または特定されたビット
の方向レジスタのみに”0”を書き込み、割り込みを有
効にするようにするビットと、上記動作以外に図1にお
けるクロック信号制御用レジスタ22に発振子が停止す
るようなデータ,クロック信号を停止するようなデータ
を書き込むビット、および上記動作以外に図1における
クロック信号制御用レジスタ22に発振子が発信するよ
うなデータ,クロック信号を停止するようなデータを書
き込むビットを設けることにより、実施例2の効果も得
ることができる。
Further, a bit for writing "0" only in the direction register of the specified plural bits or the specified bit of the key-on wakeup port to enable the interrupt and the operation other than the above operation are shown. 1, the oscillator signal is sent to the clock signal control register 22 in FIG. 1 in addition to the above-described operation, and bits for writing data for stopping the oscillator in the clock signal control register 22. The effect of the second embodiment can be obtained by providing a bit for writing such data and data for stopping the clock signal.

【0071】また、割り込み処理が終了すると、自動的
にキーオンウェイクアップ自動設定用レジスタ20Bの
使用したビットには”0”が書き込まれる。このように
キーオンウェイクアップ自動設定用レジスタ20Bの特
定ビット”1”を書き込むことにより、特定のポートが
キーオンウェイクアップによる割り込みを受付可能な状
態にすることができる。
When the interrupt processing is completed, "0" is automatically written in the bit used in the key-on wakeup automatic setting register 20B. By thus writing the specific bit "1" of the key-on wakeup automatic setting register 20B, the specific port can be made ready to accept the interrupt due to the key-on wakeup.

【0072】実施例4.図4はキーオンウェイクアップ
自動設定用レジスタの他の実施例を示す。ここで、図4
(a)〜(c)に示される3つのキーオンウェイクアッ
プ自動設定用レジスタ20Cは図1におけるキーオンウ
ェイクアップ自動設定用レジスタ20の各々に相当する
ものである。
Example 4. FIG. 4 shows another embodiment of the key-on wakeup automatic setting register. Here, FIG.
The three key-on wakeup automatic setting registers 20C shown in (a) to (c) correspond to the respective key-on wakeup automatic setting registers 20 in FIG.

【0073】この実施例においては、8ビットのI/O
がキーオンウェイクアップ用のポートに割り付けられて
いる。
In this embodiment, 8-bit I / O
Is assigned to the key-on wakeup port.

【0074】各キーオンウェイクアップ自動設定用レジ
スタ20Cの各々ビットは各キーオンウェイクアップ用
ポートの各々のビットに対応しており、キーオンウェイ
クアップ自動設定用レジスタ20Cにデータを書き込む
ことにより、割り込みは有効になるものとする。
Each bit of each key-on wakeup automatic setting register 20C corresponds to each bit of each key-on wakeup port, and the interrupt is enabled by writing the data to the keyon wakeup automatic setting register 20C. Shall be

【0075】さらに、割り込み処理が終了すると、自動
的にキーオンウェイクアップ自動設定用レジスタ20C
の全てのビットには”0”が書き込まれる。
Further, when the interrupt processing is completed, the key-on wakeup automatic setting register 20C is automatically set.
"0" is written in all the bits of.

【0076】そして、このキーオンウェイクアップ自動
設定用レジスタ20Cを3バイト分設け、1バイト目の
レジスタに書き込めばキーオンウェイクアップが有効と
なる。2バイト目のレジスタに書き込めばキーオンウェ
イクアップが有効で、ストップ状態に設定され、3バイ
ト目のレジスタに書き込むことにより、キーオンウェイ
クアップが有効で、ウエイト状態に設定され、これによ
り、実施例2と同様の効果を得ることができる。
Then, the key-on wakeup automatic setting register 20C for 3 bytes is provided, and the key-on wakeup becomes effective if the first byte register is written. If the second byte register is written, the key-on wakeup is enabled and set to the stop state, and the third byte register is written, the key-on wakeup is enabled and set to the wait state. The same effect as can be obtained.

【0077】実施例5.図5はキーオンウェイクアップ
自動設定用レジスタの他の実施例を示す。このキーオン
ウェイクアップ自動設定用レジスタ20Dは図1におけ
るキーオンウェイクアップ自動設定用レジスタ20に相
当するものである。
Example 5. FIG. 5 shows another embodiment of the key-on wakeup automatic setting register. The key-on wakeup automatic setting register 20D corresponds to the key-on wakeup automatic setting register 20 in FIG.

【0078】この実施例においては、8ビットのI/O
が二組(それぞれポート1、ポート2とする)キーオン
ウェイクアップ用のポートに割り付けられている場合を
示す。
In this embodiment, 8-bit I / O
Is assigned to two groups (port 1 and port 2 respectively) for key-on wakeup.

【0079】キーオンウェイクアップ自動設定用レジス
タ20Dに”1(16進データ)”のデータを書き込む
ことにより、ポート1の下位4ビットがキーオンウェイ
クアップによる割り込みが受付可能に設定される。この
時、ポート1の下位4ビット以外のポートは、影響を受
けない。
By writing data "1 (hexadecimal data)" to the key-on wakeup automatic setting register 20D, the lower 4 bits of the port 1 are set to be able to accept the interrupt due to the key-on wakeup. At this time, ports other than the lower 4 bits of port 1 are not affected.

【0080】また、キーオンウェイクアップ自動設定用
レジスタ20Dに”2(16進データ)”のデータを書
き込むことにより、ポート1の全ビットがキーオンウェ
イクアップによる割り込みが受付可能に設定される。こ
の時、ポート2は影響を受けないものとする。
Further, by writing the data "2 (hexadecimal data)" to the key-on wakeup automatic setting register 20D, all the bits of port 1 are set to accept the interrupt due to the key-on wakeup. At this time, the port 2 is not affected.

【0081】キーオンウェイクアップ自動設定用レジス
タ20Dに”3(16進データ)”のデータを書き込む
ことにより、ポート1の全ビットとポート2の下位2ビ
ットがキーオンウェイクアップによる割り込みが受付可
能に設定される。この時、ポート2の3ビットから8ビ
ットは影響を受けない。
By writing "3 (hexadecimal data)" data in the key-on wakeup automatic setting register 20D, all the bits of port 1 and the lower 2 bits of port 2 are set to be able to accept the interrupt due to the key-on wakeup. To be done. At this time, 3 bits to 8 bits of the port 2 are not affected.

【0082】さらに、キーオンウェイクアップ自動設定
用レジスタ20Dに”4(16進データ)”のデータを
書き込むことにより、ポート1の全ビットとポート2の
下位4ビットがキーオンウェイクアップによる割り込み
が受付可能に設定される。この時、ポート2の上位4ビ
ットは影響を受けないものとする。
Furthermore, by writing data "4 (hexadecimal data)" to the key-on wakeup automatic setting register 20D, all bits of port 1 and lower 4 bits of port 2 can accept interrupts due to key-on wakeup. Is set to. At this time, the upper 4 bits of port 2 are not affected.

【0083】キーオンウェイクアップ自動設定用レジス
タ20Dに”5(16進データ)”のデータを書き込む
ことにより、ポート1の全ビットとポート2の下位6ビ
ットがキーオンウェイクアップによる割り込みが受付可
能に設定される。この時、ポート2の上位2ビットは影
響を受けないものとする。
By writing "5 (hexadecimal data)" to the key-on wakeup automatic setting register 20D, all bits of port 1 and the lower 6 bits of port 2 are set to accept interrupts by key-on wakeup. To be done. At this time, the upper 2 bits of port 2 are not affected.

【0084】キーオンウェイクアップ自動設定用レジス
タ20Dに”6(16進データ)”のデータを書き込む
ことにより、ポート1,ポート2の全ビットがキーオン
ウェイクアップによる割り込みが受付可能に設定され
る。
By writing data "6 (hexadecimal data)" to the key-on wakeup automatic setting register 20D, all the bits of port 1 and port 2 are set to be able to accept the interrupt due to the key-on wakeup.

【0085】また、上記キーオンウェイクアップ自動設
定用レジスタ20Dにデータを書き込むことにより割り
込みは有効になるものとする。さらに、割り込み処理が
終了すると自動的にキーオンウェイクアップ自動設定用
レジスタ20Dには”0(16進データ)”が書き込ま
れるものとする。
Further, it is assumed that the interrupt becomes valid by writing data in the key-on wakeup automatic setting register 20D. Furthermore, it is assumed that when the interrupt processing is completed, "0 (hexadecimal data)" is automatically written in the key-on wakeup automatic setting register 20D.

【0086】このようにキーオンウェイクアップに割り
付けられたポートが複数ある場合でも、キーオンウェイ
クアップ自動設定用レジスタ20Dに書き込むデータに
より、キーオンウェイクアップに使用する各ポートのビ
ットを容易に指定できるものである。
Even when there are a plurality of ports assigned to the key-on wakeup in this way, the bit of each port used for the key-on wakeup can be easily specified by the data written in the key-on wakeup automatic setting register 20D. is there.

【0087】[0087]

【発明の効果】以上のように、請求項1の発明によれ
ば、データの書き込みによりプルアップを有効にし、か
つ割り込みを有効とするキーオンウェイクアップ自動設
定用レジスタを設け、上記割り込みを有効とする際に、
クロック信号制御用レジスタに、クロック信号および発
振子停止のためのデータを書き込ませるように構成した
ので、キーオンウェイクアップを有効とするまでのプロ
グラムを容易化できるだけでなく、キーオンウェイクア
ップに割り付けられた各ポートを、キーオンウェイクア
ップの割り込み受付の設定をキーオンウェイクアップ自
動設定用レジスタにデータを書き込むだけで、容易に色
々な種類に設定できるものが得られる効果がある。
As described above, according to the invention of claim 1, the key-on wakeup automatic setting register for enabling the pull-up by writing the data and enabling the interrupt is provided, and the interrupt is enabled. When doing
Since the clock signal and the data for stopping the oscillator are written to the clock signal control register, not only the program until the key-on wakeup is enabled can be facilitated, but also the key-on wakeup is assigned. Each port can be easily set to various types simply by writing data to the key-on wakeup automatic setting register for setting the key-on wakeup interrupt acceptance.

【0088】請求項2の発明によれば、キーオンウェイ
クアップ自動設定用レジスタに書き込むデータにより、
発振制御において、クロック信号制御用レジスタに書き
込まれた発振子の停止,内部クロックのみの停止および
発振制御は現状維持を選択できるように構成したので、
少ないプログラム容量で、ウエイト状態でキーオンウェ
イクアップを有効に設定できるものが得られる効果があ
る。
According to the invention of claim 2, by the data written in the key-on wakeup automatic setting register,
In the oscillation control, the oscillator written in the clock signal control register, the internal clock only, and the oscillation control are configured so that the current state can be selected.
There is an effect that a key on wakeup can be effectively set in a wait state with a small program capacity.

【0089】請求項3の発明によれば、キーオンウェイ
クアップ自動設定用レジスタの各ビットに対応した入力
機能を有したポートがあり、上記キーオンウェイクアッ
プ自動設定用レジスタのビットにデータが書き込まれる
ことにより、キー入力による割り込みを受付可能にする
ためにポートを入力状態にし、プルアップ有効の設定を
上記データの書き込まれたビットに対応したポートのみ
に実施できるように構成したので、キーオンウェイクア
ップ自動設定用レジスタの特定ビットにデータを書き込
むことで、少ないプログラム容量で、特定のポートがキ
ーオンウェイクアップによる割り込みを受け付け可能に
できるものが得られる効果がある。
According to the invention of claim 3, there is a port having an input function corresponding to each bit of the key-on wakeup automatic setting register, and data is written to the bit of the key-on wakeup automatic setting register. In this way, the port is set to the input state so that the interrupt by key input can be accepted, and the pull-up enable setting can be executed only to the port corresponding to the bit written with the above data. By writing data to a specific bit of the setting register, there is an effect that a specific port can receive an interrupt due to a key-on wakeup with a small program capacity.

【0090】請求項4の発明によれば、キーオンウェイ
クアップ自動設定用レジスタの各ビットに対応した数ビ
ットを1グループ、あるいは1ビットをグループとする
入力機能を有したポートがあり、上記キーオンウェイク
アップ自動設定用レジスタのビットにデータが書き込ま
れることにより、キー入力による割り込みを受付可能に
するためにポートを入力状態にし、プルアップ有効の設
定を上記データの書き込まれたビットに対応したポート
のグループのみに実施できるように構成したので、各バ
イトのキーオンウェイクアップ自動設定用レジスタにそ
れぞれ書き込みを行うことで、少ないプログラム容量
で、それぞれキーオンウェイクアップを有効にし、スト
ップ状態を設定し、ウエイト状態を設定できるものが得
られる効果がある。
According to the invention of claim 4, there is a port having an input function of grouping several bits corresponding to each bit of the key-on wakeup automatic setting register, or a group having 1 bit, and the key-on wakeup is provided. When data is written to the bits of the automatic setup register, the port is set to the input state in order to accept the interrupt due to key input, and the pull-up enable setting is made for the port corresponding to the bit to which the data is written. Since it is configured so that it can be executed only for the group, by writing to the key-on wakeup automatic setting register of each byte individually, the key-on wakeup can be enabled, the stop state can be set, and the wait state can be set with a small program capacity. There is an effect that something that can set is obtained.

【0091】請求項5の発明によれば、ポートが機能的
に割り振られたポート群が複数であり、1グループ内の
複数のポートは必ず同一ポート群に設定し、上記キーオ
ンウェイクアップ自動設定用レジスタに書き込むデータ
により、上記グループに対してキー入力による割り込み
を受付可能にするためにポートを入力状態にし、プルア
ップ有効の設定を上記データの書き込まれたビットに対
応したポートのグループのみに実施できるように構成し
たので、キーオンウェイクアップに割り付けられたポー
トが複数ある場合でも、キーオンウェイクアップ自動設
定用レジスタに書き込むデータにより、少ないプログラ
ム容量で、キーオンウェイクアップに使用する各ポート
のビットを容易に指定できるものが得られる効果があ
る。
According to the fifth aspect of the present invention, there are a plurality of port groups to which ports are functionally assigned, and a plurality of ports within one group must be set to the same port group for the above key-on wakeup automatic setting. According to the data written to the register, the port is set to the input state so that the interrupt by key input can be accepted for the above group, and the pull-up enable setting is performed only for the group of ports corresponding to the bit to which the above data is written. Even if there are multiple ports assigned for key-on wakeup, the data written to the key-on wakeup automatic setting register can be used with a small program capacity and the bits of each port used for key-on wakeup can be easily configured. The effect that can be specified is obtained.

【図面の簡単な説明】[Brief description of drawings]

【図1】請求項1の発明の一実施例によるキーオンウェ
イクアップモード設定回路を示すブロック図である。
FIG. 1 is a block diagram showing a key-on wakeup mode setting circuit according to an embodiment of the present invention.

【図2】図1におけるキーオンウェイクアップ自動設定
用レジスタの一実施例を示す説明図である。
FIG. 2 is an explanatory diagram showing an embodiment of a key-on wakeup automatic setting register in FIG.

【図3】図1におけるキーオンウェイクアップ自動設定
用レジスタの他の実施例を示す説明図である。
FIG. 3 is an explanatory diagram showing another embodiment of the key-on wakeup automatic setting register in FIG.

【図4】図1におけるキーオンウェイクアップ自動設定
用レジスタの他の実施例を示す説明図である。
FIG. 4 is an explanatory diagram showing another embodiment of the key-on wakeup automatic setting register in FIG.

【図5】図1におけるキーオンウェイクアップ自動設定
用レジスタの他の実施例を示す説明図である。
5 is an explanatory diagram showing another embodiment of the key-on wakeup automatic setting register in FIG. 1. FIG.

【図6】従来のキーオンウェイクアップ機能回路を示す
ブロック図である。
FIG. 6 is a block diagram showing a conventional key-on wakeup function circuit.

【図7】複数のキー入力のうちいずれかのひとつのキー
入力による割り込みを行うためのキーオンウェイクアッ
プ機能回路を示すブロック図である。
FIG. 7 is a block diagram showing a key-on wakeup function circuit for performing an interrupt by any one of a plurality of key inputs.

【符号の説明】[Explanation of symbols]

3 外部入出力端子 4 データバス 5 レジスタ(方向レジスタ) 6 レジスタ(ポートラッチ) 7 レジスタ(プルレジスタ) 8 バッファ(第1のバッファ) 9 バッファ(第2のバッファ) 10 シュミット回路 11 プルアップトランジスタ 12 トランジスタ 20 キーオンウェイクアップ自動設定用レジスタ 22 クロック信号制御用レジスタ X 切換回路 3 External Input / Output Terminal 4 Data Bus 5 Register (Direction Register) 6 Register (Port Latch) 7 Register (Pull Register) 8 Buffer (First Buffer) 9 Buffer (Second Buffer) 10 Schmitt Circuit 11 Pull-up Transistor 12 Transistor 20 Key-on wakeup automatic setting register 22 Clock signal control register X switching circuit

【手続補正書】[Procedure amendment]

【提出日】平成6年3月23日[Submission date] March 23, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0025[Name of item to be corrected] 0025

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0025】[0025]

【発明が解決しようとする課題】従来のキーオンウェイ
クアップ機能回路は以上のように構成されているので、
キーオンウェイクアップを有効とするためには、キーオ
ンウェイクアップ機能を有したI/Oポートを入力状態
にし、プルアップトランジスタ11,Pチャンネルトラ
ンジスタ12を有効にした後に、ストップ状態、または
ウェイト状態に設定する必要があるため、プログラムに
は上記3つのことを実行するためにキーオンウェイクア
ップを有効とするためのプログラムにメモリを多く必要
とするなどの問題点があった。
Since the conventional key-on wakeup function circuit is configured as described above,
In order to enable the key-on wake-up, the I / O port having the key-on wake-up function is set to the input state, the pull-up transistor 11 and the P-channel transistor are connected.
Since it is necessary to set the stop state or the wait state after enabling the register 12, the program needs a large amount of memory for enabling the key-on wakeup in order to execute the above three things. There was a problem such as doing.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0049[Correction target item name] 0049

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0049】ここで、キーオンウェイクアップ自動設定
用レジスタ20に”1”が書き込まれる時、方向レジス
タ5には”0”が書き込まれ、クロック信号制御用レジ
スタ22にはクロック信号、発振子が停止するようなデ
ータが書き込まれ、割り込みを有効とするように設定さ
れているものとする。また、クロック信号、発振子を停
止させるとワンチップマイコンに割り込み、またはリセ
ットが入力されるまではワンチップマイコンの動作が停
止してしまうため、上記一連の動作のうち、クロック信
号を停止させるようなデータの書き込みは最後に行われ
るものとする。
Here, when "1" is written in the key-on wakeup automatic setting register 20, "0" is written in the direction register 5, and the clock signal and the oscillator are stopped in the clock signal control register 22. It is assumed that such data is written and the interrupt is set to be valid. Also, stop the clock signal and oscillator.
When stopped, the one-chip microcomputer is interrupted or reset.
The operation of the one-chip microcomputer is stopped until
Of the above series of operations, the clock signal
Data is written last to stop the
Shall be.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0056[Correction target item name] 0056

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0056】また、実施例1と同様にウェイト状態、ス
トップ状態にするためのデータの書き込みは、キーオン
ウェイクアップを有効にするまでの一連の動作の最後に
行われるものとする。また、上記キーオンウェイクアッ
プ自動設定用レジスタ20の1ビット目に”1”を書き
込むことにより、図1における方向レジスタ5には”
0”が書き込まれ、割り込みを有効にするとともに、図
1におけるクロック信号制御用レジスタ22へ発振子が
発振した状態のデータ、クロック信号が停止するような
データを書き込む。
Further , as in the first embodiment, the wait state and
Key on to write data to get to the top state
At the end of the series of operations until wakeup is enabled
Shall be performed. Further, by writing "1" to the first bit of the key-on wakeup automatic setting register 20, "1" is written in the direction register 5 in FIG.
"0" is written to enable the interrupt, and the clock signal control register 22 shown in FIG. 1 is written with data in which the oscillator oscillates and data with which the clock signal is stopped.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 外部入出力端子の入出力状態を設定する
方向レジスタまたは入力専用ポートと、上記外部入出力
端子をプルアップさせるプルアップトランジスタと、該
プルアップトランジスタを制御するプルレジスタと、上
記入出力端子の入力時に上記プルアップを有効にするト
ランジスタと、上記方向レジスタおよびデータを格納す
るポートラッチの状態に応じて上記外部入出力端子へ”
L”または”H”レベルの信号を出力する切換回路と、
上記ポートラッチの内容をデータバスへ出力する第1の
バッファと、入力状態のとき上記外部入出力端子からの
入力データをデータバスへ出力する第2のバッファと、
割り込みが有効のとき上記外部入出力端子に上記プルア
ップトランジスタの出力に打ち勝つレベルの信号が入力
された際に上記入出力端子からの入力データの上記デー
タバスへの出力を無効にする割り込み入力を発生するシ
ュミット回路と、データの書き込みにより上記プルアッ
プを有効にしかつ上記割り込みを有効とするキーオンウ
ェイクアップ自動設定用レジスタと、上記割り込みを有
効とする際にクロック信号および発振子停止のためのデ
ータを書き込むクロック信号制御用レジスタとを備えた
キーオンウェイクアップモード設定回路。
1. A direction register or an input-only port for setting an input / output state of an external input / output terminal, a pull-up transistor for pulling up the external input / output terminal, and a pull register for controlling the pull-up transistor. To the external input / output terminal depending on the state of the transistor that enables the pull-up when inputting the write output terminal and the direction register and the port latch that stores the data.
A switching circuit that outputs an L "or" H "level signal;
A first buffer that outputs the contents of the port latch to the data bus; and a second buffer that outputs the input data from the external input / output terminal to the data bus when in the input state,
When an interrupt is enabled, an interrupt input that disables output of input data from the input / output terminal to the data bus when a signal of a level that overcomes the output of the pull-up transistor is input to the external input / output terminal A Schmitt circuit that occurs, a register for key-on wakeup automatic setting that enables the pull-up by writing data and enables the interrupt, and a clock signal and data for stopping the oscillator when enabling the interrupt. A key-on wake-up mode setting circuit having a clock signal control register for writing.
【請求項2】 キーオンウェイクアップ自動設定用レジ
スタに書き込むデータにより、発振制御においてクロッ
ク信号制御用レジスタに書き込まれた発振子の停止,内
部クロックのみの停止および発振制御は現状維持を選択
可能とした請求項1記載のキーオンウェイクアップモー
ド設定回路。
2. With the data written in the key-on wakeup automatic setting register, in the oscillation control, the stop of the oscillator written in the clock signal control register, the stop of only the internal clock, and the oscillation control can be selected to maintain the current state. The key-on wakeup mode setting circuit according to claim 1.
【請求項3】 キーオンウェイクアップ自動設定用レジ
スタの各ビットに対応した入力機能を有したポートがあ
り、上記キーオンウェイクアップ自動設定用レジスタの
ビットにデータが書き込まれることによりキー入力によ
る割り込みを受付可能にするためにポートを入力状態に
しプルアップ有効の設定を上記データの書き込まれたビ
ットに対応したポートのみに可能とする請求項1に記載
のキーオンウェイクアップモード設定回路。
3. A port having an input function corresponding to each bit of the key-on wakeup automatic setting register is provided, and an interrupt due to a key input is accepted by writing data in the bit of the key-on wakeup automatic setting register. 2. The key-on wake-up mode setting circuit according to claim 1, wherein the port is set to an input state to enable the pull-up enable only for the port corresponding to the written bit of the data.
【請求項4】 キーオンウェイクアップ自動設定用レジ
スタの各ビットに対応した数ビットを1グループ,ある
いは1ビットをグループとする入力機能を有したポート
があり、上記キーオンウェイクアップ自動設定用レジス
タのビットにデータが書き込まれることによりキー入力
による割り込みを受付可能にするためにポートを入力状
態にしプルアップ有効の設定を上記データの書き込まれ
たビットに対応したポートのグループのみに可能とした
請求項1記載のキーオンウェイクアップモード設定回
路。
4. A key-on wakeup automatic setting register has a port having an input function of grouping several bits corresponding to each bit of the key-on wakeup automatic setting register, or 1 bit as a group. The port is set to an input state so that an interrupt due to a key input can be accepted by writing data to the port, and pull-up enable setting can be performed only to a group of ports corresponding to the bit in which the data is written. Key-on wake-up mode setting circuit described.
【請求項5】 ポートが機能的に割り振られたポート群
が複数あり、1グループ内の複数のポートは必ず同一ポ
ート群に設定し上記キーオンウェイクアップ自動設定用
レジスタに書き込むデータにより上記グループに対して
キー入力による割り込みを受付可能にするためにポート
を入力状態にしプルアップ有効の設定を上記データの書
き込まれたビットに対応したポートのグループのみに可
能とした請求項1記載のキーオンウェイクアップモード
設定回路。
5. A plurality of port groups to which ports are functionally allocated are provided, and a plurality of ports in one group are set to the same port group without fail, and the data is written to the key-on wakeup automatic setting register for the group. 2. The key-on wake-up mode according to claim 1, wherein a port is set to an input state so that an interrupt due to a key input can be accepted, and pull-up enable setting is possible only for a group of ports corresponding to the bit in which the data is written. Setting circuit.
JP5235212A 1993-09-21 1993-09-21 Key-on wakeup mode setting circuit Pending JPH0793281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5235212A JPH0793281A (en) 1993-09-21 1993-09-21 Key-on wakeup mode setting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5235212A JPH0793281A (en) 1993-09-21 1993-09-21 Key-on wakeup mode setting circuit

Publications (1)

Publication Number Publication Date
JPH0793281A true JPH0793281A (en) 1995-04-07

Family

ID=16982747

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5235212A Pending JPH0793281A (en) 1993-09-21 1993-09-21 Key-on wakeup mode setting circuit

Country Status (1)

Country Link
JP (1) JPH0793281A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000216342A (en) * 1999-01-21 2000-08-04 Mitsubishi Electric Corp Integrated circuit chip and processing method for unused pad

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000216342A (en) * 1999-01-21 2000-08-04 Mitsubishi Electric Corp Integrated circuit chip and processing method for unused pad

Similar Documents

Publication Publication Date Title
US5511207A (en) Program control circuit determining the designated number of times a sequence of instructions is repetitively executed to prevent further execution of a jump instruction
KR880000337B1 (en) Information processing apparatus
JPH0744265A (en) Pipeline processing circuit
US4218750A (en) Incrementer with common precharge enable and carry-in signal
US5731738A (en) Method and mechanism of weak pull-up for use with a microcontroller in an integrated circuit
JPH0218498B2 (en)
JPH08227326A (en) Microcomputer
US5767694A (en) Information processing apparatus with a mode setting circuit
US4641278A (en) Memory device with a register interchange function
JPH0764957A (en) Timer device
US4897807A (en) Switch data input device
JPH0793281A (en) Key-on wakeup mode setting circuit
JPH0944467A (en) Microcomputer
EP0403047B1 (en) A frequency divider circuit
US4780807A (en) Pipeline processor with overlapped fetch and execute cycles
US20050235069A1 (en) Microcontroller
JP2544027B2 (en) Low power consumption programmable logic array and information processing apparatus using the same
US4771405A (en) Hidden control bits in a control register
KR19980027922A (en) Multiple test mode setting method and device accordingly
KR930005648B1 (en) Input switching circuit
KR960003402B1 (en) Semiconductor memory device
US7058842B2 (en) Microcontroller with multiple function blocks and clock signal control
JPH0254617A (en) Input/output buffer circuit
JP3310482B2 (en) Microcomputer
JPH07182267A (en) Output control circuit