JPH10229326A - Frequency adjustment device for oscillation circuit - Google Patents

Frequency adjustment device for oscillation circuit

Info

Publication number
JPH10229326A
JPH10229326A JP9031978A JP3197897A JPH10229326A JP H10229326 A JPH10229326 A JP H10229326A JP 9031978 A JP9031978 A JP 9031978A JP 3197897 A JP3197897 A JP 3197897A JP H10229326 A JPH10229326 A JP H10229326A
Authority
JP
Japan
Prior art keywords
oscillation
frequency
oscillation frequency
oscillation circuit
program area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP9031978A
Other languages
Japanese (ja)
Other versions
JP3857762B2 (en
Inventor
Hiroshi Osawa
博 大澤
Fumio Saito
文雄 斎藤
Takashi Asami
隆 浅見
Katsumi Tachikawa
克己 舘川
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP03197897A priority Critical patent/JP3857762B2/en
Publication of JPH10229326A publication Critical patent/JPH10229326A/en
Application granted granted Critical
Publication of JP3857762B2 publication Critical patent/JP3857762B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To easily obtain the oscillated frequency expected in an RC oscillation circuit. SOLUTION: After a 1-chip microcomputer is reset and released, an instruction of a 2nd program area of a ROM 11 is decoded, switch circuits 9-1 to 9-n are switched, in response to correction data of a nonvolatile memory 10, and an RC constant is adjusted by connecting a resistor 4 and any of oscillation adjustment resistors 8-1 to 8-n in series selectively. The current oscillating frequency of an RC oscillation circuit differs from an expected oscillation frequency, then correction data in response to the difference between both the oscillating frequencies are replaced with the correction data in the nonvolatile memory 10, and the operation above is repeated. When the adjustment of the oscillated frequency of the RC oscillation circuit is finished, the processing jumps to a heading address of a 1st program area of the ROM 11, and the execution transits to the normal operation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、集積回路に使用さ
れるRC発振回路の発振周波数を誤差調整するのに好適
な発振回路の周波数調整装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a frequency adjusting device for an oscillation circuit, which is suitable for adjusting an oscillation frequency of an RC oscillation circuit used in an integrated circuit.

【0002】[0002]

【従来の技術】クロック信号入力を必要とするマイクロ
コンピュータ等の集積回路は、発振回路を外部接続し自
分自身でクロック信号を作成する集積回路、外部からク
ロック信号の供給を受ける集積回路、の2種類に大別さ
れる。前者の集積回路において、RC発振回路は、構成
素子の一部である抵抗を集積回路に内蔵すると共にコン
デンサを集積回路に外部接続するものが多い(前記コン
デンサを集積回路に内蔵する場合もある)。ここで、R
C発振回路の発振周波数は、集積回路の1ロット毎にば
らついており、期待する発振周波数となる様に現状の誤
差を有する発振周波数を調整する必要がある。
2. Description of the Related Art Integrated circuits such as microcomputers that require a clock signal input include an integrated circuit that externally connects an oscillation circuit to generate a clock signal by itself, and an integrated circuit that receives a clock signal from the outside. Broadly classified into types. In the former integrated circuit, in many cases, the RC oscillation circuit has a resistor that is a part of a component incorporated in the integrated circuit and a capacitor externally connected to the integrated circuit (the capacitor may be incorporated in the integrated circuit in some cases). . Where R
The oscillation frequency of the C oscillation circuit varies for each lot of the integrated circuit, and it is necessary to adjust the oscillation frequency having the current error so that the expected oscillation frequency is obtained.

【0003】RC発振回路の発振周波数の調整方法とし
て、(1)コンデンサを可変容量コンデンサ(トリマ
ー)とし、各集積回路毎に、可変容量コンデンサの容量
を調整して期待する発振周波数に合わせ込む方法、
(2)ロット内から代表サンプルを任意選択し、コンデ
ンサの容量を期待する発振周波数となる様に合わせ込
み、当該容量のコンデンサを各集積回路に外部接続する
方法等があり、従来は何れかの方法で対応していた。
As a method of adjusting the oscillation frequency of the RC oscillation circuit, (1) a method in which a capacitor is a variable capacitor (trimmer), and the capacitance of the variable capacitor is adjusted for each integrated circuit to match the expected oscillation frequency. ,
(2) There is a method in which a representative sample is arbitrarily selected from a lot, the capacitance of the capacitor is adjusted so as to have an expected oscillation frequency, and a capacitor having the capacitance is externally connected to each integrated circuit. Was responded in a way.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、調整方
法(1)の場合、各集積回路毎に可変容量コンデンサを
設けてその容量を調整しなければならない為、期待する
発振周波数は得られる様になるが、その反面、手間が掛
かると共にコスト高となる問題がある。また、調整方法
(2)の場合、ロット内の代表サンプルを任意選択する
だけでコンデンサの容量を固定してしまう為、ロット内
で素子特性のバラツキがある場合は、発振周波数が期待
値から外れてしまう問題がある。
However, in the case of the adjusting method (1), an expected oscillation frequency can be obtained because a variable capacitor must be provided for each integrated circuit to adjust the capacitance. On the other hand, however, there is a problem that it takes time and costs. In the case of the adjustment method (2), the capacitance of the capacitor is fixed only by arbitrarily selecting a representative sample in the lot. Therefore, if there is a variation in element characteristics in the lot, the oscillation frequency may be out of the expected value. There is a problem.

【0005】そこで、本発明は、RC発振回路の発振周
波数を容易に調整できる発振回路の周波数調整装置を提
供することを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an oscillation circuit frequency adjusting device capable of easily adjusting the oscillation frequency of an RC oscillation circuit.

【0006】[0006]

【課題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、抵抗及びコンデンサ
から成るRC発振回路の発振出力を使用する集積回路で
あって、前記RC発振回路の発振周波数を調整する装置
において、前記抵抗の抵抗値又は前記コンデンサの容量
の何れか一方を可変とする発振定数調整素子と、前記集
積回路の内部素子のバラツキに起因する前記RC発振回
路の発振周波数の誤差を調整する為の補正データが記憶
されて成る書き換え可能な不揮発性メモリと、通常動作
を実行する為の第1プログラム領域、発振周波数の誤差
を検出する為の第2プログラム領域から成り、リセット
解除後は、前記第2プログラム領域が指定される様に構
成されて成るプログラムメモリと、を備え、前記第2プ
ログラム領域の命令の解読結果に基づき、前記不揮発性
メモリからの補正データに従って前記発振定数調整素子
を制御し、この時の発振周波数が期待する発振周波数と
なるまで前記不揮発性メモリの補正データの書き換えを
繰り返すことを特徴とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and is an integrated circuit using an oscillation output of an RC oscillation circuit comprising a resistor and a capacitor. An apparatus for adjusting an oscillation frequency of an oscillation circuit, comprising: an oscillation constant adjustment element that changes one of a resistance value of the resistor and a capacitance of the capacitor; and the RC oscillation circuit caused by a variation in an internal element of the integrated circuit. Rewritable nonvolatile memory storing correction data for adjusting the oscillation frequency error, a first program area for executing a normal operation, and a second program area for detecting an oscillation frequency error And a program memory configured to specify the second program area after the reset is released. Controlling the oscillation constant adjusting element according to the correction data from the non-volatile memory based on the result of decoding, and repeatedly rewriting the correction data in the non-volatile memory until the oscillation frequency at this time reaches the expected oscillation frequency. Features.

【0007】また、前記発振定数調整素子は、前記抵抗
の抵抗値を調整する複数の発振周波数調整用抵抗であ
り、前記複数の発振周波数調整用抵抗は、前記補正デー
タに従って前記抵抗に選択的に接続されることを特徴と
する。特に、前記複数の発振周波数調整用抵抗は、順
次、2のn乗(n=0、1、2・・・)の抵抗値を有す
ることを特徴とする。
Further, the oscillation constant adjustment element is a plurality of oscillation frequency adjustment resistors for adjusting the resistance value of the resistor, and the plurality of oscillation frequency adjustment resistors are selectively connected to the resistor according to the correction data. It is characterized by being connected. In particular, the plurality of oscillation frequency adjusting resistors sequentially have a resistance value of 2 n (n = 0, 1, 2,...).

【0008】また、前記発振定数調整素子は、前記コン
デンサの容量を調整する複数の発振周波数調整用コンデ
ンサであり、前記複数の発振周波数調整用コンデンサ
は、前記補正データに従って前記コンデンサに選択的に
接続されることを特徴とする。特に、前記複数の発振周
波数調整用コンデンサは、順次、2のn乗(n=0、
1、2・・・)の容量を有することを特徴とする。
Further, the oscillation constant adjustment element is a plurality of oscillation frequency adjustment capacitors for adjusting the capacitance of the capacitor, and the plurality of oscillation frequency adjustment capacitors are selectively connected to the capacitor according to the correction data. It is characterized by being performed. In particular, the plurality of capacitors for adjusting the oscillation frequency are sequentially raised to the power of 2 n (n = 0,
1, 2,...).

【0009】また、前記発振周波数が期待する発振周波
数となった時、前記第2プログラム領域から前記第1プ
ログラム領域へジャンプすることを特徴とする。また、
リセット解除後、前記プログラムメモリの第2プログラ
ム領域の命令を実行するか否かを判断する為のフラグ手
段を設けたことを特徴とする。
Further, when the oscillation frequency reaches an expected oscillation frequency, a jump is made from the second program area to the first program area. Also,
After reset release, a flag means for determining whether or not to execute an instruction in the second program area of the program memory is provided.

【0010】[0010]

【発明の実施の形態】本発明の詳細を図面に従って具体
的に説明する。図1は本発明の発振回路の周波数調整装
置を示す回路ブロック図であり、1チップマイクロコン
ピュータに適用されるものとする。図1において、コン
デンサ(1)は端子(2)(3)と接地との間に外部接
続され、抵抗(4)の一端は端子(2)と接続され、3
段のインバータ(5)(6)(7)から成る直列体の一
端は端子(3)と接続されている。前記コンデンサ
(1)、抵抗(4)及びインバータ(5)(6)(7)
から従来のRC発振回路が構成される。尚、コンデンサ
(1)の容量(例えばpF単位)及び抵抗(4)の抵抗
値(例えばKΩ単位)は、後述する全スイッチ回路が閉
じた状態で、理想状態において期待する発振周波数より
若干高い発振周波数が得られる値に固定されている。
尚、初段のインバータ(5)には、異なる2つのスレッ
ショルド電圧を有する所謂シュミット型が採用され、発
振クロックCLKを得る上でノイズの影響を無視できる
様になっている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The details of the present invention will be specifically described with reference to the drawings. FIG. 1 is a circuit block diagram showing a frequency adjusting device for an oscillation circuit according to the present invention, which is applied to a one-chip microcomputer. In FIG. 1, the capacitor (1) is externally connected between the terminals (2) and (3) and the ground, one end of the resistor (4) is connected to the terminal (2), and
One end of a series body including the inverters (5), (6), and (7) of the stage is connected to the terminal (3). The capacitor (1), the resistor (4) and the inverters (5) (6) (7)
Constitutes a conventional RC oscillation circuit. The capacitance (for example, in pF) of the capacitor (1) and the resistance value (for example, in KΩ) of the resistor (4) are slightly higher than the oscillation frequency expected in an ideal state when all the switch circuits described later are closed. The frequency is fixed at a value that can be obtained.
The first-stage inverter (5) employs a so-called Schmitt type having two different threshold voltages, so that the influence of noise can be ignored in obtaining the oscillation clock CLK.

【0011】発振周波数調整用抵抗(8−1)〜(8−
n)は、抵抗(4)の他端と最終段のインバータ(7)
の出力端子との間に直列接続され、スイッチ回路(9−
1)〜(9−n)は、発振周波数調整用抵抗(8−1)
〜(8−n)に並列接続されている。即ち、発振周波数
調整用抵抗(8−1)〜(8−n)は、スイッチ回路
(9−1)〜(9−n)の開閉に応じて抵抗(4)と直
列接続されるものである。従って、発振周波数調整用抵
抗(8−1)〜(8−n)は、スイッチ回路(9−1)
〜(9−n)の開閉に応じて、前記RC発振回路を構成
する抵抗(4)側の抵抗値を変化させ、RC発振定数を
調整させるものである。抵抗(4)及び発振周波数調整
用抵抗(8−1)〜(8−n)は直列接続される為、単
純な足し算で抵抗(4)側の抵抗値を可変とできる。発
振周波数調整用抵抗(8−1)〜(8−n)の抵抗値
(例えばKΩ単位)は各々2↑0〜2↑(n−1)に設
定される。但し、↑はべき乗を表す。これより、抵抗
(4)側の抵抗値は、スイッチ回路(9−1)〜(9−
n)の開閉の組み合わせに応じて1KΩ単位での調整が
可能となる。
Oscillation frequency adjusting resistors (8-1) to (8-
n) is the other end of the resistor (4) and the final stage inverter (7)
And a switch circuit (9-
1) to (9-n) are oscillation frequency adjustment resistors (8-1)
To (8-n). That is, the oscillation frequency adjusting resistors (8-1) to (8-n) are connected in series with the resistor (4) in accordance with opening and closing of the switch circuits (9-1) to (9-n). . Therefore, the oscillation frequency adjusting resistors (8-1) to (8-n) are connected to the switch circuit (9-1).
The resistance value of the resistor (4) constituting the RC oscillation circuit is changed in accordance with the opening and closing of (9-n) to adjust the RC oscillation constant. Since the resistor (4) and the oscillation frequency adjusting resistors (8-1) to (8-n) are connected in series, the resistance value of the resistor (4) can be made variable by simple addition. The resistance values (for example, in KΩ units) of the oscillation frequency adjusting resistors (8-1) to (8-n) are set to 2 ↑ 0 to 2 ↑ (n-1). Here, ↑ represents a power. From this, the resistance value of the resistor (4) is determined by the switch circuits (9-1) to (9-).
Adjustment in units of 1 KΩ is possible according to the combination of opening and closing of n).

