[go: up one dir, main page]

JP2002278645A - Integrated circuit - Google Patents

Integrated circuit

Info

Publication number
JP2002278645A
JP2002278645A JP2001079822A JP2001079822A JP2002278645A JP 2002278645 A JP2002278645 A JP 2002278645A JP 2001079822 A JP2001079822 A JP 2001079822A JP 2001079822 A JP2001079822 A JP 2001079822A JP 2002278645 A JP2002278645 A JP 2002278645A
Authority
JP
Japan
Prior art keywords
signal
counter
input
input terminal
internal clock
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
JP2001079822A
Other languages
Japanese (ja)
Inventor
Yuichi Ikeda
雄一 池田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001079822A priority Critical patent/JP2002278645A/en
Publication of JP2002278645A publication Critical patent/JP2002278645A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

(57)【要約】 【課題】集積回路の内部クロック周波数を動的に算出す
ることにより、異なる内部クロック周波数で動作する集
積回路であっても同一のブートプログラムを使用するこ
とを可能とする。 【解決手段】CPU190が命令メモリ110に格納さ
れたブートプログラム111を実行し、レジスタ140
に1を設定することにより、セレクタ180、181は
既知の一定周波数で発振する発振器130から出力され
る信号を選択しこの信号をタイマ150に供給する。タ
イマ150はこの信号の立ち上がりから立ち下がりまで
の間に、クロックジェネレータ1100から供給される
集積回路100の内部クロック数をカウントする。
(57) Abstract: By dynamically calculating the internal clock frequency of an integrated circuit, the same boot program can be used even for integrated circuits that operate at different internal clock frequencies. A CPU (190) executes a boot program (111) stored in an instruction memory (110).
Is set to 1, the selectors 180 and 181 select a signal output from the oscillator 130 which oscillates at a known constant frequency, and supplies this signal to the timer 150. The timer 150 counts the number of internal clocks of the integrated circuit 100 supplied from the clock generator 1100 during the period from the rise to the fall of this signal.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、シリアル通信機能
を備えた集積回路に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to an integrated circuit having a serial communication function.

【0002】[0002]

【従来の技術】図5は従来のシリアル通信機能を備えた
集積回路のブロック図を示す。
2. Description of the Related Art FIG. 5 is a block diagram showing a conventional integrated circuit having a serial communication function.

【0003】集積回路500は、命令メモリ510と、
シリアルインタフェース520と、タイマ530と、シ
リアル通信を行う際に集積回路500の内部と外部とを
接続する入力端子540と、シリアル通信を行う際に集
積回路500の内部と外部とを接続する出力端子541
と、外部入力手段551からの信号によりタイマの制御
を行う際に集積回路500の内部と外部とを接続する入
力端子542、543と、CPU560と、クロックジ
ェネレータ570とから構成され、命令メモリ510に
はブートプログラム511が格納されている。シリアル
インタフェース520には分周器521が内蔵されてい
る。
The integrated circuit 500 includes an instruction memory 510,
A serial interface 520, a timer 530, an input terminal 540 for connecting the inside and outside of the integrated circuit 500 when performing serial communication, and an output terminal for connecting the inside and outside of the integrated circuit 500 when performing serial communication 541
And input terminals 542 and 543 for connecting the inside and outside of the integrated circuit 500 when controlling the timer with a signal from the external input means 551; a CPU 560; and a clock generator 570. Stores a boot program 511. The serial interface 520 includes a frequency divider 521.

【0004】入力端子542から入力された入力信号1
はタイマ530へ出力される。入力端子543から入力
された入力信号2はタイマ530へ出力される。タイマ
530から出力される割込み信号はCPU560へ出力
される。クロックジェネレータ570により生成される
内部クロックはシリアルインタフェース520の内部の
分周器521およびタイマ530に出力される。またシ
リアルインタフェース520は入力端子540と出力端
子541を介し外部通信手段550とシリアル通信を行
う。
The input signal 1 input from the input terminal 542
Is output to the timer 530. The input signal 2 input from the input terminal 543 is output to the timer 530. The interrupt signal output from timer 530 is output to CPU 560. The internal clock generated by clock generator 570 is output to frequency divider 521 and timer 530 inside serial interface 520. The serial interface 520 performs serial communication with the external communication unit 550 via the input terminal 540 and the output terminal 541.

【0005】[0005]

【発明が解決しようとする課題】従来の集積回路500
において、CPU560により命令メモリ510に格納
されたブートプログラム511を起動して外部通信手段
550とシリアル通信を行う際、ある定められた転送速
度で通信を行うために集積回路500側はシリアルイン
タフェース520の動作クロックを適切に設定する必要
がある。そのためにCPU560がブートプログラム5
11にしたがいシリアルインタフェース520内の分周
器521に適切な分周比を設定することにより、クロッ
クジェネレータ570により生成される内部クロックを
分周し、シリアルインタフェース520の動作クロック
を決定する。このとき内部クロック周波数は既知である
ものとしてブートプログラム511は作成されている。
しかし実際は集積回路の内部クロック周波数は集積回路
の用途によって異なる。したがって異なる内部クロック
周波数で動作する集積回路にはそれぞれ異なるブートプ
ログラムが必要となり、プログラム開発の工数増大や生
産性が低下するといった問題点がある。
SUMMARY OF THE INVENTION A conventional integrated circuit 500
When the CPU 560 activates the boot program 511 stored in the instruction memory 510 and performs serial communication with the external communication means 550, the integrated circuit 500 side operates the serial interface 520 to perform communication at a predetermined transfer rate. It is necessary to set the operation clock appropriately. Therefore, the CPU 560 sets the boot program 5
By setting an appropriate frequency division ratio in the frequency divider 521 in the serial interface 520 according to 11, the internal clock generated by the clock generator 570 is frequency-divided, and the operation clock of the serial interface 520 is determined. At this time, the boot program 511 has been created on the assumption that the internal clock frequency is known.
However, the internal clock frequency of the integrated circuit actually varies depending on the use of the integrated circuit. Therefore, different boot programs are required for the integrated circuits operating at different internal clock frequencies, and there is a problem in that the number of steps of program development increases and productivity decreases.

【0006】したがって、本発明の目的は、異なる内部
クロック周波数で動作する集積回路であっても同一のブ
ートプログラムを使用することが可能となる集積回路を
提供することである。
Accordingly, it is an object of the present invention to provide an integrated circuit that can use the same boot program even if the integrated circuits operate at different internal clock frequencies.

【0007】[0007]

