JP2008152621A - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP2008152621A
JP2008152621A JP2006341177A JP2006341177A JP2008152621A JP 2008152621 A JP2008152621 A JP 2008152621A JP 2006341177 A JP2006341177 A JP 2006341177A JP 2006341177 A JP2006341177 A JP 2006341177A JP 2008152621 A JP2008152621 A JP 2008152621A
Authority
JP
Japan
Prior art keywords
signal
microcomputer
mode
level
reset
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
JP2006341177A
Other languages
Japanese (ja)
Inventor
Tsuyoshi Fujino
剛志 藤野
Shinichi Noda
真一 野田
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2006341177A priority Critical patent/JP2008152621A/en
Publication of JP2008152621A publication Critical patent/JP2008152621A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer, capable or eliminating noise without addition of a noise countermeasure element while reducing terminals for performing selective switching of operation modes as much as possible. <P>SOLUTION: In the microcomputer 11, a decode logic part 17 performs decoding operation according to a state change of an externally inputted rest signal, and output decode signals x-z. Concretely, the logic part decodes a designated operation mode according to the voltage level of the reset signal RV. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、複数の動作モードで起動可能に構成されるマイクロコンピュータに関する。   The present invention relates to a microcomputer configured to be bootable in a plurality of operation modes.

マイクロコンピュータについては、チップサイズ又はパッケージサイズの小型化を図るために、外部端子数を削減することが常に要求されている。また、マイクロコンピュータには、リセットが解除された場合に、例えば通常の動作モードと機能テスト用の動作モード等とが切換可能となるように、即ち、対応する動作プログラムを実行し分けて起動するように構成されているものがある(例えば、特許文献1参照)。
特開2004−78996号公報
For microcomputers, it is always required to reduce the number of external terminals in order to reduce the chip size or package size. In addition, when the reset is released, the microcomputer can be switched, for example, between a normal operation mode and a function test operation mode, that is, by executing the corresponding operation program and starting up separately. (For example, refer patent document 1).
JP 2004-78996 A

その場合、外部より指定した動作モードをマイクロコンピュータに参照させるため、例えば図8に示すように、動作モードを設定するための外部端子1〜3(MD0,MD1,MD2)を複数設ける必要があり、チップやパッケージサイズの小型化を図る上で制約があった。図8の場合、動作モードを0〜7の8種類に切換えるため、3ビットの設定データが必要となっている。   In that case, in order to make the microcomputer refer to the operation mode designated from the outside, it is necessary to provide a plurality of external terminals 1 to 3 (MD0, MD1, MD2) for setting the operation mode, for example, as shown in FIG. There were limitations in reducing the chip and package size. In the case of FIG. 8, in order to switch the operation mode to 8 types of 0 to 7, 3-bit setting data is required.

また、例えば、車両のようにノイズが発生し易い環境下でマイコンが動作する場合は、図9に示すように、マイコンの外部端子(一例としてリセット端子)にノイズが印加されて誤動作するおそれがある。その対策として、外部端子にコンデンサ4や抵抗5などの素子を追加したり(図10参照)、或いはICの内部でフィルタ回路を構成するなどの必要があった。   Also, for example, when the microcomputer operates in an environment where noise is likely to occur as in a vehicle, as shown in FIG. is there. As countermeasures, it is necessary to add an element such as a capacitor 4 or a resistor 5 to the external terminal (see FIG. 10), or to configure a filter circuit inside the IC.

本発明は上記事情に鑑みてなされたものであり、その目的は、動作モードの選択切換えを行なうための端子を極力削減すると共に、ノイズ対策用の素子を追加せずともノイズを排除できるマイクロコンピュータを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to reduce the number of terminals for selecting and switching operation modes as much as possible, and to eliminate noise without adding a noise countermeasure element. Is to provide.

請求項1記載のマイクロコンピュータによれば、デコーダは、入力されるモード設定信号の状態変化に応じてデコード動作を行ない、モード信号を出力する。従って、外部よりモード設定信号を入力するための端子を1つだけにしても、信号の状態変化により異なる動作モードを指定することができる。また、上記の端子(モード設定端子)にノイズが印加された場合でも、ノイズとして想定される信号の変化についてはデコードを行わないように設定すれば、ノイズを排除(マスク)することが可能となる。   According to the microcomputer of the first aspect, the decoder performs a decoding operation according to a change in the state of the input mode setting signal and outputs a mode signal. Therefore, even if there is only one terminal for inputting the mode setting signal from the outside, different operation modes can be designated by changing the state of the signal. Further, even when noise is applied to the above terminal (mode setting terminal), it is possible to eliminate (mask) the noise by setting so as not to decode the change of the signal assumed as noise. Become.

請求項2記載のマイクロコンピュータによれば、デコーダは、モード設定信号の電圧レベルに応じて指定されたモードをデコードするので、モード設定信号をマルチレベルで変化させることで、異なる動作モードを指定して起動させることができる。また、例えば、モード設定端子における電圧レベルの変化が比較的小さい場合はデコード動作を行なわないように設定すれば、そのような信号変化をノイズとして排除することができる。   According to the microcomputer of the second aspect, since the decoder decodes the designated mode in accordance with the voltage level of the mode setting signal, different operation modes are designated by changing the mode setting signal in multiple levels. Can be activated. Further, for example, if the setting is made such that the decoding operation is not performed when the change in the voltage level at the mode setting terminal is relatively small, such a signal change can be eliminated as noise.