【0012】(10)はデータの書き換えが可能な不揮
発性メモリ(紫外線消去を行うEPROM、電気消去を
行うEEPROM等)であり、スイッチ回路(9−1)
〜(9−n)を開閉制御する為の補正データが書き込ま
れるものである。前記補正データは、期待する発振周波
数と現状の発振周波数との誤差に相当するnビットの2
進データであり、各ビットが個々のスイッチ回路(9−
1)〜(9−n)の開閉制御に対応する。因みに、前記
補正データが論理値「1」の時、対応するスイッチ回路
は閉じ、前記補正データが論理値「0」の時、対応する
スイッチ回路は開くものとする。本発明の実施の形態で
は、不揮発性メモリ(10)の1ワードはnビットとす
る。尚、不揮発性メモリ(10)は、前記補正データを
一旦書き込んでしまえば電源を遮断しても直前の記憶状
態を維持できる為、前記補正データの保持に好適であ
る。また、初期状態では、発振周波数の誤差検出ができ
ない為、不揮発性メモリ(10)には全ビットが論理値
「1」の補正データを初期値として書き込んでおく。
Reference numeral (10) denotes a rewritable nonvolatile memory (an EPROM for erasing ultraviolet rays, an EEPROM for performing electrical erasure, etc.), and a switch circuit (9-1).
To (9-n) are written. The correction data includes n-bit 2 bits corresponding to the error between the expected oscillation frequency and the current oscillation frequency.
Binary data, and each bit is an individual switch circuit (9-
1) to (9-n). Incidentally, when the correction data has a logical value of “1”, the corresponding switch circuit is closed, and when the correction data has a logical value of “0”, the corresponding switch circuit is opened. In the embodiment of the present invention, one word of the nonvolatile memory (10) has n bits. The non-volatile memory (10) is suitable for holding the correction data because once the correction data is written, the storage state immediately before the power supply is shut down can be maintained. Further, in the initial state, since the error of the oscillation frequency cannot be detected, the correction data in which all the bits have the logical value “1” is written as the initial value in the nonvolatile memory (10).