【課題を解決するための手段】請求項1記載の集積回路
は、起動プログラムを格納するメモリと、前記起動プロ
グラムを実行する命令実行手段と、外部とのシリアル通
信が実行可能なシリアル通信手段と、一定の周期で発振
する発振器と、内部クロックを生成するクロック生成手
段と、前記内部クロックをカウントすることが可能なカ
ウンタ手段と、前記カウンタ手段を制御するために必要
な信号を入力する第1入力端子と、前記命令実行手段に
より設定された第1制御信号の値を保持する第1保持手
段と、前記発振器から出力される信号と前記第1入力端
子から入力される信号とを前記第1制御信号により切り
替え、前記カウンタ手段に第1入力信号として出力する
第1選択手段とを備え、前記カウンタ手段は、前記第1
入力信号が前記発振器から出力する信号のときその信号
に基づいて前記発振器のある周期での前記内部クロック
をカウントし、前記カウンタ手段のカウント数より、内
部クロックの周波数を算出することを特徴とするもので
ある。
An integrated circuit according to claim 1, wherein a memory for storing a start program, an instruction executing means for executing the start program, and a serial communication means capable of executing serial communication with the outside. An oscillator that oscillates at a constant cycle, a clock generation unit that generates an internal clock, a counter unit that can count the internal clock, and a first input unit that inputs a signal necessary to control the counter unit. An input terminal, first holding means for holding a value of a first control signal set by the instruction execution means, and a signal output from the oscillator and a signal input from the first input terminal, the first control signal A first selection means for switching by a control signal and outputting the first input signal to the counter means, wherein the counter means comprises:
When the input signal is a signal output from the oscillator, the internal clock in a certain cycle of the oscillator is counted based on the signal, and the frequency of the internal clock is calculated from the count number of the counter means. Things.

【0008】請求項1記載の集積回路によれば、既知の
一定周波数で発振する発振器の出力する信号を用いるこ
とにより未知の内部クロック信号の周波数を動的に算出
することが可能となる。その結果異なる内部クロック周
波数で動作する集積回路であっても同一のブートプログ
ラムを使用することが可能となる。
According to the integrated circuit of the first aspect, it is possible to dynamically calculate the frequency of an unknown internal clock signal by using a signal output from an oscillator that oscillates at a known constant frequency. As a result, the same boot program can be used even for integrated circuits operating at different internal clock frequencies.

【0009】請求項2記載の集積回路は、起動プログラ
ムを格納するメモリと、前記起動プログラムを実行する
命令実行手段と、外部とのシリアル通信が実行可能なシ
リアル通信手段と、一定の周期で発振する発振器と、内
部クロックを生成するクロック生成手段と、前記内部ク
ロックをカウントすることが可能なカウンタ手段と、前
記カウンタ手段を制御するために必要な信号を入力する
第1入力端子と、前記カウンタ手段を制御するために必
要な信号を入力する第2入力端子と、前記命令実行手段
により設定され第1制御信号の値を保持する第1保持手
段と、前記第1制御信号により前記発振器から出力され
る信号と前記第1入力端子から入力される信号とを切り
替え前記カウンタ手段に第1入力信号として出力する第1
選択手段と、前記第1制御信号により前記発振器から出
力される信号と前記第2入力端子から入力される信号と
を切り替え前記カウンタ手段に第2入力信号として出力
する第2選択手段とを備え、前記カウンタ手段は、前記
第1入力信号のタイミングで第2制御信号を出力し前記第
2入力信号のタイミングで第3制御信号を出力するカウン
タ制御部と、前記第2制御信号により前記内部クロック
をカウント開始するカウンタと、前記第3制御信号によ
り前記カウンタの値を保持する第2保持手段とを有し、
前記カウンタの値より、内部クロックの周波数を算出す
ることを特徴とするものである。
According to a second aspect of the present invention, there is provided an integrated circuit, comprising: a memory for storing a start-up program; an instruction execution unit for executing the start-up program; a serial communication unit capable of executing serial communication with the outside; An oscillator for generating an internal clock, a clock generating means for generating an internal clock, a counter means capable of counting the internal clock, a first input terminal for inputting a signal necessary for controlling the counter means, and the counter A second input terminal for inputting a signal necessary for controlling the means, a first holding means for holding a value of a first control signal set by the instruction execution means, and an output from the oscillator according to the first control signal And a signal input from the first input terminal to output a first input signal to the counter means.
Selecting means, and a second selecting means for switching between a signal output from the oscillator and a signal input from the second input terminal by the first control signal and outputting the signal as a second input signal to the counter means, The counter means outputs a second control signal at the timing of the first input signal and outputs the second control signal.
(2) a counter control unit that outputs a third control signal at the timing of the input signal; a counter that starts counting the internal clock by the second control signal; and a second holding unit that holds the value of the counter by the third control signal. Means,
The frequency of the internal clock is calculated from the value of the counter.

【0010】請求項2記載の集積回路によれば、請求項
1と同様な効果がある。
According to the integrated circuit of the second aspect, the same effect as that of the first aspect is obtained.

【0011】請求項3記載の集積回路は、請求項2にお
いて、前記命令実行手段が、前記起動プログラムにした
がい、前記第1選択手段と前記第2選択手段を前記発振器
から出力される信号に選択する前記第1制御信号を出力
するよう前記第1保持手段を設定し、前記カウンタ手段
は、前記第1選択手段で選択された信号で前記カウンタ
によりカウント動作を開始し、前記第2選択手段で選択
された信号のタイミングで前記カウンタの値を前記第2
保持手段に保持するものである。
According to a third aspect of the present invention, in the integrated circuit according to the second aspect, the instruction execution means selects the first selection means and the second selection means to a signal output from the oscillator according to the start program. The first holding means is set so as to output the first control signal, and the counter means starts a counting operation by the counter with the signal selected by the first selecting means, and the second selecting means The value of the counter is changed to the second signal at the timing of the selected signal.
It is held by holding means.

【0012】請求項3記載の集積回路によれば、請求項
2と同様な効果がある。
According to the integrated circuit of the third aspect, the same effect as that of the second aspect is obtained.

【0013】請求項4記載の集積回路は、起動プログラ
ムを格納するメモリと、前記起動プログラムを実行する
命令実行手段と、外部とのシリアル通信が実行可能なシ
リアル通信手段と、前記シリアル通信手段を用いて通信
を行う信号を入力する第1入力端子と、内部クロックを
生成するクロック生成手段と、前記内部クロックをカウ
ントすることが可能なカウンタ手段と、前記カウンタ手
段を制御するために必要な信号を入力する第2入力端子
と、前記命令実行手段により設定され第1制御信号の値
を保持する第1保持手段と、前記第1制御信号により前
記第1入力端子から入力される信号と前記第2入力端子
から入力される信号とを切り替え前記カウンタ手段に第
1入力信号として出力する第1選択手段とを備え、前記カ
ウンタ手段は、前記第1入力信号が前記第1入力端子か
ら入力される信号のときその信号に基づいてその信号の
ある周期での前記内部クロックをカウントし、前記カウ
ンタ手段のカウント数より、内部クロックの周波数を算
出することを特徴とするものである。
According to a fourth aspect of the present invention, there is provided an integrated circuit, comprising: a memory for storing a start-up program; an instruction executing unit for executing the start-up program; a serial communication unit capable of executing serial communication with the outside; A first input terminal for inputting a signal used for communication, a clock generation unit for generating an internal clock, a counter unit capable of counting the internal clock, and a signal necessary for controlling the counter unit A second input terminal for inputting a signal, a first holding unit configured to hold a value of a first control signal set by the instruction execution unit, a signal input from the first input terminal by the first control signal, and 2 The signal input from the input terminal is switched to the counter means.
First selecting means for outputting as one input signal, wherein the counter means, when the first input signal is a signal inputted from the first input terminal, based on the signal, the counter at a certain period of the signal. The internal clock is counted, and the frequency of the internal clock is calculated from the count number of the counter means.