請求項3記載のマイクロコンピュータによれば、デコーダは、モード設定信号のレベルが遷移している期間の長さに応じて指定されたモードをデコードするので、信号のレベル遷移期間を変化させることで、異なる動作モードを指定して起動させることができる。また、例えば、レベル遷移期間が比較的短い場合はデコード動作を行なわないように設定すれば、そのような信号変化をノイズとして排除することができる。   According to the microcomputer of the third aspect, since the decoder decodes the designated mode according to the length of the period during which the level of the mode setting signal is transitioned, the signal level transition period can be changed. It is possible to start by specifying different operation modes. For example, when the level transition period is relatively short, if it is set not to perform the decoding operation, such a signal change can be eliminated as noise.

請求項4記載のマイクロコンピュータによれば、デコーダは、モード設定信号のレベルが変化する回数に応じて指定されたモードをデコードするので、信号のレベル変化回数を変化させることで、異なる動作モードを指定して起動させることができる。また、例えば、レベル変化回数が比較的少ない場合はデコード動作を行なわないように設定すれば、そのような信号変化をノイズとして排除することができる。   According to the microcomputer of the fourth aspect, the decoder decodes the designated mode in accordance with the number of times that the level of the mode setting signal changes, so that different operation modes can be obtained by changing the number of signal level changes. You can start by specifying. Also, for example, if it is set not to perform the decoding operation when the number of level changes is relatively small, such a signal change can be eliminated as noise.

請求項5記載のマイクロコンピュータによれば、モード設定信号をリセット信号と共通化する。即ち、モード設定信号の状態変化が特定の条件で変化した場合に、マイコンの内部においてリセット信号を発生させるように構成すれば、双方の信号を共通化することができる。従って、モード設定端子を独立に設ける必要がなく、マイコンの端子数を更に削減することができる。   According to the microcomputer of the fifth aspect, the mode setting signal is shared with the reset signal. That is, when the state change of the mode setting signal changes under a specific condition, if the reset signal is generated inside the microcomputer, both signals can be shared. Therefore, it is not necessary to provide mode setting terminals independently, and the number of terminals of the microcomputer can be further reduced.

(第1実施例)
以下、本発明の第1実施例について図1乃至図3を参照して説明する。図1は、マイクロコンピュータ11の構成を、本発明の要旨にかかる部分のみ示すものである。マイコン11は、CPU12や、このCPU12によって実行される制御プログラムやテストプログラムなどが記憶されているROM13などを備えている。マイコン11は、リセットが解除されてCPU12が起動すると、外部より設定される動作モードに応じてCPU12がROM13の異なるアドレスにアクセスすることで、複数の動作モードで起動することが可能となっている。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. FIG. 1 shows only the portion of the configuration of the microcomputer 11 according to the gist of the present invention. The microcomputer 11 includes a CPU 12 and a ROM 13 in which a control program and a test program executed by the CPU 12 are stored. When the reset is released and the CPU 12 is activated, the microcomputer 12 can be activated in a plurality of operation modes by accessing different addresses of the ROM 13 according to the operation mode set from the outside. .

そして、本実施例では、外部より上記動作モードを設定するための端子(モード設定端子)が、リセット端子14と共通に設定されている。そのリセット端子14は、マイコン11の内部において、4つのコンパレータ15a〜15dの(+)端子に共通に接続されている。また、マイコン11の動作用電源VCCとグランドとの間には、4つの抵抗素子16a〜16eの直列回路が接続されており、それらのうち、抵抗素子16a及び16b,16b及び16c,16c及び16d,16d及び16eの各共通接続点は、コンパレータ15a〜15dの(−)端子に夫々接続されている。尚、上記各共通接続点における分圧電位を夫々Va,Vb,Vc,Vdとする。   In this embodiment, a terminal (mode setting terminal) for setting the operation mode from the outside is set in common with the reset terminal 14. The reset terminal 14 is commonly connected to the (+) terminals of the four comparators 15 a to 15 d in the microcomputer 11. Further, a series circuit of four resistance elements 16a to 16e is connected between the operating power supply VCC of the microcomputer 11 and the ground, and among these, the resistance elements 16a and 16b, 16b and 16c, 16c and 16d are connected. , 16d and 16e are connected to the (−) terminals of the comparators 15a to 15d, respectively. The divided potentials at the common connection points are Va, Vb, Vc, and Vd, respectively.

コンパレータ15a〜15dの各出力端子は、デコードロジック部17の各入力端子と、4入力負論理ORゲート18の各入力端子とに夫々接続されている。ORゲート18は、CPU12や、その他の周辺回路に負論理のリセット信号を出力する。デコードロジック部17は、各コンパレータ15a〜15dの出力レベルの変化に応じてマイコン11の動作モードをデコードし、そのデコード結果をモードレジスタ19を介してCPU12に出力する。モードレジスタ19の出力側はCPU12のデータバスに接続されており、CPU12は、リセットが解除されるとモードレジスタ19を読み出して、設定されたモードに応じてROM13にアクセスする。尚、以上の構成において、コンパレータ15,抵抗素子16及びデコードロジック部17が、デコーダ20を構成している。   The output terminals of the comparators 15a to 15d are connected to the input terminals of the decode logic unit 17 and the input terminals of the 4-input negative logic OR gate 18, respectively. The OR gate 18 outputs a negative logic reset signal to the CPU 12 and other peripheral circuits. The decode logic unit 17 decodes the operation mode of the microcomputer 11 according to the change in the output level of each of the comparators 15 a to 15 d and outputs the decoding result to the CPU 12 via the mode register 19. The output side of the mode register 19 is connected to the data bus of the CPU 12, and when the reset is released, the CPU 12 reads the mode register 19 and accesses the ROM 13 according to the set mode. In the above configuration, the comparator 15, the resistance element 16, and the decode logic unit 17 constitute the decoder 20.