【0013】(11)はROM(プログラムメモリ)で
あり、1チップマイクロコンピュータを動作制御する為
のプログラム命令が予め記憶されたものである。即ち、
ROM(11)は、通常動作を実行する為の命令が記憶
された第1プログラム領域と、RC発振回路の発振周波
数を調整する為の命令が記憶された第2プログラム領域
とに分割されている。さて、不揮発性メモリ(10)
は、ROM(11)の第1又は第2プログラム領域を選
択する為のフラグ領域Fを有する。即ち、1チップマイ
クロコンピュータは、前記フラグ領域Fが論理値「1」
の時はROM(11)の第2プログラム領域の命令を実
行してから第1プログラム領域の命令を実行し、反対
に、前記フラグ領域Fが論理値「0」の時はROM(1
1)の第2プログラム領域の命令を実行せずに第1プロ
グラム領域の命令のみを実行する。
Reference numeral (11) denotes a ROM (program memory) in which program instructions for controlling the operation of the one-chip microcomputer are stored in advance. That is,
The ROM (11) is divided into a first program area in which an instruction for executing a normal operation is stored and a second program area in which an instruction for adjusting the oscillation frequency of the RC oscillation circuit is stored. . Now, the nonvolatile memory (10)
Has a flag area F for selecting the first or second program area of the ROM (11). That is, in the one-chip microcomputer, the flag area F has the logical value “1”.
In the case of (1), the instruction of the second program area of the ROM (11) is executed first, and then the instruction of the first program area is executed.
1) Only the instructions in the first program area are executed without executing the instructions in the second program area.