【0014】請求項4記載の集積回路によれば、外部入
力端子から既知の一定周波数パルスを入力することによ
り未知の内部クロック信号の周波数を動的に算出するこ
とが可能となる。その結果異なる内部クロック周波数で
動作する集積回路であっても同一のブートプログラムを
使用することが可能となる。
According to the integrated circuit of the fourth aspect, it is possible to dynamically calculate the frequency of an unknown internal clock signal by inputting a known constant frequency pulse from an external input terminal. As a result, the same boot program can be used even for integrated circuits operating at different internal clock frequencies.

【0015】請求項5記載の集積回路は、起動プログラ
ムを格納するメモリと、前記起動プログラムを実行する
命令実行手段と、外部とのシリアル通信が実行可能なシ
リアル通信手段と、前記シリアル通信手段を用いて通信
を行う信号を入力する第1入力端子と、前記シリアル通
信手段を用いて通信を行う信号を出力する第1出力端子
と、内部クロックを生成するクロック生成手段と、前記
内部クロックをカウントすることが可能なカウンタ手段
と、前記カウンタ手段を制御するために必要な信号を入
力する第2入力端子と、前記カウンタ手段を制御するた
めに必要な信号を入力する第3入力端子と、前記命令実
行手段により設定され第1制御信号の値を保持する第1
保持手段と、前記第1制御信号により前記第1入力端子
から入力される信号と前記第2入力端子から入力される
信号とを切り替え前記カウンタ手段に第1入力信号とし
て出力する第1選択手段と、前記第1制御信号により前記
第1入力端子から入力される信号と前記第3入力端子か
ら入力される信号とを切り替え前記カウンタ手段に第2
入力信号として出力する第2選択手段とを備え、前記カ
ウンタ手段は、前記第1入力信号のタイミングで第2制御
信号を出力し前記第2入力信号のタイミングで第3制御信
号を出力するカウンタ制御部と、前記第2制御信号によ
り前記内部クロックをカウント開始するカウンタと、前
記第3制御信号により前記カウンタの値を保持する第2
保持手段とを有し、前記カウンタの値より、内部クロッ
クの周波数を算出することを特徴とするものである。
According to a fifth aspect of the present invention, there is provided an integrated circuit, comprising: a memory for storing a start-up program; an instruction execution unit for executing the start-up program; a serial communication unit capable of executing serial communication with the outside; A first input terminal for inputting a signal for performing communication using the first communication terminal, a first output terminal for outputting a signal for performing communication using the serial communication unit, a clock generation unit for generating an internal clock, and counting the internal clock. A second input terminal for inputting a signal necessary for controlling the counter means, a third input terminal for inputting a signal required for controlling the counter means, A first control signal set by the instruction execution means and holding a value of the first control signal;
Holding means, and first selecting means for switching between a signal input from the first input terminal and a signal input from the second input terminal by the first control signal and outputting the signal as a first input signal to the counter means; Switching between a signal input from the first input terminal and a signal input from the third input terminal in accordance with the first control signal;
And a second control means for outputting a second control signal at the timing of the first input signal, and a third control signal for outputting a third control signal at the timing of the second input signal. , A counter that starts counting the internal clock by the second control signal, and a second that holds the value of the counter by the third control signal.
Holding means for calculating the frequency of the internal clock from the value of the counter.

【0016】請求項5記載の集積回路によれば、請求項
4と同様な効果がある。
According to the integrated circuit of the fifth aspect, the same effect as that of the fourth aspect is obtained.

【0017】請求項6記載の集積回路は、請求項5にお
いて、命令実行手段が、起動プログラムにしたがい、第
1選択手段と第2選択手段を第1入力端子から入力される
信号に選択する第1制御信号を出力するよう第1保持手段
を設定し、カウンタ手段は、前記第1選択手段で選択さ
れた信号でカウンタによりカウント動作を開始し、前記
第2選択手段で選択された信号のタイミングで前記カウ
ンタの値を第2保持手段に保持するものである。
According to a sixth aspect of the present invention, there is provided the integrated circuit according to the fifth aspect, wherein the instruction executing means is configured to execute the first one according to a start program.
The first holding means is set so as to output a first control signal for selecting the 1 selection means and the second selection means to a signal input from the first input terminal, and the counter means is selected by the first selection means. The counting operation is started by the counter in response to the signal, and the value of the counter is held in the second holding means at the timing of the signal selected by the second selecting means.

【0018】請求項6記載の集積回路によれば、請求項
5と同様な効果がある。
According to the integrated circuit of the sixth aspect, the same effect as that of the fifth aspect is obtained.

【0019】[0019]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図を用いて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0020】(実施の形態1)図1は、本発明の第1の
実施の形態における集積回路のブロック図を示す。集積
回路100は、命令メモリ110と、シリアルインタフ
ェース120と、ある一定の周波数で発振する発振器1
30と、1ビットのレジスタ140と、タイマ150
と、シリアル通信を行う際に集積回路100の内部と外
部とを接続する入力端子160と、シリアル通信を行う
際に集積回路100の内部と外部とを接続する出力端子
161と、外部からの信号例えば外部入力手段171か
らの信号によりタイマ150の制御を行う際に集積回路
100の内部と外部とを接続する入力端子162、16
3と、レジスタ140から出力されるイネーブル信号が
1の場合に発振器130から出力される信号を選択し、
レジスタ140から出力されるイネーブル信号が0の場
合に入力端子162から入力される信号を選択するセレ
クタ180と、レジスタ140から出力されるイネーブ
ル信号が1の場合に発振器130から出力される信号を
選択し、レジスタ140から出力されるイネーブル信号
が0の場合に入力端子163から入力される信号を選択
するセレクタ181と、CPU190と、クロックジェ
ネレータ1100とから構成され、命令メモリ110に
はブートプログラム111が格納されている。シリアル
インタフェース120には分周器121が内蔵されてい
る。
FIG. 1 is a block diagram of an integrated circuit according to a first embodiment of the present invention. The integrated circuit 100 includes an instruction memory 110, a serial interface 120, and an oscillator 1 oscillating at a certain frequency.
30, a 1-bit register 140, and a timer 150
An input terminal 160 for connecting the inside and the outside of the integrated circuit 100 when performing serial communication, an output terminal 161 for connecting the inside and outside of the integrated circuit 100 when performing serial communication, and a signal from the outside. For example, when the timer 150 is controlled by a signal from the external input unit 171, the input terminals 162 and 16 for connecting the inside and the outside of the integrated circuit 100 are connected.
3 and a signal output from the oscillator 130 when the enable signal output from the register 140 is 1,
Selector 180 that selects a signal input from input terminal 162 when the enable signal output from register 140 is 0, and selects a signal output from oscillator 130 when the enable signal output from register 140 is 1 When the enable signal output from the register 140 is 0, the selector 181 selects a signal input from the input terminal 163, the CPU 190, and the clock generator 1100. Is stored. The serial interface 120 includes a frequency divider 121.