図2は、デコードロジック部17の内部構成を示すものである。デコードロジック部17は、立下りエッジ検出部21,立上がりエッジ検出部22,データ保持部23,NOTゲート24a〜24c,ANDゲート25x〜25zで構成されている。立下りエッジ検出部21には、コンパレータ15aの出力信号が与えられており、立下りエッジ検出部21は、前記出力信号レベルの立下がりエッジを検出すると、データ保持部23にクリア信号CLRを出力するように構成されている。   FIG. 2 shows the internal configuration of the decode logic unit 17. The decode logic unit 17 includes a falling edge detection unit 21, a rising edge detection unit 22, a data holding unit 23, NOT gates 24a to 24c, and AND gates 25x to 25z. The falling edge detection unit 21 is supplied with the output signal of the comparator 15a. When the falling edge detection unit 21 detects the falling edge of the output signal level, it outputs a clear signal CLR to the data holding unit 23. Is configured to do.

立上がりエッジ検出部22には、コンパレータ15a〜15dの出力信号a〜dが与えられており、立上りエッジ検出部22は、上記各出力信号a〜dの立上がりエッジを検出すると、データ保持部23にイネーブル信号を出力するように構成されている。データ保持部23は、出力信号a〜dに対応するデータa’〜d’を出力する。出力信号a〜d,データa’〜d’は何れも初期状態がハイレベルを示しており、データ保持部23は、立上りエッジ検出部22よりイネーブル信号が与えられると、対応するデータa’〜d’をロウレベルに変化させてその状態を保持するように構成されている。
データ保持部23からの出力データa’〜d’は、NOTゲート24a〜24c,4入力ANDゲート25x〜25zの各入力端子に適宜与えられており、ANDゲート25x〜25zは、図2に示す論理に応じてデコード信号x〜zを出力するようになっている。
The rising edge detector 22 is supplied with the output signals a to d of the comparators 15a to 15d. When the rising edge detector 22 detects the rising edge of each of the output signals a to d, the data holding unit 23 receives the signal. An enable signal is output. The data holding unit 23 outputs data a ′ to d ′ corresponding to the output signals a to d. The output signals a to d and the data a ′ to d ′ all show a high level in the initial state, and the data holding unit 23 receives the enable signal from the rising edge detection unit 22 and the corresponding data a ′ to d. It is configured so that d ′ is changed to a low level and the state is maintained.
Output data a ′ to d ′ from the data holding unit 23 are appropriately given to the input terminals of NOT gates 24a to 24c and 4-input AND gates 25x to 25z, and the AND gates 25x to 25z are shown in FIG. The decode signals x to z are output according to the logic.

次に、本実施例の作用について図3も参照して説明する。図3は、マイコン11のリセット端子14に対して外部より与えられるリセット信号(ロウアクティブ,モード設定信号)のレベル変化に応じて、マイコン11の動作モードが決定される状態を示すタイミングチャートである。リセット信号がインアクティブであり、電源電圧VCCと略同じレベルである場合、4つのコンパレータ15a〜15dの出力信号a〜dは何れもハイレベルを示している。ここで、リセット信号VRのレベルがVa<VR<VCCの範囲(不感帯)で変化しても、コンパレータ15a〜15dの出力信号a〜dのレベルは変化しない。従って、そのようなレベル変化を示すノイズがリセット端子14に印加されたとしても、内部リセット信号はアクティブとならずノイズの影響は排除される。   Next, the operation of the present embodiment will be described with reference to FIG. FIG. 3 is a timing chart showing a state in which the operation mode of the microcomputer 11 is determined according to the level change of the reset signal (low active, mode setting signal) externally applied to the reset terminal 14 of the microcomputer 11. . When the reset signal is inactive and is at substantially the same level as the power supply voltage VCC, the output signals a to d of the four comparators 15a to 15d are all at a high level. Here, even if the level of the reset signal VR changes within the range of Va <VR <VCC (dead zone), the levels of the output signals a to d of the comparators 15a to 15d do not change. Therefore, even if noise indicating such a level change is applied to the reset terminal 14, the internal reset signal is not active and the influence of noise is eliminated.

そして、外部よりマイコン11の動作モードを切換えて起動させる場合は、リセット信号VRのレベルを分圧電位Va未満とするように変化させる。リセット信号VRのレベル変化に応じた、出力信号a〜dのレベル変化並びにデコード信号x〜z,マイコン11の動作モードの関係は、以下のようになっている。
リセット信号 コンパレータ出力信号 デコード信号 動作モード
a b c d x y z
Vb<VR<Va L H H H H L L 0
Vc<VR≦Vb L L H H H H L 1
Vd<VR≦Vc L L L H H H H 2
0<VR<Vd L L L L × × × ×
When the operation mode of the microcomputer 11 is switched and started from the outside, the level of the reset signal VR is changed to be less than the divided potential Va. The relationship between the level change of the output signals a to d and the decode signals x to z and the operation mode of the microcomputer 11 according to the level change of the reset signal VR is as follows.
Reset signal Comparator output signal Decode signal Operation mode
a b c d x y z
Vb <VR <Va L H H H H L L 0
Vc <VR ≦ Vb L L H H H H L 1
Vd <VR ≦ Vc L L L H H H H 2
0 <VR <Vd L L L L L × × × ×