【0014】さて、電池駆動型の携帯用電子機器に適用
される1チップマイクロコンピュータは、消費電流の低
減を要求される為、消費電流が比較的多いRC発振回路
又はセラミック発振回路の他に、消費電流が比較的少な
い水晶発振回路を内蔵し、用途に応じて両発振回路を使
い分けできる機種が多い。即ち、通常の演算処理を実行
する時はRC発振回又はセラミック発振回路を動作さ
せ、それ以外の計時処理等を実行する時は水晶発振回路
を動作させ、電池の長寿命化を図っている。勿論、RC
発振回路の発振周波数は水晶発振回路の発振周波数より
も高い。本発明の実施の形態における1チップマイクロ
コンピュータは、前記両発振回路を内蔵しているものと
する。
Now, a one-chip microcomputer applied to a battery-operated portable electronic device is required to reduce current consumption. Therefore, in addition to an RC oscillation circuit or a ceramic oscillation circuit, which consumes a relatively large amount of current, Many models have a built-in crystal oscillation circuit that consumes relatively little current and can use both oscillation circuits depending on the application. That is, the RC oscillation circuit or the ceramic oscillation circuit is operated when executing the normal arithmetic processing, and the crystal oscillation circuit is operated when performing other time counting processing, etc., to extend the life of the battery. Of course, RC
The oscillation frequency of the oscillation circuit is higher than the oscillation frequency of the crystal oscillation circuit. It is assumed that the one-chip microcomputer according to the embodiment of the present invention incorporates both of the oscillation circuits.

【0015】(12)はカウンタであり、前記水晶又は
セラミック発振回路の発振出力を所定分周した分周クロ
ックDIVの立ち上がり(又は立ち下がり)が印加され
た時、リセットされると共に発振クロックCLKの計数
を開始し、その直後の分周クロックDIVの立ち上がり
(又は立ち下がり)が印加された時、発振クロックCL
Kの計数動作を停止するものである。即ち、分周クロッ
クDIVの1周期内のカウンタ(12)の計数値と基準
値とを比較することにより、発振クロックCLKの現状
の発振周波数と期待する発振周波数との誤差を検出でき
る。
A counter (12) is reset when the rising (or falling) of the divided clock DIV obtained by dividing the oscillation output of the crystal or ceramic oscillation circuit by a predetermined value, and resets the oscillation clock CLK. When the counting is started and the rising (or falling) of the divided clock DIV immediately thereafter is applied, the oscillation clock CL
The counting operation of K is stopped. That is, by comparing the count value of the counter (12) within one cycle of the divided clock DIV with the reference value, an error between the current oscillation frequency of the oscillation clock CLK and the expected oscillation frequency can be detected.