【0021】セレクタ180により選択された入力信号
1はタイマ150へ出力される。セレクタ181により
選択された入力信号2はタイマ150へ出力される。タ
イマ150から出力される割込み信号はCPU190へ
出力される。クロックジェネレータ1100により生成
される内部クロックはシリアルインタフェース120の
内部の分周器121およびタイマ150に出力される。
またシリアルインタフェース120は入力端子160と
出力端子161を介し外部通信手段170とシリアル通
信を行う。
The input signal 1 selected by the selector 180 is output to the timer 150. The input signal 2 selected by the selector 181 is output to the timer 150. The interrupt signal output from timer 150 is output to CPU 190. The internal clock generated by clock generator 1100 is output to frequency divider 121 and timer 150 inside serial interface 120.
The serial interface 120 performs serial communication with the external communication unit 170 via the input terminal 160 and the output terminal 161.

【0022】タイマ150は、図2に示すように、カウ
ント制御部200と、カウント動作を行うカウンタ21
0と、カウンタ210の値を格納することができるレジ
スタ220とから構成され、クロックジェネレータ11
00から出力されたクロック信号はカウンタ210に供
給される。セレクタ180の出力信号は入力信号1とし
てカウント制御部200に供給される。セレクタ181
の出力信号は入力信号2としてカウント制御部200に
供給される。カウント制御部200は入力信号1の立ち
上がりエッジを検出するとカウント許可信号をカウンタ
210に出力し、入力信号2の立下りエッジを検出する
と制御信号をレジスタ220に出力する。カウンタ21
0はカウント許可信号が入力されるとクロックジェネレ
ータ1100より供給される内部クロックによりカウン
ト動作を開始する。レジスタ220は制御信号が入力さ
れるとカウンタ210の値を格納する。レジスタ220
にカウンタ210の値を格納する際には割込み信号が出
力される。
As shown in FIG. 2, the timer 150 includes a count control unit 200 and a counter 21 for performing a counting operation.
0 and a register 220 capable of storing the value of the counter 210.
The clock signal output from 00 is supplied to the counter 210. The output signal of the selector 180 is supplied to the count control unit 200 as the input signal 1. Selector 181
Is supplied as an input signal 2 to the count control unit 200. The count control unit 200 outputs a count permission signal to the counter 210 when detecting the rising edge of the input signal 1, and outputs a control signal to the register 220 when detecting the falling edge of the input signal 2. Counter 21
When the count permission signal is input to 0, the count operation is started by the internal clock supplied from the clock generator 1100. The register 220 stores the value of the counter 210 when the control signal is input. Register 220
When the value of the counter 210 is stored in the CPU, an interrupt signal is output.

【0023】以上のように構成された本発明の第1の実
施の形態による集積回路について、その動作を説明す
る。CPU190が命令メモリ110に格納されたブー
トプログラム111を実行することにより動作が開始す
る。レジスタ140は起動時0に設定されているものと
する。CPU190はブートプログラム111にしたが
いレジスタ140を1に設定し、その後タイマ150か
ら割込み信号が入力されるまで待ち状態に入る。セレク
タ180はレジスタ140の出力が1であるので発振器
130から出力される信号を選択する。セレクタ181
もレジスタ140の出力が1であるので発振器130か
ら出力される信号を選択する。これによりタイマ150
には図3に示すような信号が入力される。カウント制御
部200は入力信号1の立ち上がりエッジを検出しカウ
ント許可信号を出力する。これによりカウンタ210は
クロックジェネレータ1100から供給される内部クロ
ック1周期ごとに1ずつカウント動作を行う。またカウ
ント制御部200は入力信号2の立下りエッジを検出し
制御信号を出力する。これによりレジスタ220はその
時点でのカウンタ210の値を格納する。またこのとき
割込み信号が出力される。CPU190はタイマ150
からの割込み信号が入力されるとレジスタ220の値を
読み出す。ここで、入力信号1、入力信号2はともに発
振器130から出力される信号であるのでカウンタ21
0は発振器130から出力される信号の立ち上がりエッ
ジからカウント動作を開始し、レジスタ220は発振器
130から出力される信号の立下りエッジでその時点で
のカウンタ210の値を格納することになり、発振器1
30の出力信号半周期の間に内部クロックが何サイクル
したかを知ることが可能となる。発振器130の周波数
は既知であるのでCPU190はレジスタ220の値か
ら内部クロックの周波数を算出することが可能となる。
The operation of the integrated circuit according to the first embodiment of the present invention configured as described above will be described. The operation starts when the CPU 190 executes the boot program 111 stored in the instruction memory 110. It is assumed that the register 140 is set to 0 at startup. The CPU 190 sets the register 140 to 1 according to the boot program 111, and then enters a wait state until an interrupt signal is input from the timer 150. The selector 180 selects a signal output from the oscillator 130 because the output of the register 140 is 1. Selector 181
Since the output of the register 140 is 1, the signal output from the oscillator 130 is selected. This allows the timer 150
Is input with a signal as shown in FIG. The count control unit 200 detects a rising edge of the input signal 1 and outputs a count permission signal. As a result, the counter 210 performs a counting operation by one every one cycle of the internal clock supplied from the clock generator 1100. Further, count control section 200 detects a falling edge of input signal 2 and outputs a control signal. As a result, the register 220 stores the value of the counter 210 at that time. At this time, an interrupt signal is output. The CPU 190 is a timer 150
When the interrupt signal is input, the value of the register 220 is read. Here, since both the input signal 1 and the input signal 2 are signals output from the oscillator 130, the counter 21
0 starts the counting operation from the rising edge of the signal output from the oscillator 130, and the register 220 stores the value of the counter 210 at that time on the falling edge of the signal output from the oscillator 130. 1
It is possible to know how many cycles of the internal clock have occurred during 30 half cycles of the output signal. Since the frequency of the oscillator 130 is known, the CPU 190 can calculate the frequency of the internal clock from the value of the register 220.

【0024】CPU190は算出した周波数と通信速度
に応じた適切な分周比を分周器121に設定する。これ
により、シリアルインタフェース120は入力端子16
0、出力端子161を介して外部通信手段170とシリ
アル通信を行うことが可能となる。CPU190は内部
クロックの周波数算出後レジスタ140に0を設定す
る。
The CPU 190 sets an appropriate frequency division ratio in the frequency divider 121 according to the calculated frequency and communication speed. Thereby, the serial interface 120 is connected to the input terminal 16.
0, it is possible to perform serial communication with the external communication means 170 via the output terminal 161. After calculating the frequency of the internal clock, the CPU 190 sets 0 to the register 140.