また、マイコン11の内部リセット信号は出力信号a〜dの論理和で与えられるので、出力信号a〜dの何れか1つ以上がロウレベルからハイレベルに変化すれば、内部リセットは解除される。すると、CPU12は、モードレジスタ19を介して設定された動作モード(デコード信号x〜z)を読み出し、設定されたモードに応じてROM13内の対応するプログラムの先頭番地に分岐する。
尚、外部より与えるリセット信号のロウレベル遷移期間は、マイコン11をリセットするのに十分な時間となるように設定する。また、リセット信号のレベルが分圧電位Vdを下回ったケースについてもデコードするためのハードウエアを追加して、動作モード「3」を割り当てても良い。
Further, since the internal reset signal of the microcomputer 11 is given by the logical sum of the output signals a to d, the internal reset is canceled if any one or more of the output signals a to d change from the low level to the high level. Then, the CPU 12 reads the operation mode (decode signals x to z) set via the mode register 19 and branches to the start address of the corresponding program in the ROM 13 according to the set mode.
Note that the low level transition period of the reset signal given from the outside is set to be a sufficient time to reset the microcomputer 11. Also, the operation mode “3” may be assigned by adding hardware for decoding the case where the level of the reset signal is lower than the divided potential Vd.

以上のように本実施例によれば、マイコン11のデコーダ20は、外部より入力されるリセット信号の状態変化に応じてデコード動作を行ない、デコード信号x〜zを出力する。具体的には、リセット信号VRの電圧レベルに応じて指定された動作モードをデコードするので、リセット信号VRをマルチレベルで変化させて、異なる動作モードを指定してマイコン11を起動させることができる。また、デコーダ20は、リセット信号VRの電圧レベルが分圧電位Vaを下回らない範囲で変化した場合はデコード動作を行なわないので、そのような信号変化をノイズとして排除することができる。そして、外部よりモード設定信号を入力するための端子を1つだけにしても、信号の状態変化により異なる動作モードを指定することができる。   As described above, according to the present embodiment, the decoder 20 of the microcomputer 11 performs a decoding operation in accordance with a change in the state of a reset signal input from the outside, and outputs decoded signals x to z. Specifically, since the operation mode designated according to the voltage level of the reset signal VR is decoded, the microcomputer 11 can be activated by designating a different operation mode by changing the reset signal VR at multiple levels. . Further, since the decoder 20 does not perform the decoding operation when the voltage level of the reset signal VR changes within a range not lower than the divided potential Va, such a signal change can be eliminated as noise. Even if there is only one terminal for inputting a mode setting signal from the outside, different operation modes can be designated depending on the signal state change.

加えて、本実施例によれば、モード設定信号をリセット信号と共通化して、リセット端子14に与える信号の変化によって動作モードを指定するので、モード設定端子を独立に設ける必要がなく、マイコン11の端子数を更に削減することができる。   In addition, according to the present embodiment, the mode setting signal is made common with the reset signal, and the operation mode is designated by the change of the signal applied to the reset terminal 14, so that it is not necessary to provide the mode setting terminal independently, and the microcomputer 11 The number of terminals can be further reduced.

(第2実施例)
図4及び図5は本発明の第2実施例を示すものであり、第1実施例と同一部分には同一符号を付して説明を省略し、以下異なる部分について説明する。図4は、マイコン31に内蔵されるデコーダ32の構成を示すものである。リセット端子14は、マイコン31の内部において、立下りエッジ検出部33,立上がりエッジ検出部34の入力端子に共通に接続されており、検出部33,34は、夫々ロウアクティブのリセット信号について立下りエッジ,立上がりエッジを検出するようになっている。
(Second embodiment)
4 and 5 show a second embodiment of the present invention. The same parts as those in the first embodiment are denoted by the same reference numerals and the description thereof will be omitted. Hereinafter, different parts will be described. FIG. 4 shows the configuration of the decoder 32 built in the microcomputer 31. The reset terminal 14 is commonly connected to the input terminals of the falling edge detection unit 33 and the rising edge detection unit 34 inside the microcomputer 31, and each of the detection units 33 and 34 falls for a low-active reset signal. Edges and rising edges are detected.

立下りエッジ検出部33のエッジ検出信号は、例えば8ビットのバイナリカウンタ35に対してリセット信号として与えられている。バイナリカウンタ35は、クロック回路36より与えられるクロックパルスの入力数をアップカウントするものであり、そのカウントデータは、比較回路部37に与えられている。尚、上記クロックパルスの周期は、大部より与えられるリセット信号のアクティブ期間に比較して、十分短い時間となるように設定されている。   The edge detection signal of the falling edge detection unit 33 is given as a reset signal to the 8-bit binary counter 35, for example. The binary counter 35 counts up the number of clock pulses input from the clock circuit 36, and the count data is supplied to the comparison circuit unit 37. The period of the clock pulse is set to be sufficiently shorter than the active period of the reset signal given from the majority.