【0016】以下、図1の動作を図2のフローチャート
を基に説明する。1チップマイクロコンピュータがリセ
ット解除されると、ROM(11)の第2プログラム領
域が指定され、当該第2プログラム領域の命令の解読結
果に従って、RC発振回路の発振周波数を調整する為の
動作が開始される。先ず、不揮発性メモリ(10)のフ
ラグ領域Fの状態を検出する(ステップ)。尚、1チ
ップマイクロコンピュータの出荷時、不揮発性メモリ
(10)のフラグ領域Fには、RC発振回路の発振周波
数の調整動作を実行する為の論理値「1」が記憶されて
いるものとする。フラグ領域Fが論理値「1」の為(ス
テップYES)、RC発振回路の発振周波数の誤差検
出が行われる(ステップ)。即ち、最初の補正データ
は全ビットが論理値「1」である為、スイッチ回路(9
−1)〜(9−n)が閉じ、コンデンサ(1)及び抵抗
(4)から成るRC定数に従って発振クロックCLKが
発生する。当該発振クロックCLKは分周クロックDI
Vの1周期だけカウンタ(12)で計数され、この時の
カウンタ(12)の計数値は基準値と比較される。不揮
発性メモリ(10)の補正データ記憶領域には、カウン
タ(12)の計数値と基準値との差に応じた新たな補正
データが記憶される(ステップ)。そして、ステップ
と同様に、RC発振回路の発振周波数の誤差検出が再
び行われる(ステップ)。即ち、スイッチ回路(9−
1)〜(9−n)の何れかが開き、コンデンサ(1)と
抵抗(4)及び発振周波数調整用抵抗(8−1)〜(8
−n)の何れかとの直列体とから成るRC定数に従って
発振クロックCLKが発生する。当該発振クロックCL
Kは分周クロックDIVの1周期だけカウンタ(12)
で計数され、この時のカウンタ(12)の計数値は基準
値と比較される。前記ステップは、RC発振回路の
現状の発振周波数が期待する発振周波数となるまで繰り
返し実行される(ステップNO)。RC発振回路の発
振周波数が期待する発振周波数となった時(ステップ
YES)、不揮発性メモリ(10)のフラグ領域Fに
は、論理値「0」が記憶される(ステップ)。その後
は、ROM(11)の第1プログラム領域の先頭番地に
ジャンプし、命令の解読結果に従って通常動作が実行さ
れる(ステップ)。即ち、RC発振回路の発振周波数
を調整し終えてしまえば(ステップNO)、その後
は、1チップマイクロコンピュータのリセット解除後で
あっても、ステップ〜を省略でき、無駄な処理を回
避できることになる。これは、不揮発性メモリを使用す
る際の利点である。
The operation of FIG. 1 will be described below with reference to the flowchart of FIG. When the reset of the one-chip microcomputer is released, the second program area of the ROM (11) is designated, and the operation for adjusting the oscillation frequency of the RC oscillation circuit starts according to the result of decoding the instruction in the second program area. Is done. First, the state of the flag area F of the nonvolatile memory (10) is detected (step). When the one-chip microcomputer is shipped, it is assumed that a logic value "1" for executing the operation of adjusting the oscillation frequency of the RC oscillation circuit is stored in the flag area F of the nonvolatile memory (10). . Since the flag area F has the logical value "1" (step YES), an error in the oscillation frequency of the RC oscillation circuit is detected (step). That is, since all bits of the first correction data have the logical value "1", the switch circuit (9
-1) to (9-n) are closed, and the oscillation clock CLK is generated according to the RC constant including the capacitor (1) and the resistor (4). The oscillation clock CLK is a divided clock DI
The counter (12) counts for one cycle of V, and the count value of the counter (12) at this time is compared with a reference value. New correction data corresponding to the difference between the count value of the counter (12) and the reference value is stored in the correction data storage area of the nonvolatile memory (10) (step). Then, similarly to the step, the error detection of the oscillation frequency of the RC oscillation circuit is performed again (step). That is, the switch circuit (9-
One of (1) to (9-n) opens, and the capacitor (1) and the resistor (4) and the oscillation frequency adjusting resistors (8-1) to (8)
-N) The oscillation clock CLK is generated according to the RC constant composed of the series with any one of the above. The oscillation clock CL
K is a counter for one cycle of the divided clock DIV (12)
The count value of the counter (12) at this time is compared with a reference value. The above steps are repeatedly performed until the current oscillation frequency of the RC oscillation circuit reaches the expected oscillation frequency (step NO). When the oscillation frequency of the RC oscillation circuit reaches the expected oscillation frequency (step YES), a logical value “0” is stored in the flag area F of the nonvolatile memory (10) (step). Thereafter, the CPU jumps to the first address of the first program area of the ROM (11), and executes a normal operation according to the result of decoding the instruction (step). That is, once the oscillation frequency of the RC oscillation circuit has been adjusted (step NO), even after the reset of the one-chip microcomputer has been released, steps (1) to (3) can be omitted, and unnecessary processing can be avoided. . This is an advantage when using a non-volatile memory.

【0017】さて、電池駆動型の携帯用電子機器の場
合、電源電圧の経時的変化に伴い、RC発振回路の発振
周波数が変動するが、この変動量が大きい時は、図2の
ステップを削除すればよい。即ち、RC発振回路の発
振周波数の調整が1チップマイクロコンピュータのリセ
ット解除の都度実行され、この結果、RC発振回路の発
振周波数の精度は向上する。
In the case of a battery-operated portable electronic device, the oscillation frequency of the RC oscillation circuit fluctuates with the lapse of time of the power supply voltage. If this fluctuation amount is large, the step shown in FIG. 2 is deleted. do it. That is, the adjustment of the oscillation frequency of the RC oscillation circuit is performed every time the reset of the one-chip microcomputer is released, and as a result, the accuracy of the oscillation frequency of the RC oscillation circuit is improved.

【0018】また、集積回路の内部素子の特性は、周囲
温度変化、浮遊容量等の影響を受けてばらつき易い。即
ち、RC発振回路の発振周波数がばらつき易い。ところ
が、RC発振回路の発振周波数の調整が1チップマイク
ロコンピュータのリセット解除毎に実行される為、周囲
温度に適合したRC発振回路の発振周波数を得ることが
できる。
Further, the characteristics of the internal elements of the integrated circuit tend to fluctuate under the influence of changes in ambient temperature, stray capacitance, and the like. That is, the oscillation frequency of the RC oscillation circuit tends to vary. However, since the adjustment of the oscillation frequency of the RC oscillation circuit is performed every time the reset of the one-chip microcomputer is released, the oscillation frequency of the RC oscillation circuit suitable for the ambient temperature can be obtained.