【0025】また、ここではカウント制御部200は入
力信号1の立ち上がりエッジを検出することによりカウ
ント許可信号を出力し入力信号2の立下りエッジを検出
することにより制御信号を出力しているが、入力信号1
の立下りエッジを検出することによりカウント制御信号
を出力し入力信号2の立ち上がりエッジを検出すること
により制御信号を出力するようにしてもよい。
Here, the count controller 200 outputs a count enable signal by detecting the rising edge of the input signal 1 and outputs a control signal by detecting the falling edge of the input signal 2. Input signal 1
The control signal may be output by detecting the falling edge of the input signal 2 and detecting the rising edge of the input signal 2.

【0026】(実施の形態2)本発明の第1の実施の形
態において未知の内部クロック周波数を算出することが
可能となったが、一定の周波数で発振する発振器が専用
に必要である。これを解決するのが実施の形態2であ
る。
(Embodiment 2) Although the unknown internal clock frequency can be calculated in the first embodiment of the present invention, an oscillator that oscillates at a constant frequency is required exclusively. Embodiment 2 solves this.

【0027】図4は、本発明の第2の実施の形態におけ
る集積回路のブロック図を示す。集積回路400は、命
令メモリ410と、シリアルインタフェース420と、
1ビットのレジスタ430と、タイマ440と、シリア
ル通信を行う際に集積回路400の内部と外部とを接続
する入力端子450と、シリアル通信を行う際に集積回
路400の内部と外部とを接続する出力端子451と、
外部からの信号例えば外部入力手段461からの信号に
よりタイマの制御を行う際に集積回路400の内部と外
部とを接続する入力端子452、453と、レジスタ4
30から出力されるイネーブル信号が1の場合に入力端
子450から入力される信号を選択し、レジスタ430
から出力されるイネーブル信号が0の場合に入力端子4
52から入力される信号を選択するセレクタ470と、
レジスタ430から出力されるイネーブル信号が1の場
合に入力端子450から入力される信号を選択し、レジ
スタ430から出力されるイネーブル信号が0の場合に
入力端子453から入力される信号を選択するセレクタ
471と、CPU480と、クロックジェネレータ49
0とから構成され、命令メモリ410にはブートプログ
ラム411が格納されている。シリアルインタフェース
420には分周器421が内蔵されている。セレクタ4
70により選択された入力信号1はタイマ440へ出力
される。セレクタ471により選択された入力信号2は
タイマ440へ出力される。タイマ440から出力され
る割込み信号はCPU480へ出力される。クロックジ
ェネレータ490により生成される内部クロックはシリ
アルインタフェース420の内部の分周器421および
タイマ440に出力される。またシリアルインタフェー
ス420は入力端子450と出力端子451を介し外部
通信手段460とシリアル通信を行う。
FIG. 4 is a block diagram of an integrated circuit according to the second embodiment of the present invention. The integrated circuit 400 includes an instruction memory 410, a serial interface 420,
A 1-bit register 430, a timer 440, an input terminal 450 for connecting the inside and the outside of the integrated circuit 400 when performing serial communication, and a connection between the inside and outside of the integrated circuit 400 when performing serial communication. An output terminal 451,
Input terminals 452 and 453 for connecting the inside and outside of the integrated circuit 400 when the timer is controlled by a signal from the outside, for example, a signal from the external input means 461;
When the enable signal output from the terminal 30 is 1, the signal input from the input terminal 450 is selected, and the register 430 is selected.
Input terminal 4 when the enable signal output from
A selector 470 for selecting a signal input from the input terminal 52;
A selector that selects a signal input from the input terminal 450 when the enable signal output from the register 430 is 1, and selects a signal input from the input terminal 453 when the enable signal output from the register 430 is 0. 471, the CPU 480, and the clock generator 49
The instruction memory 410 stores a boot program 411. The serial interface 420 includes a frequency divider 421. Selector 4
The input signal 1 selected by 70 is output to the timer 440. The input signal 2 selected by the selector 471 is output to the timer 440. The interrupt signal output from timer 440 is output to CPU 480. The internal clock generated by clock generator 490 is output to frequency divider 421 and timer 440 inside serial interface 420. The serial interface 420 performs serial communication with the external communication unit 460 via the input terminal 450 and the output terminal 451.

【0028】タイマ440は、図2に示すように、カウ
ント制御部200と、カウント動作を行うカウンタ21
0と、カウンタ210の値を格納することができるレジ
スタ220とから構成され、クロックジェネレータ49
0から出力されたクロック信号はカウンタ210に供給
される。セレクタ470の出力信号は入力信号1として
カウント制御部200に供給される。セレクタ471の
出力信号は入力信号2としてカウント制御部200に供
給される。カウント制御部200は入力信号1の立ち上
がりエッジを検出するとカウント許可信号をカウンタ2
10に出力し、入力信号2の立下りエッジを検出すると
制御信号をレジスタ220に出力する。カウンタ210
はカウント許可信号が入力されるとクロックジェネレー
タ490より供給される内部クロックによりカウント動
作を開始する。レジスタ220は制御信号が入力される
とカウンタ210の値を格納する。レジスタ220にカ
ウンタ210の値を格納する際には割込み信号が出力さ
れる。
As shown in FIG. 2, the timer 440 includes a count control unit 200 and a counter 21 that performs a counting operation.
The clock generator 49 is composed of 0 and a register 220 capable of storing the value of the counter 210.
The clock signal output from 0 is supplied to the counter 210. The output signal of the selector 470 is supplied to the count control unit 200 as the input signal 1. The output signal of the selector 471 is supplied to the count control unit 200 as the input signal 2. When detecting the rising edge of the input signal 1, the count control unit 200 outputs the count permission signal to the counter 2.
10 to output a control signal to the register 220 when the falling edge of the input signal 2 is detected. Counter 210
When a count permission signal is input, the count operation is started by the internal clock supplied from the clock generator 490. The register 220 stores the value of the counter 210 when the control signal is input. When the value of the counter 210 is stored in the register 220, an interrupt signal is output.