比較回路部37は、マグニチュードコンパレータを備えており、立上がりエッジ検出部34のエッジ検出信号が比較トリガ信号として与えられると、その時点の上記カウントデータを、マイコン31の各動作モードに対応して設定される固定データ値と比較するようになっている。そして、その比較結果がデコード信号(モード信号)x,y,zとして、(図4では図示しない)CPU12に出力される。尚、デコード信号x,y,zの初期状態は何れもロウレベルとなっている。
また、比較回路部37が出力するデコード信号xは、遅延回路38を介してワンショットマルチバイブレータ39のトリガ信号入力端子に与えられている。ワンショットマルチバイブレータ39は、CPU12等に内部リセット信号を出力するもので、トリガ信号がハイレベルに変化すると、所定期間だけロウレベルに変化する信号を出力する。
The comparison circuit unit 37 includes a magnitude comparator. When the edge detection signal of the rising edge detection unit 34 is given as a comparison trigger signal, the count data at that time is set corresponding to each operation mode of the microcomputer 31. It is designed to be compared with fixed data values. Then, the comparison result is output to the CPU 12 (not shown in FIG. 4) as decode signals (mode signals) x, y, z. Note that the initial states of the decode signals x, y, and z are all at a low level.
The decode signal x output from the comparison circuit unit 37 is given to the trigger signal input terminal of the one-shot multivibrator 39 via the delay circuit 38. The one-shot multivibrator 39 outputs an internal reset signal to the CPU 12 or the like, and outputs a signal that changes to a low level for a predetermined period when the trigger signal changes to a high level.

次に、第2実施例の作用について図5も参照して説明する。第2実施例では、外部より与えるリセット信号がアクティブとなっている期間の長さに応じて、マイコン31の動作モードを切換えるようになっている。図5に示すように、比較回路部37は、内部に3つの設定データ値「00001000」,「00010000」,「00100000」を保持している。そして、カウンタ35は、リセット信号がロウレベルに遷移して立下りエッジが検出された時点からカウントを開始し、比較回路部37は、リセット信号がロウレベルからハイレベルに遷移して立上がりエッジが検出された時点のカウント値CDを上記各設定データと比較する。   Next, the operation of the second embodiment will be described with reference to FIG. In the second embodiment, the operation mode of the microcomputer 31 is switched according to the length of the period during which the reset signal supplied from the outside is active. As shown in FIG. 5, the comparison circuit unit 37 holds three setting data values “00001000”, “00010000”, and “00100000” therein. The counter 35 starts counting when the reset signal transitions to the low level and the falling edge is detected, and the comparison circuit unit 37 detects the rising edge when the reset signal transitions from the low level to the high level. The count value CD at that time is compared with the set data.

この場合、カウント値CDが「00001000」未満であれば、マイコン31をリセット信号としてのアクティブレベル遷移期間が短すぎるため、デコード動作を行なわない。この場合、デコード信号x,y,zは変化しないので、ワンショットマルチバイブレータ39にトリガ信号は出力されず、リセットは無効となる。即ち、このような信号の変化はノイズとして排除する。そして、カウント値CDが「00001000」以上となった場合は、カウント値CDが示す範囲に応じて、動作モードを以下のように設定する。
カウント値CD デコード信号 動作モード
x y z
「00001000」未満 L L L ×
「00001000」以上,且つ
「00010000」未満 H L L 0
「00010000」以上,且つ
「00100000」未満 H H L 1
「00100000」以上 H H H 2
そして、動作モードが「0」〜「2」の場合は、少なくともデコード信号xがハイレベルに遷移するので、その立上り時点から遅延回路38によって付与される遅延時間が経過した後、ワンショットマルチバイブレータ39にトリガ信号が出力されて、内部リセット信号がアクティブとなる。ここで、遅延回路38が付与する遅延時間は、少なくとも、外部リセット信号について想定される最も長いアクティブレベルの遷移期間よりも長くなるように設定しておく。
In this case, if the count value CD is less than “00001000”, since the active level transition period using the microcomputer 31 as a reset signal is too short, the decoding operation is not performed. In this case, since the decode signals x, y, and z do not change, the trigger signal is not output to the one-shot multivibrator 39, and the reset becomes invalid. That is, such a signal change is eliminated as noise. When the count value CD is “00001000” or more, the operation mode is set as follows according to the range indicated by the count value CD.
Count value CD decode signal Operation mode
x y z
Less than "00001000" L L L ×
"00001000" or more and less than "00010000" H L L 0
“00010000” or more and less than “00100000” H H L 1
"00100000" or more H H H 2
When the operation mode is “0” to “2”, at least the decode signal x transits to a high level. Therefore, after the delay time given by the delay circuit 38 has elapsed from the rising point, the one-shot multivibrator A trigger signal is output to 39, and the internal reset signal becomes active. Here, the delay time provided by the delay circuit 38 is set to be longer than at least the longest active level transition period assumed for the external reset signal.

以上のように第2実施例によれば、比較回路部37は、リセット信号のレベルが遷移している期間の長さに相当するカウント値CDに応じて指定されたモードをデコードするので、リセット信号のレベル遷移期間を変化させることで、異なる動作モードを指定して起動させることができる。また、リセット信号のアクティブレベル遷移期間が短か過ぎる場合はデコード動作を行なわないので、そのような信号変化をノイズとして排除することができる。   As described above, according to the second embodiment, the comparison circuit unit 37 decodes the mode specified in accordance with the count value CD corresponding to the length of the period during which the level of the reset signal is transiting. By changing the signal level transition period, a different operation mode can be specified and activated. Further, since the decoding operation is not performed when the active level transition period of the reset signal is too short, such a signal change can be eliminated as noise.