【0019】尚、RC発振回路を構成する抵抗の抵抗値
を調整する技術について説明したが、これに限定される
ことなく、RC発振回路を構成するコンデンサの容量を
調整する様にしてもよい。図3は本発明における他の実
施の形態であり、図1と同一素子については同一番号を
記し、その説明を省略する。図3において、発振周波数
調整用コンデンサ(13−1)〜(13−n)及びスイ
ッチ回路(14−1)〜(14−n)から成る直列体
は、シュミット型のインバータ(5)の入力端子と接地
との間に並列接続されている。即ち、前記直列体は、ス
イッチ回路(14−1)〜(14−n)の開閉に応じて
RC発振回路のコンデンサ(1)側の容量を変化させ、
発振周波数を調整させるものである。コンデンサ(1)
及び発振周波数調整用コンデンサ(13−1)〜(13
−n)は並列接続される為、単純な足し算でコンデンサ
(1)側の容量を可変とできる。発振周波数調整用コン
デンサ(13−1)〜(13−n)の容量(例えばpF
単位)は各々2↑0〜2↑(n−1)に設定される。こ
れより、コンデンサ(1)側の容量は、スイッチ回路
(14−1)〜(14−n)の開閉の組み合わせに応じ
て1pF単位での調整が可能となる。勿論、スイッチ回
路(14−1)〜(14−n)は不揮発性メモリ(1
0)の補正データに応じて開閉制御される。前記補正デ
ータは、2↑n通り存在する。そして、図3の動作は図
2のフローチャートと同様である。
Although the technique for adjusting the resistance value of the resistor constituting the RC oscillation circuit has been described, the present invention is not limited to this, and the capacitance of the capacitor constituting the RC oscillation circuit may be adjusted. FIG. 3 shows another embodiment of the present invention, in which the same elements as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. In FIG. 3, a series body composed of oscillation frequency adjusting capacitors (13-1) to (13-n) and switch circuits (14-1) to (14-n) is an input terminal of a Schmidt type inverter (5). And ground are connected in parallel. That is, the series body changes the capacitance of the RC oscillation circuit on the capacitor (1) side according to the opening and closing of the switch circuits (14-1) to (14-n).
This is for adjusting the oscillation frequency. Capacitor (1)
And oscillation frequency adjusting capacitors (13-1) to (13).
Since -n) is connected in parallel, the capacitance on the side of the capacitor (1) can be made variable by simple addition. The capacitance (for example, pF) of the oscillation frequency adjusting capacitors (13-1) to (13-n)
Unit) is set to 2 {0} to 2} (n−1). Thus, the capacitance on the side of the capacitor (1) can be adjusted in units of 1 pF according to the combination of opening and closing of the switch circuits (14-1) to (14-n). Of course, the switch circuits (14-1) to (14-n) are provided with the nonvolatile memory (1).
Opening / closing is controlled according to the correction data of 0). There are 2 ↑ n kinds of correction data. The operation of FIG. 3 is the same as that of the flowchart of FIG.

【0020】[0020]

【発明の効果】本発明によれば、不揮発性メモリの補正
データに基づきRC発振回路の現状の発振周波数を期待
する発振周波数に調整することができる。特に、1チッ
プマイクロコンピュータのリセット解除の都度、発振周
波数の調整動作を実行することにより周囲温度に適合し
た精度の高い発振周波数を得ることができる。また、不
揮発性メモリのフラグ領域を利用すれば、発振周波数の
調整終了後は、1チップマイクロコンピュータのリセッ
ト解除後における発振周波数の調整動作を省略でき、直
ちに通常動作に移行できる利点が得られる。
According to the present invention, the current oscillation frequency of the RC oscillation circuit can be adjusted to the expected oscillation frequency based on the correction data in the nonvolatile memory. In particular, each time the reset of the one-chip microcomputer is released, the operation of adjusting the oscillation frequency is performed, so that a highly accurate oscillation frequency suitable for the ambient temperature can be obtained. If the flag area of the non-volatile memory is used, after the adjustment of the oscillation frequency is completed, the operation of adjusting the oscillation frequency after the reset of the one-chip microcomputer is released can be omitted, and there is an advantage that the normal operation can be immediately shifted to.

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

【図1】本発明の発振回路の周波数調整装置の一実施形
態を示す回路ブロック図である。
FIG. 1 is a circuit block diagram showing one embodiment of a frequency adjustment device for an oscillation circuit according to the present invention.

【図2】本発明の動作を示すフローチャートである。FIG. 2 is a flowchart showing the operation of the present invention.

【図3】本発明の発振回路の周波数調整装置の他の実施
形態を示す回路ブロック図である。
FIG. 3 is a circuit block diagram showing another embodiment of the frequency adjusting device of the oscillation circuit of the present invention.

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

(1) コンデンサ (4) 抵抗 (8−1)〜(8−n) 発振周波数調整用抵抗 (9−1)〜(9−n) スイッチ回路 (10) 不揮発性メモリ (11) ROM (12) カウンタ (13−1)〜(13−n) 発振周波数調整用コンデ
ンサ (14−1)〜(14−n) スイッチ回路
(1) Capacitor (4) Resistance (8-1) to (8-n) Oscillation frequency adjustment resistance (9-1) to (9-n) Switch circuit (10) Non-volatile memory (11) ROM (12) Counter (13-1) to (13-n) Oscillation frequency adjusting capacitor (14-1) to (14-n) Switch circuit