【0029】以上のように構成された本発明の第2の実
施の形態による集積回路について、その動作を説明す
る。CPU480が命令メモリ410に格納されたブー
トプログラム411を実行することにより動作が開始す
る。レジスタ430は起動時0に設定されているものと
する。CPU480はブートプログラム411にしたが
いレジスタ430を1に設定し、その後タイマ440か
ら割込み信号が入力されるまで待ち状態に入る。セレク
タ470はレジスタ430の出力が1であるので入力端
子450から入力される信号を選択する。セレクタ47
1もレジスタ430の出力が1であるので入力端子45
0から入力される信号を選択する。これによりタイマ4
40には図3に示すような信号が入力される。カウント
制御部200は入力信号1の立ち上がりエッジを検出し
カウント許可信号を出力する。これによりカウンタ21
0はクロックジェネレータ490から供給される内部ク
ロックの1周期ごとに1ずつカウント動作を行う。また
カウント制御部200は入力信号2の立下りエッジを検
出し制御信号を出力する。これによりレジスタ220は
その時点でのカウンタ210の値を格納する。またこの
とき割込み信号が出力される。CPU480はタイマ4
40からの割込み信号が入力されるとレジスタ220の
値を読み出す。ここで、入力信号1、入力信号2はとも
に入力端子450から入力される信号であるのでカウン
タ210は入力端子450から入力される信号の立ち上
がりエッジからカウント動作を開始し、レジスタ220
は入力端子450から入力される信号の立下りエッジで
その時点でのカウンタ210の値を格納することにな
り、入力端子450からの入力信号の半周期の間に内部
クロックが何サイクルしたかを知ることが可能となる。
外部通信手段460から周波数既知のパルスを送信する
ことによりCPU480はレジスタ220の値から内部
クロックの周波数を算出することが可能となる。CPU
480は算出した周波数と通信速度に応じた適切な分周
比を分周421に設定する。これにより、シリアルイン
タフェース420は入力端子450、出力端子451を
介して外部通信手段460とシリアル通信を行うことが
可能となる。CPU480は内部クロックの周波数算出
後レジスタ430に0を設定する。
The operation of the integrated circuit according to the second embodiment of the present invention configured as described above will be described. The operation starts when the CPU 480 executes the boot program 411 stored in the instruction memory 410. It is assumed that the register 430 is set to 0 at startup. The CPU 480 sets the register 430 to 1 according to the boot program 411, and then enters a wait state until an interrupt signal is input from the timer 440. The selector 470 selects a signal input from the input terminal 450 because the output of the register 430 is “1”. Selector 47
The output terminal of the register 430 is also 1 so that the input terminal 45
Select a signal input from 0. This allows timer 4
A signal as shown in FIG. The count control unit 200 detects a rising edge of the input signal 1 and outputs a count permission signal. Thus, the counter 21
“0” performs a counting operation by one every one cycle of the internal clock supplied from the clock generator 490. Further, count control section 200 detects a falling edge of input signal 2 and outputs a control signal. As a result, the register 220 stores the value of the counter 210 at that time. At this time, an interrupt signal is output. CPU 480 is timer 4
When an interrupt signal from 40 is input, the value of the register 220 is read. Here, since both the input signal 1 and the input signal 2 are signals input from the input terminal 450, the counter 210 starts the counting operation from the rising edge of the signal input from the input terminal 450, and
Will store the value of the counter 210 at that time at the falling edge of the signal input from the input terminal 450, and determine how many cycles the internal clock has performed during the half cycle of the input signal from the input terminal 450. It becomes possible to know.
By transmitting a pulse with a known frequency from the external communication means 460, the CPU 480 can calculate the frequency of the internal clock from the value of the register 220. CPU
480 sets an appropriate frequency division ratio in the frequency division 421 according to the calculated frequency and communication speed. Thus, the serial interface 420 can perform serial communication with the external communication unit 460 via the input terminal 450 and the output terminal 451. CPU 480 sets 0 in register 430 after calculating the frequency of the internal clock.

【0030】また、ここではカウント制御部200は入
力信号1の立ち上がりエッジを検出することによりカウ
ント許可信号を出力し、入力信号2の立下りエッジを検
出することにより制御信号を出力しているが、入力信号
1の立下りエッジを検出することによりカウント制御信
号を出力し、入力信号2の立ち上がりエッジを検出する
ことにより制御信号を出力するようにしてもよい。
Here, the count controller 200 outputs the count enable signal by detecting the rising edge of the input signal 1 and outputs the control signal by detecting the falling edge of the input signal 2. Alternatively, the count control signal may be output by detecting the falling edge of the input signal 1, and the control signal may be output by detecting the rising edge of the input signal 2.

【0031】[0031]

【発明の効果】請求項1記載の集積回路によれば、既知
の一定周波数で発振する発振器の出力する信号を用いる
ことにより未知の内部クロック信号の周波数を動的に算
出することが可能となる。その結果異なる内部クロック
周波数で動作する集積回路であっても同一のブートプロ
グラムを使用することが可能となる。
According to the integrated circuit of the first aspect, it is possible to dynamically calculate the frequency of an unknown internal clock signal by using a signal output from an oscillator that oscillates at a known constant frequency. . As a result, the same boot program can be used even for integrated circuits operating at different internal clock frequencies.

【0032】請求項2記載の集積回路によれば、請求項
1と同様な効果がある。
According to the integrated circuit of the second aspect, the same effect as that of the first aspect is obtained.

【0033】請求項3記載の集積回路によれば、請求項
2と同様な効果がある。
According to the integrated circuit of the third aspect, the same effect as that of the second aspect is obtained.

【0034】請求項4記載の集積回路によれば、外部入
力端子から既知の一定周波数パルスを入力することによ
り未知の内部クロック信号の周波数を動的に算出するこ
とが可能となる。その結果異なる内部クロック周波数で
動作する集積回路であっても同一のブートプログラムを
使用することが可能となる。
According to the integrated circuit of the fourth aspect, the frequency of the unknown internal clock signal can be dynamically calculated by inputting a known constant frequency pulse from the external input terminal. As a result, the same boot program can be used even for integrated circuits operating at different internal clock frequencies.

【0035】請求項5記載の集積回路によれば、請求項
4と同様な効果がある。
According to the integrated circuit of the fifth aspect, the same effect as that of the fourth aspect is obtained.

【0036】請求項6記載の集積回路によれば、請求項
5と同様な効果がある。
According to the integrated circuit of the sixth aspect, the same effect as that of the fifth aspect is obtained.

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

【図1】本発明の第1の実施の形態における集積回路の
ブロック図である。
FIG. 1 is a block diagram of an integrated circuit according to a first embodiment of the present invention.

【図2】第1の実施の形態における集積回路のタイマの
構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a timer of the integrated circuit according to the first embodiment.

【図3】第1の実施の形態における入力信号1および入
力信号2と、周波数未知の内部クロックとの相関を示す
図である。
FIG. 3 is a diagram illustrating a correlation between an input signal 1 and an input signal 2 according to the first embodiment and an internal clock whose frequency is unknown.

【図4】第2の実施の形態における集積回路のブロック
図である。
FIG. 4 is a block diagram of an integrated circuit according to a second embodiment.

【図5】従来の集積回路のブロック図である。FIG. 5 is a block diagram of a conventional integrated circuit.

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