(第3実施例)
図6及び図7は本発明の第3実施例を示すものであり、第1実施例と異なる部分のみ説明する。図6は、マイコン41に内蔵されるデコーダ42の構成を示すものである。リセット端子14は、マイコン41の内部において、エッジ検出部43の入力端子に接続されており、エッジ検出部43は、ロウアクティブのリセット信号について立下りエッジ,立上がりエッジの双方を検出し、その検出毎にクロックパルスをカウンタ44に出力するようになっている。カウンタ44は、上記クロックパルスの出力数をカウントし、そのカウントデータを比較回路部45に出力する。
(Third embodiment)
6 and 7 show a third embodiment of the present invention, and only the parts different from the first embodiment will be described. FIG. 6 shows the configuration of the decoder 42 built in the microcomputer 41. The reset terminal 14 is connected to the input terminal of the edge detection unit 43 inside the microcomputer 41. The edge detection unit 43 detects both the falling edge and the rising edge of the row active reset signal, and detects the detection. A clock pulse is output to the counter 44 every time. The counter 44 counts the number of output clock pulses and outputs the count data to the comparison circuit unit 45.

また、エッジ検出部43によるエッジ検出出力は、信号出力部46にも与えられている。信号出力部46は、内部にタイマやマグニチュードコンパレータなどを備えており、前記タイマは、上記のエッジ検出出力が与えられる毎にゼロクリアされて内部クロックによる計時を開始するようになっている。また、上記コンパレータは、前記タイマの計時データと、比較トリガ信号を出力するためのデータ値,カウンタ44のリセット信号を出力するためのデータ値とを比較するものが夫々用意されている。そして、夫々のコンパレータにおいて計時データが設定データ値に一致すると、信号出力部46は、比較回路部45に比較トリガ信号を出力し、また、カウンタ44にリセット信号を出力する。   The edge detection output from the edge detection unit 43 is also given to the signal output unit 46. The signal output unit 46 includes a timer, a magnitude comparator, and the like. The timer is cleared to zero each time the edge detection output is given, and starts counting with an internal clock. The comparator is prepared for comparing the timer timing data with the data value for outputting the comparison trigger signal and the data value for outputting the reset signal of the counter 44, respectively. When the time measurement data matches the set data value in each comparator, the signal output unit 46 outputs a comparison trigger signal to the comparison circuit unit 45 and outputs a reset signal to the counter 44.

比較回路部45は、カウンタ44のカウント値に応じて、デコード信号x,y,zを出力する。また、それらのデコード信号は、3入力ORゲート47の入力端子にも夫々与えられており、ORゲート47の出力端子は、ANDゲート48の入力端子の一方に接続されている。ANDゲート48の他方の入力端子には、信号出力部46より比較トリガ信号が与えられており、ANDゲート48の出力端子は、ワンショットマルチバイブレータ49のトリガ信号入力端子に与えられている。
ワンショットマルチバイブレータ49は、第2実施例のワンショットマルチバイブレータ39と同様に、CPU12等に内部リセット信号を出力するもので、トリガ信号がハイレベルに変化すると所定期間だけロウレベルに変化する信号を出力する。
The comparison circuit unit 45 outputs decode signals x, y, and z according to the count value of the counter 44. These decode signals are also given to the input terminals of the three-input OR gate 47, and the output terminal of the OR gate 47 is connected to one of the input terminals of the AND gate 48. The other input terminal of the AND gate 48 is supplied with a comparison trigger signal from the signal output unit 46, and the output terminal of the AND gate 48 is supplied to the trigger signal input terminal of the one-shot multivibrator 49.
Similar to the one-shot multivibrator 39 of the second embodiment, the one-shot multivibrator 49 outputs an internal reset signal to the CPU 12 or the like. When the trigger signal changes to high level, the one-shot multivibrator 49 outputs a signal that changes to low level for a predetermined period. Output.

次に、第3実施例の作用について図7も参照して説明する。第3実施例では、外部より与えるリセット信号がアクティブとなる回数(ロウレベル遷移する回数)に応じて、動作モードを切換えるようになっている。上述のように、カウンタ44はエッジ検出部43によるエッジ検出出力回数をカウントし、比較回路部45はそのカウントデータに応じてデコード信号x,y,zを出力する。また、信号出力部46は、上記エッジ検出が行なわれる毎に内部のタイマをリセットスタートさせるので、最後の立上りエッジが検出された時点からタイマ値が大きく増大し、所定時間が経過すると比較トリガ信号を出力し、更にその後、カウンタ44にリセット信号を出力する。尚、上記タイマは、例えばタイマ値が最大値に達すると計時動作を停止するように構成される。   Next, the operation of the third embodiment will be described with reference to FIG. In the third embodiment, the operation mode is switched according to the number of times the reset signal given from the outside becomes active (the number of times of low level transition). As described above, the counter 44 counts the number of times of edge detection output by the edge detection unit 43, and the comparison circuit unit 45 outputs the decode signals x, y, z according to the count data. Further, since the signal output unit 46 resets and starts the internal timer every time the edge detection is performed, the timer value greatly increases from the time when the last rising edge is detected, and when a predetermined time elapses, the comparison trigger signal And then a reset signal is output to the counter 44. The timer is configured to stop the time measuring operation when the timer value reaches a maximum value, for example.