フロントページの続き (72)発明者 舘川 克己 大阪府守口市京阪本通2丁目5番5号 三 洋電機株式会社内Continuation of front page (72) Inventor Katsumi Tatekawa 2-5-1-5, Keihanhondori, Moriguchi-shi, Osaka Sanyo Electric Co., Ltd.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 抵抗及びコンデンサから成るRC発振回
路の発振出力を使用する集積回路であって、前記RC発
振回路の発振周波数を調整する装置において、 前記抵抗の抵抗値又は前記コンデンサの容量の何れか一
方を可変とする発振定数調整素子と、 前記集積回路の内部素子のバラツキに起因する前記RC
発振回路の発振周波数の誤差を調整する為の補正データ
が記憶されて成る書き換え可能な不揮発性メモリと、 通常動作を実行する為の第1プログラム領域、発振周波
数の誤差を検出する為の第2プログラム領域から成り、
リセット解除後は、前記第2プログラム領域が指定され
る様に構成されて成るプログラムメモリと、を備え、 前記第2プログラム領域の命令の解読結果に基づき、前
記不揮発性メモリからの補正データに従って前記発振定
数調整素子を制御し、この時の発振周波数が期待する発
振周波数となるまで前記不揮発性メモリの補正データの
書き換えを繰り返すことを特徴とする発振回路の周波数
調整装置。
1. An integrated circuit using an oscillation output of an RC oscillation circuit comprising a resistor and a capacitor, wherein the apparatus adjusts the oscillation frequency of the RC oscillation circuit, wherein any one of a resistance value of the resistor or a capacitance of the capacitor is used. An oscillation constant adjusting element that makes one of them variable, and the RC caused by a variation in an internal element of the integrated circuit.
A rewritable nonvolatile memory storing correction data for adjusting an oscillation frequency error of the oscillation circuit; a first program area for executing a normal operation; and a second program area for detecting an oscillation frequency error. It consists of a program area,
After the reset is released, a program memory configured so that the second program area is designated, and based on a result of decoding the instruction in the second program area, in accordance with correction data from the nonvolatile memory. A frequency adjustment device for an oscillation circuit, characterized by controlling an oscillation constant adjustment element and repeating rewriting of correction data in the nonvolatile memory until the oscillation frequency at this time reaches an expected oscillation frequency.
【請求項2】 前記発振定数調整素子は、前記抵抗の抵
抗値を調整する複数の発振周波数調整用抵抗であり、前
記複数の発振周波数調整用抵抗は、前記補正データに従
って前記抵抗に選択的に接続されることを特徴とする請
求項1記載の発振回路の周波数調整装置。
2. The oscillation constant adjustment element is a plurality of oscillation frequency adjustment resistors for adjusting a resistance value of the resistor, and the plurality of oscillation frequency adjustment resistors are selectively connected to the resistor according to the correction data. The frequency adjusting device for an oscillation circuit according to claim 1, wherein the frequency adjusting device is connected.
【請求項3】 前記発振定数調整素子は、前記コンデン
サの容量を調整する複数の発振周波数調整用コンデンサ
であり、前記複数の発振周波数調整用コンデンサは、前
記補正データに従って前記コンデンサに選択的に接続さ
れることを特徴とする請求項1記載の発振回路の周波数
調整装置。
3. The oscillation constant adjustment element is a plurality of oscillation frequency adjustment capacitors for adjusting the capacitance of the capacitor, and the plurality of oscillation frequency adjustment capacitors are selectively connected to the capacitor according to the correction data. 2. The frequency adjustment device for an oscillation circuit according to claim 1, wherein the frequency adjustment is performed.
【請求項4】 前記発振周波数が期待する発振周波数と
なった時、前記第2プログラム領域から前記第1プログ
ラム領域へジャンプすることを特徴とする請求項1記載
の発振回路の周波数調整装置。
4. The frequency adjustment device for an oscillation circuit according to claim 1, wherein when the oscillation frequency has reached an expected oscillation frequency, the frequency jumps from the second program area to the first program area.
【請求項5】 リセット解除後、前記プログラムメモリ
の第2プログラム領域の命令を実行するか否かを判断す
る為のフラグ手段を設けたことを特徴とする請求項1記
載の発振回路の周波数調整装置。
5. The frequency adjustment of an oscillation circuit according to claim 1, further comprising flag means for judging whether or not to execute an instruction in a second program area of said program memory after reset release. apparatus.
【請求項6】 前記複数の発振周波数調整用抵抗は、順
次、2のn乗(n=0、1、2・・・)の抵抗値を有す
ることを特徴とする請求項2記載の発振回路の周波数調
整装置。
6. The oscillation circuit according to claim 2, wherein the plurality of oscillation frequency adjustment resistors sequentially have a resistance value of 2 n (n = 0, 1, 2,...). Frequency adjustment device.
【請求項7】 前記複数の発振周波数調整用コンデンサ
は、順次、2のn乗(n=0、1、2・・・)の容量を
有することを特徴とする請求項3記載の発振回路の周波
数調整装置。
7. The oscillation circuit according to claim 3, wherein the plurality of oscillation frequency adjustment capacitors sequentially have a capacity of 2 n (n = 0, 1, 2,...). Frequency adjustment device.
JP03197897A 1997-02-17 1997-02-17 Frequency adjustment device for oscillation circuit Expired - Fee Related JP3857762B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03197897A JP3857762B2 (en) 1997-02-17 1997-02-17 Frequency adjustment device for oscillation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03197897A JP3857762B2 (en) 1997-02-17 1997-02-17 Frequency adjustment device for oscillation circuit

Publications (2)