100 集積回路 110 命令メモリ 111 ブートプログラム 120 シリアルインタフェース 121 分周器 130 発振器 140 レジスタ 150 タイマ 160 入力端子 161 出力端子 162、163 入力端子 170 外部通信手段 171 外部入力手段 180、181 セレクタ 190 CPU 1100 クロックジェネレータ 200 カウント制御部 210 カウンタ 220 レジスタ 400 集積回路 410 命令メモリ 411 ブートプログラム 420 シリアルインタフェース 421 分周器 430 レジスタ 440 タイマ 450 入力端子 451 出力端子 452、453 入力端子 460 外部通信手段 461 外部入力手段 470、471 セレクタ 480 CPU 490 クロックジェネレータ 500 集積回路 510 命令メモリ 511 ブートプログラム 520 シリアルインタフェース 521 分周器 530 タイマ 540 入力端子 541 出力端子 542、543 入力端子 550 外部通信手段 551 外部入力手段 560 CPU 570 クロックジェネレータ Reference Signs List 100 integrated circuit 110 instruction memory 111 boot program 120 serial interface 121 divider 130 oscillator 140 register 150 timer 160 input terminal 161 output terminal 162, 163 input terminal 170 external communication means 171 external input means 180, 181 selector 190 CPU 1100 clock generator 200 count control unit 210 counter 220 register 400 integrated circuit 410 instruction memory 411 boot program 420 serial interface 421 frequency divider 430 register 440 timer 450 input terminal 451 output terminal 452,453 input terminal 460 external communication means 461 external input means 470,471 Selector 480 CPU 490 clock generator 500 integrated circuit 510 instruction memo 511 boot program 520 serial interface 521 divider 530 timer 540 input terminal 541 output terminal 542 and 543 input terminal 550 external communication unit 551 external input unit 560 CPU 570 Clock Generator

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 起動プログラムを格納するメモリと、前
記起動プログラムを実行する命令実行手段と、外部との
シリアル通信が実行可能なシリアル通信手段と、一定の
周期で発振する発振器と、内部クロックを生成するクロ
ック生成手段と、前記内部クロックをカウントすること
が可能なカウンタ手段と、前記カウンタ手段を制御する
ために必要な信号を入力する第1入力端子と、前記命令
実行手段により設定された第1制御信号の値を保持する
第1保持手段と、前記発振器から出力される信号と前記
第1入力端子から入力される信号とを前記第1制御信号
により切り替え、前記カウンタ手段に第1入力信号とし
て出力する第1選択手段とを備え、 前記カウンタ手段は、前記第1入力信号が前記発振器か
ら出力する信号のときその信号に基づいて前記発振器の
ある周期での前記内部クロックをカウントし、 前記カウンタ手段のカウント数より、前記内部クロック
の周波数を算出することを特徴とする集積回路。
1. A memory for storing a startup program, an instruction execution unit for executing the startup program, a serial communication unit capable of executing serial communication with the outside, an oscillator oscillating at a constant cycle, and an internal clock. Clock generating means for generating, a counter means capable of counting the internal clock, a first input terminal for inputting a signal required for controlling the counter means, and a first input terminal set by the instruction executing means. A first holding unit for holding a value of the first control signal, a signal output from the oscillator and a signal input from the first input terminal are switched by the first control signal, and a first input signal is supplied to the counter unit. And a first selection unit that outputs the first input signal when the first input signal is a signal output from the oscillator. An integrated circuit, wherein the internal clock is counted at a certain cycle of the oscillator, and a frequency of the internal clock is calculated from a count number of the counter means.
【請求項2】 起動プログラムを格納するメモリと、前
記起動プログラムを実行する命令実行手段と、外部との
シリアル通信が実行可能なシリアル通信手段と、一定の
周期で発振する発振器と、内部クロックを生成するクロ
ック生成手段と、前記内部クロックをカウントすること
が可能なカウンタ手段と、前記カウンタ手段を制御する
ために必要な信号を入力する第1入力端子と、前記カウ
ンタ手段を制御するために必要な信号を入力する第2入
力端子と、前記命令実行手段により設定され第1制御信
号の値を保持する第1保持手段と、前記第1制御信号に
より前記発振器から出力される信号と前記第1入力端子
から入力される信号とを切り替え前記カウンタ手段に第
1入力信号として出力する第1選択手段と、前記第1制御
信号により前記発振器から出力される信号と前記第2入
力端子から入力される信号とを切り替え前記カウンタ手
段に第2入力信号として出力する第2選択手段とを備
え、 前記カウンタ手段は、前記第1入力信号のタイミングで
第2制御信号を出力し前記第2入力信号のタイミングで第
3制御信号を出力するカウンタ制御部と、前記第2制御
信号により前記内部クロックをカウント開始するカウン
タと、前記第3制御信号により前記カウンタの値を保持
する第2保持手段とを有し、 前記カウンタの値より、内部クロックの周波数を算出す
ることを特徴とする集積回路。
2. A memory for storing a startup program, an instruction execution unit for executing the startup program, a serial communication unit capable of executing serial communication with the outside, an oscillator oscillating at a constant cycle, and an internal clock. Clock generating means for generating, a counter means capable of counting the internal clock, a first input terminal for inputting a signal necessary for controlling the counter means, and a first input terminal required for controlling the counter means A second input terminal for inputting a first signal, a first holding means for holding a value of a first control signal set by the command execution means, a signal output from the oscillator by the first control signal, and a first signal. Switch between the signal input from the input terminal and the counter means.
A first selecting means for outputting as an input signal, and switching between a signal output from the oscillator and a signal input from the second input terminal by the first control signal, and outputting the signal as a second input signal to the counter means. And a second selector, wherein the counter outputs a second control signal at the timing of the first input signal, and outputs a second control signal at the timing of the second input signal.
(3) a counter control unit that outputs a control signal, a counter that starts counting the internal clock according to the second control signal, and a second holding unit that holds a value of the counter according to the third control signal. An integrated circuit for calculating a frequency of an internal clock from a value of a counter.
【請求項3】 命令実行手段は、起動プログラムにした
がい、第1選択手段と第2選択手段を発振器から出力され
る信号に選択する第1制御信号を出力するよう第1保持手
段を設定し、カウンタ手段は、前記第1選択手段で選択
された信号でカウンタによりカウント動作を開始し、前
記第2選択手段で選択された信号のタイミングで前記カ
ウンタの値を第2保持手段に保持する請求項2記載の集
積回路。
3. The instruction execution means sets the first holding means to output a first control signal for selecting the first selection means and the second selection means to be a signal output from the oscillator, according to a start program, The counter means starts a count operation by a counter with a signal selected by the first selection means, and holds the value of the counter in a second holding means at a timing of a signal selected by the second selection means. 3. The integrated circuit according to 2.
【請求項4】 起動プログラムを格納するメモリと、前
記起動プログラムを実行する命令実行手段と、外部との
シリアル通信が実行可能なシリアル通信手段と、前記シ
リアル通信手段を用いて通信を行う信号を入力する第1
入力端子と、内部クロックを生成するクロック生成手段
と、前記内部クロックをカウントすることが可能なカウ
ンタ手段と、前記カウンタ手段を制御するために必要な
信号を入力する第2入力端子と、前記命令実行手段によ
り設定され第1制御信号の値を保持する第1保持手段
と、前記第1制御信号により前記第1入力端子から入力
される信号と前記第2入力端子から入力される信号とを
切り替え前記カウンタ手段に第1入力信号として出力す
る第1選択手段とを備え、 前記カウンタ手段は、前記第1入力信号が前記第1入力
端子から入力される信号のときその信号に基づいてその
信号のある周期での前記内部クロックをカウントし、 前記カウンタ手段のカウント数より、前記内部クロック
の周波数を算出することを特徴とする集積回路。
4. A memory for storing a startup program, an instruction execution unit for executing the startup program, a serial communication unit capable of executing serial communication with the outside, and a signal for performing communication using the serial communication unit. First to enter
An input terminal, clock generation means for generating an internal clock, counter means capable of counting the internal clock, a second input terminal for inputting a signal required to control the counter means, and the command A first holding unit that is set by an execution unit and holds a value of a first control signal; and switches between a signal input from the first input terminal and a signal input from the second input terminal by the first control signal. First selecting means for outputting the first input signal to the counter means as a first input signal, wherein the counter means, when the first input signal is a signal input from the first input terminal, based on the signal, An integrated circuit which counts the internal clock in a certain cycle, and calculates the frequency of the internal clock from the count number of the counter means.
【請求項5】 起動プログラムを格納するメモリと、前
記起動プログラムを実行する命令実行手段と、外部との
シリアル通信が実行可能なシリアル通信手段と、前記シ
リアル通信手段を用いて通信を行う信号を入力する第1
入力端子と、前記シリアル通信手段を用いて通信を行う
信号を出力する第1出力端子と、内部クロックを生成す
るクロック生成手段と、前記内部クロックをカウントす
ることが可能なカウンタ手段と、前記カウンタ手段を制
御するために必要な信号を入力する第2入力端子と、前
記カウンタ手段を制御するために必要な信号を入力する
第3入力端子と、前記命令実行手段により設定され第1
制御信号の値を保持する第1保持手段と、前記第1制御
信号により前記第1入力端子から入力される信号と前記
第2入力端子から入力される信号とを切り替え前記カウ
ンタ手段に第1入力信号として出力する第1選択手段と、
前記第1制御信号により前記第1入力端子から入力される
信号と前記第3入力端子から入力される信号とを切り替
え前記カウンタ手段に第2入力信号として出力する第2
選択手段とを備え、 前記カウンタ手段は、前記第1入力信号のタイミングで
第2制御信号を出力し前記第2入力信号のタイミングで第
3制御信号を出力するカウンタ制御部と、前記第2制御
信号により前記内部クロックをカウント開始するカウン
タと、前記第3制御信号により前記カウンタの値を保持
する第2保持手段とを有し、 前記カウンタの値より、内部クロックの周波数を算出す
ることを特徴とする集積回路。
5. A memory for storing a startup program, an instruction execution unit for executing the startup program, a serial communication unit capable of executing serial communication with the outside, and a signal for performing communication using the serial communication unit. First to enter
An input terminal, a first output terminal for outputting a signal for performing communication using the serial communication unit, a clock generation unit for generating an internal clock, a counter unit capable of counting the internal clock, and the counter A second input terminal for inputting a signal necessary for controlling the means, a third input terminal for inputting a signal necessary for controlling the counter means, and a first input terminal set by the instruction execution means.
First holding means for holding a value of a control signal, and switching between a signal input from the first input terminal and a signal input from the second input terminal in accordance with the first control signal; First selection means for outputting as a signal,
A second control unit that switches between a signal input from the first input terminal and a signal input from the third input terminal according to the first control signal and outputs the signal as a second input signal to the counter unit;
Selecting means, wherein the counter means outputs a second control signal at the timing of the first input signal and outputs a second control signal at the timing of the second input signal.
(3) a counter control unit that outputs a control signal, a counter that starts counting the internal clock according to the second control signal, and a second holding unit that holds a value of the counter according to the third control signal. An integrated circuit for calculating a frequency of an internal clock from a value of a counter.
【請求項6】 命令実行手段は、起動プログラムにした
がい、第1選択手段と第2選択手段を第1入力端子から入
力される信号に選択する第1制御信号を出力するよう第1
保持手段を設定し、カウンタ手段は、前記第1選択手段
で選択された信号でカウンタによりカウント動作を開始
し、前記第2選択手段で選択された信号のタイミングで
前記カウンタの値を第2保持手段に保持する請求項5記
載の集積回路。
6. An instruction execution means for outputting a first control signal for selecting a first selection means and a second selection means to a signal input from a first input terminal according to a start program.
The holding means is set, and the counter means starts the counting operation by the counter with the signal selected by the first selecting means, and holds the value of the counter in the second at the timing of the signal selected by the second selecting means. 6. The integrated circuit according to claim 5, wherein said integrated circuit is held by a means.
JP2001079822A 2001-03-21 2001-03-21 Integrated circuit Pending JP2002278645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001079822A JP2002278645A (en) 2001-03-21 2001-03-21 Integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001079822A JP2002278645A (en) 2001-03-21 2001-03-21 Integrated circuit

Publications (1)

Publication Number Publication Date
JP2002278645A true JP2002278645A (en) 2002-09-27

Family

ID=18936201

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001079822A Pending JP2002278645A (en) 2001-03-21 2001-03-21 Integrated circuit

Country Status (1)

Country Link
JP (1) JP2002278645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2459733A (en) * 2008-04-30 2009-11-11 Icera Inc Determining the frequency of a first oscillator with reference to a second oscillator during execution of boot code

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2459733A (en) * 2008-04-30 2009-11-11 Icera Inc Determining the frequency of a first oscillator with reference to a second oscillator during execution of boot code
GB2459733B (en) * 2008-04-30 2012-12-19 Icera Inc Clock configuration

Similar Documents

Publication Publication Date Title
JP5886015B2 (en) Time measuring device, microcontroller, program, and time measuring method
US6194940B1 (en) Automatic clock switching
KR101283431B1 (en) Microcomputer
JP2725205B2 (en) Microcontroller counter / timer circuit
JPH08166834A (en) Clock generating circuit and microcomputer
EP0695987B1 (en) Improved timer for a data processor
JP2002278645A (en) Integrated circuit
JPH08286780A (en) Clock circuit, processor using the same, and processor operating method
JP2009505302A (en) Waveform generation method and apparatus using a microcontroller
JPH0972238A (en) Timer device
JP2773546B2 (en) Pulse generation circuit
KR100304393B1 (en) Motor control apparatus
JP2959223B2 (en) Clock oscillator
JP2000081466A (en) Semiconductor integrated device
US6715017B2 (en) Interruption signal generating apparatus
JP6769490B2 (en) Integrated circuit equipment
JPH10255489A (en) Microcomputer
JP4345200B2 (en) Programmable controller I/O unit
US6530053B1 (en) Semiconductor device
JP7173833B2 (en) Semiconductor integrated circuits and devices equipped with the semiconductor integrated circuits
JP4634307B2 (en) Semiconductor device
JPH11242529A (en) Clock controller
JPH11345129A (en) Interval timer circuit
JP2004264999A (en) Timer circuit, electronic apparatus and counter control method for the timer circuit
JP3463666B2 (en) Semiconductor integrated circuit and inspection method thereof