図7に示すように、比較回路部45は、リセット信号が1回だけ変化した場合(カウント値「2」)はデコード信号を出力しない。従ってこの場合、ANDゲート48の出力信号はハイレベルとならず、内部リセット信号は出力されない。即ち、斯様な信号変化はノイズとして排除されるようになっている。
そして、比較回路部45は、リセット信号が2回変化した場合(カウント値「4」)は、図7に示す比較トリガ信号の出力タイミングでデコード信号xをハイレベルとしてモード「0」を設定し、リセット信号が3回変化した場合(カウント値「4」)はデコード信号x,yをハイレベルとしてモード「1」を設定する。また、図7には示していないが、リセット信号が4回変化した場合(カウント値「8」)はデコード信号x,y,zを全てハイレベルとしてモード「2」を設定する。
As shown in FIG. 7, the comparison circuit unit 45 does not output a decode signal when the reset signal changes only once (count value “2”). Therefore, in this case, the output signal of the AND gate 48 does not become high level, and the internal reset signal is not output. That is, such a signal change is eliminated as noise.
When the reset signal changes twice (count value “4”), the comparison circuit unit 45 sets the decode signal x to the high level at the output timing of the comparison trigger signal shown in FIG. 7 and sets the mode “0”. When the reset signal changes three times (count value “4”), the decode signals x and y are set to the high level to set the mode “1”. Although not shown in FIG. 7, when the reset signal changes four times (count value “8”), the decode signals x, y, and z are all set to the high level to set the mode “2”.

比較トリガ信号がハイレベルになった時点で、デコード信号x,y,zの何れか1つ以上がハイレベルとなった場合は、ANDゲート48の出力レベルもハイレベルに変化する。従って、ワンショットマルチバイブレータ49より内部リセット信号が出力され、そのリセットが解除されるとCPU12が起動する。そして、CPU12は、第1,第2実施例と同様に、設定された動作モードを読取り、そのモードに対応するプログラムに分岐して実行する。   When any one or more of the decode signals x, y, z becomes high level when the comparison trigger signal becomes high level, the output level of the AND gate 48 also changes to high level. Accordingly, an internal reset signal is output from the one-shot multivibrator 49, and the CPU 12 is activated when the reset is released. Then, as in the first and second embodiments, the CPU 12 reads the set operation mode, branches to a program corresponding to that mode, and executes it.

以上のように第3実施例によれば、デコーダ42は、リセット信号がアクティブレベルに変化する回数に応じて指定されたモードをデコードするので、モード設定信号のレベル変化回数を変化させることで、異なる動作モードを指定して起動させることができる。また、例えば、レベル変化回数が1回だけの場合はデコード動作を行なわないので、そのような信号変化をノイズとして排除することができる。   As described above, according to the third embodiment, the decoder 42 decodes the designated mode in accordance with the number of times the reset signal changes to the active level, so that by changing the number of level changes of the mode setting signal, Different operating modes can be specified and activated. Also, for example, when the number of level changes is only one, the decoding operation is not performed, so that such signal changes can be eliminated as noise.

本発明は上記し又は図面に記載した実施例にのみ限定されるものではなく、以下のような変形が可能である。
モード設定端子を、リセット端子14とは別個に設けても良い。その場合、モード設定信号を、上記各実施例のリセット信号と同じように変化させれば良い。斯様に構成した場合でも、1つのモード設定端子に与える信号を変化させることで、従来よりも多くの動作モードを設定することができる。
第3実施例において、エッジ検出部43が立上りエッジ,立下りエッジの何れか一方のみを検出するようにして、カウンタ44にその出力回数をカウントさせても良い。
具体数値例や信号レベルの論理などについては、適宜変更して実施例すれば良い。
The present invention is not limited to the embodiments described above or shown in the drawings, and the following modifications are possible.
The mode setting terminal may be provided separately from the reset terminal 14. In that case, the mode setting signal may be changed in the same manner as the reset signal in each of the above embodiments. Even in such a configuration, it is possible to set more operation modes than before by changing the signal applied to one mode setting terminal.
In the third embodiment, the edge detector 43 may detect only one of the rising edge and the falling edge, and the counter 44 may count the number of outputs.
Specific numerical examples, signal level logic, and the like may be appropriately modified and implemented.

本発明の第1実施例であり、マイクロコンピュータの構成を本発明の要旨にかかる部分のみ示す図1 is a diagram showing a configuration of a microcomputer according to a first embodiment of the present invention and showing only a portion according to the gist of the present invention 比較回路部の内部構成を示す図The figure which shows the internal constitution of the comparison circuit section リセット信号のレベル変化に応じて、動作モードが決定される状態を示すタイミングチャートTiming chart showing the state in which the operation mode is determined according to the level change of the reset signal 本発明の第2実施例を示す図2相当図FIG. 2 equivalent diagram showing a second embodiment of the present invention. 図3相当図3 equivalent figure 本発明の第3実施例を示す図2相当図FIG. 2 equivalent view showing a third embodiment of the present invention. 図3相当図3 equivalent figure 従来のICパッケージの一部を示す図A diagram showing a part of a conventional IC package リセット端子にノイズが印加された場合を示すタイミングチャートTiming chart showing when noise is applied to the reset terminal ICのリセット端子に外付け部品を接続した状態を示す図The figure which shows the state which connected external parts to the reset terminal of IC

符号の説明Explanation of symbols

図面中、11はマイクロコンピュータ、14はリセット端子(モード設定端子)、20はデコーダ、31はマイクロコンピュータ、32はデコーダ、41はマイクロコンピュータ、42はデコーダを示す。   In the drawing, 11 is a microcomputer, 14 is a reset terminal (mode setting terminal), 20 is a decoder, 31 is a microcomputer, 32 is a decoder, 41 is a microcomputer, and 42 is a decoder.

Claims (5)

複数の動作モードで起動可能に構成されるマイクロコンピュータにおいて、
入力されるモード設定信号の状態変化に応じて、指定されたモードをデコードしてモード信号を出力するデコーダと、
リセットが解除されると、前記デコーダにより出力されたモード信号に応じた動作モードで起動するように構成されることを特徴とするマイクロコンピュータ。
In a microcomputer configured to be bootable in a plurality of operation modes,
A decoder that decodes a specified mode and outputs a mode signal according to a state change of an input mode setting signal;
A microcomputer configured to start up in an operation mode according to a mode signal output by the decoder when the reset is released.
前記デコーダは、前記モード設定信号の電圧レベルに応じて、指定されたモードをデコードすることを特徴とする請求項1記載のマイクロコンピュータ。   2. The microcomputer according to claim 1, wherein the decoder decodes a designated mode in accordance with a voltage level of the mode setting signal. 前記デコーダは、前記モード設定信号のレベルが遷移している期間の長さに応じて、指定されたモードをデコードすることを特徴とする請求項1記載のマイクロコンピュータ。   2. The microcomputer according to claim 1, wherein the decoder decodes a designated mode in accordance with a length of a period during which the level of the mode setting signal is transited. 前記デコーダは、前記モード設定信号のレベルが変化する回数に応じて、指定されたモードをデコードすることを特徴とする請求項1記載のマイクロコンピュータ。   2. The microcomputer according to claim 1, wherein the decoder decodes the designated mode according to the number of times the level of the mode setting signal changes. 前記モード設定信号を、リセット信号と共通化したことを特徴とする請求項1乃至4の何れかに記載のマイクロコンピュータ。   5. The microcomputer according to claim 1, wherein the mode setting signal is shared with a reset signal.
JP2006341177A 2006-12-19 2006-12-19 Microcomputer Pending JP2008152621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006341177A JP2008152621A (en) 2006-12-19 2006-12-19 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006341177A JP2008152621A (en) 2006-12-19 2006-12-19 Microcomputer

Publications (1)

Publication Number Publication Date
JP2008152621A true JP2008152621A (en) 2008-07-03

Family

ID=39654715

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006341177A Pending JP2008152621A (en) 2006-12-19 2006-12-19 Microcomputer

Country Status (1)

Country Link
JP (1) JP2008152621A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009040448A1 (en) 2009-01-06 2010-07-15 Mitsubishi Electric Corp. Semiconductor device with multiple modes of operation
JP2014235649A (en) * 2013-06-04 2014-12-15 株式会社デンソー Microcomputer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009040448A1 (en) 2009-01-06 2010-07-15 Mitsubishi Electric Corp. Semiconductor device with multiple modes of operation
KR101098398B1 (en) 2009-01-06 2011-12-26 미쓰비시덴키 가부시키가이샤 Semiconductor device having plurality of operation modes
US8120983B2 (en) 2009-01-06 2012-02-21 Mitsubishi Electric Corporation Semiconductor device having plurality of operation modes
DE102009040448B4 (en) * 2009-01-06 2015-09-10 Mitsubishi Electric Corp. Semiconductor device with multiple modes of operation
JP2014235649A (en) * 2013-06-04 2014-12-15 株式会社デンソー Microcomputer

Similar Documents

Publication Publication Date Title
US9733952B2 (en) Microprocessor, and method of managing reset events therefor
JP5271602B2 (en) Microcomputer
JP2004273660A (en) Semiconductor integrated circuit
US7372760B2 (en) Semiconductor device and entry into test mode without use of unnecessary terminal
JP2001184234A (en) Watch dog timer
US5535376A (en) Data processor having a timer circuit for performing a buffered pulse width modulation function and method therefor
JP4294503B2 (en) Operation mode control circuit, microcomputer including operation mode control circuit, and control system using the microcomputer
JP2007065961A (en) Electronic control device and method
JP2008152621A (en) Microcomputer
JPWO2017115610A1 (en) VEHICLE SWITCH CONTROL DEVICE AND SWITCH STATE DETECTION METHOD
JP2007104210A (en) Reset circuit
JP5194804B2 (en) Semiconductor integrated circuit
US7055051B2 (en) Clock switch device and microcontroller for selecting one of a plurality of clocks based on signal levels
KR101212607B1 (en) System and method of conditional control of latch circuit devices
US10566781B2 (en) Input/output buffer circuit with a protection circuit
US20060053264A1 (en) Semiconductor device preventing writing of prohibited set value to register
JP4440214B2 (en) Semiconductor device
JP6633882B2 (en) Semiconductor device and system
US7293190B2 (en) Noisy clock test method and apparatus
KR101087225B1 (en) Enabling special modes within a digital device
JP2009212930A (en) Input-level determination circuit
JP2007155659A (en) Mode setting circuit
KR100283410B1 (en) Memory size detection circuit of microprocessor
JP2010087959A (en) Semiconductor device
JP2021004587A (en) Electronic control unit and vehicle control system