Publication Number Publication Date
JPH10229326A true JPH10229326A (en) 1998-08-25
JP3857762B2 JP3857762B2 (en) 2006-12-13

Family

ID=12346042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03197897A Expired - Fee Related JP3857762B2 (en) 1997-02-17 1997-02-17 Frequency adjustment device for oscillation circuit

Country Status (1)

Country Link
JP (1) JP3857762B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005049970A (en) * 2003-07-30 2005-02-24 Renesas Technology Corp Semiconductor integrated circuit
JP2006039830A (en) * 2004-07-26 2006-02-09 Renesas Technology Corp Semiconductor integrated circuit
KR100868734B1 (en) * 2006-12-15 2008-11-13 신코엠 주식회사 Oscillator in capable of varying oscillating frequency
JP2009271941A (en) * 2009-08-17 2009-11-19 Renesas Technology Corp Semiconductor integrated circuit and microcomputer
KR101051686B1 (en) * 2004-04-27 2011-07-25 매그나칩 반도체 유한회사 Multistage ARC Oscillator and Frequency Tuning Method
JP2011199481A (en) * 2010-03-18 2011-10-06 Renesas Electronics Corp Clock system
JP2012178780A (en) * 2011-02-28 2012-09-13 Seiko Epson Corp Piezoelectric oscillator
JP2015525059A (en) * 2012-08-13 2015-08-27 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Power supply system and method
CN112150962A (en) * 2020-10-23 2020-12-29 维沃移动通信有限公司 Chip clock frequency adjusting method and device, chip and electronic equipment
CN113691255A (en) * 2021-08-31 2021-11-23 广东芯炽集成电路技术有限公司 Configurable oscillator circuit for high-speed analog-to-digital converter

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005049970A (en) * 2003-07-30 2005-02-24 Renesas Technology Corp Semiconductor integrated circuit
US7382681B2 (en) 2003-07-30 2008-06-03 Renesas Technology Corp. Semiconductor integrated circuit
KR101051686B1 (en) * 2004-04-27 2011-07-25 매그나칩 반도체 유한회사 Multistage ARC Oscillator and Frequency Tuning Method
JP2006039830A (en) * 2004-07-26 2006-02-09 Renesas Technology Corp Semiconductor integrated circuit
KR100868734B1 (en) * 2006-12-15 2008-11-13 신코엠 주식회사 Oscillator in capable of varying oscillating frequency
JP2009271941A (en) * 2009-08-17 2009-11-19 Renesas Technology Corp Semiconductor integrated circuit and microcomputer
JP2011199481A (en) * 2010-03-18 2011-10-06 Renesas Electronics Corp Clock system
JP2012178780A (en) * 2011-02-28 2012-09-13 Seiko Epson Corp Piezoelectric oscillator
JP2015525059A (en) * 2012-08-13 2015-08-27 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Power supply system and method
US9413220B2 (en) 2012-08-13 2016-08-09 Northrop Grumman Systems Corporation Power supply systems and methods
US9653982B2 (en) 2012-08-13 2017-05-16 Northrop Grumman Systems Corporation Power supply systems and methods
CN112150962A (en) * 2020-10-23 2020-12-29 维沃移动通信有限公司 Chip clock frequency adjusting method and device, chip and electronic equipment
CN112150962B (en) * 2020-10-23 2024-04-05 维沃移动通信有限公司 Chip clock frequency adjusting method and device, chip and electronic equipment
CN113691255A (en) * 2021-08-31 2021-11-23 广东芯炽集成电路技术有限公司 Configurable oscillator circuit for high-speed analog-to-digital converter

Also Published As

Publication number Publication date
JP3857762B2 (en) 2006-12-13

Similar Documents

Publication Publication Date Title
JP3340373B2 (en) Integrated circuit with programmable internal clock
JP4925621B2 (en) Power supply potential control circuit, semiconductor integrated circuit device, flash memory, and power supply potential adjustment method
US6728891B2 (en) Method and circuit for performing automatic power on reset of an integrated circuit
US8296588B2 (en) Microcontroller and control method therefor
US6952139B2 (en) Oscillator and electronic apparatus using the same
JP3747837B2 (en) Level judgment circuit threshold voltage setting method
US9647670B2 (en) Oscillator with dynamic gain control
US6567763B1 (en) Analog temperature measurement apparatus and method
US6373256B1 (en) Programmable low battery detector
JPH10229326A (en) Frequency adjustment device for oscillation circuit
JPS5945695A (en) Ic memory
JPH10241375A (en) Ferroelectric substance storage device
US9966900B2 (en) Apparatus for oscillator with improved precision and associated methods
JPH10229327A (en) Frequency adjustment device for oscillation circuit
US11520658B2 (en) Non-volatile memory on chip
JP3801247B2 (en) Electrical device restart circuit
JP2009517905A (en) Oscillator including start control device
US6900701B2 (en) Automatic detection, selection and configuration of clock oscillator circuitry
JP4107877B2 (en) Semiconductor nonvolatile memory device
CN111522587A (en) Electronic device and device wake-up method
KR101212607B1 (en) System and method of conditional control of latch circuit devices
CN107196651B (en) On-chip clock calibration method and device applied to F2F decoding chip
JPH10224146A (en) Frequency-adjusting device for oscillator circuit
JP2770314B2 (en) Microcomputer
JPH10224147A (en) Frequency-adjusting device of oscillator circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20031211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050401

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050628

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050825

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050913

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20051014

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060316

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060915

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120922

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130922

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees