JP2001024486A - Or oscillation circuit - Google Patents

Or oscillation circuit

Info

Publication number
JP2001024486A
JP2001024486A JP11192864A JP19286499A JP2001024486A JP 2001024486 A JP2001024486 A JP 2001024486A JP 11192864 A JP11192864 A JP 11192864A JP 19286499 A JP19286499 A JP 19286499A JP 2001024486 A JP2001024486 A JP 2001024486A
Authority
JP
Japan
Prior art keywords
frequency
oscillation
oscillation circuit
resistance
connection pattern
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
JP11192864A
Other languages
Japanese (ja)
Other versions
JP3614718B2 (en
Inventor
Toshikazu Takenaka
利数 竹中
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.)
Kuroi Electric Co Ltd
Original Assignee
Kuroi 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 Kuroi Electric Co Ltd filed Critical Kuroi Electric Co Ltd
Priority to JP19286499A priority Critical patent/JP3614718B2/en
Publication of JP2001024486A publication Critical patent/JP2001024486A/en
Application granted granted Critical
Publication of JP3614718B2 publication Critical patent/JP3614718B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Inductance-Capacitance Distribution Constants And Capacitance-Resistance Oscillators (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a CR oscillation circuit outputting exact oscillation frequen cies by correcting the state of a port even when the fluctuation of each part is generated. SOLUTION: An R part of a CR oscillating part is constituted by connecting a resistance R0 with each of n+1 resistances R(n)-R(0) having value of r.20-r.2n respectively (R0 and r are prescribed values and n is an integer) in parallel, and the connection pattern of each resistance is set by ports P0-P11 of a microcomputer 2 so that arbitrary frequencies can be oscillated in this CR oscillation circuit. The microcomputer 2 measures oscillation frequencies corresponding to two kinds of resistance connection patterns for turning on/off all the connection states of the resistances R(n)-R(0) by counting a signal of p20, and obtains and sets a resistance connection pattern corresponding to the arbitrary frequencies from the value by interpolation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CR発振回路、例
えば、シュミットインバータICを用いたCR発振回路
に関し、特に、R部に複数の抵抗を並列接続して、各抵
抗の接続パターンを選択することにより任意の周波数を
発振するようにしたCR発振回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CR oscillation circuit, for example, a CR oscillation circuit using a Schmitt inverter IC. More particularly, a plurality of resistors are connected in parallel to an R section to select a connection pattern of each resistor. The present invention relates to a CR oscillation circuit that oscillates an arbitrary frequency.

【0002】[0002]

【従来の技術】CR発振回路には、従来から簡単に構成
できるものとして、図1に示すようなシュミットインバ
ータIC1を用いたものがある。
2. Description of the Related Art A CR oscillation circuit using a Schmitt inverter IC1 as shown in FIG.

【0003】この回路ではコンデンサCや、抵抗Rの値
を変えることにより発振周波数を変えることが出来、通
常は抵抗R1を可変抵抗にして、これを調整することで
発振周波数を設定する。
In this circuit, the oscillation frequency can be changed by changing the values of the capacitor C and the resistor R. Usually, the oscillation frequency is set by making the resistor R1 a variable resistor and adjusting it.

【0004】図2は、シュミットインバータ1にマイコ
ン2を接続して、この制御により発振周波数を変化させ
る回路である。すなわち、CR発振部のR部を抵抗R0
とr・20〜r・2 n (R0とrは所定の値。この例では
n=7)の各値を持つn+1個(この例では8個)の各
抵抗R(7)〜R(0)とを並列接続して構成し、各抵
抗の接続パターンをマイコン2で設定することで任意の
周波数を発振する。
FIG. 2 shows a circuit in which a microcomputer 2 is connected to a Schmitt inverter 1 and the oscillation frequency is changed by this control. That is, the R section of the CR oscillation section is connected to the resistor R0.
And r · 2 0 to r · 2 n (R0 and r are predetermined values; in this example, n = 7), and n + 1 (8 in this example) resistors R (7) to R ( 0) is connected in parallel, and an arbitrary frequency is oscillated by setting the connection pattern of each resistor by the microcomputer 2.

【0005】同図にて、マイコン2のポートP0〜P7
により3state buffer3の導通制御を行う。3state bu
fferが導通しているとき、その3state bufferに接続さ
れる抵抗が抵抗R0に並列接続された状態となる。各抵
抗R(i)は、r・20〜r・2 7 の中のいずれかのr・
2 i の値を持つから、ポートP0〜P7の状態(オンオ
フ状態)の組み合わせにより各抵抗R(7)〜R(0)
の並列回路で256通りの抵抗値(周波数)を設定する
ことが出来る。なお、発振出力はD-Flip-Flop4に入力
され、Duty50%にするために、ここで1/2に分周さ
れる。
In FIG. 1, ports P0 to P7 of the microcomputer 2
Controls the conduction of the 3-state buffer 3. 3state bu
When ffer is conducting, the resistance connected to the three-state buffer is in a state of being connected in parallel with the resistance R0. Each resistor R (i) is one of r · in r · 2 0 ~r · 2 7
Because with a value of 2 i, each resistor by a combination of the state of the port P0 to P7 (OFF state) R (7) ~R (0 )
Can set 256 kinds of resistance values (frequency) in the parallel circuit. Note that the oscillation output is input to the D-Flip-Flop 4 and is divided by こ こ here to make the duty 50%.

【0006】[0006]

【発明が解決しようとする課題】上記のCR発振回路で
は、各抵抗R(i)は、r・20〜r・2 7 の中のいずれ
かのr・2 i の値を持つから、ポートP0〜P7の状態
(オンオフ状態)の組み合わせにより256通りの抵抗
値(周波数)を設定することが出来、ポート数nを増や
すことで、発振周波数をかなり広範囲に設定することが
出来る。ところが、発振周波数は、インバータIC1の
特性、コンデンサC1、抵抗R(n)により決まるた
め、これらの部品のバラツキが大きいと、マイコン側で
設定した発振周波数に対する実際の発振周波数の誤差が
大きくなり、これを防ぐために、組み立て後において、
コンデンサC1や抵抗R(n)の各値を調整することが
必要になるという欠点があった。
In the above CR oscillation circuit INVENTION SUMMARY is], each resistor R (i), since having a value of one of r · 2 i in the r · 2 0 ~r · 2 7 , port 256 kinds of resistance values (frequency) can be set by the combination of the states P0 to P7 (ON / OFF state), and the oscillation frequency can be set in a considerably wide range by increasing the number of ports n. However, since the oscillation frequency is determined by the characteristics of the inverter IC1, the capacitor C1, and the resistor R (n), if the dispersion of these components is large, the error of the actual oscillation frequency with respect to the oscillation frequency set on the microcomputer side increases, To prevent this, after assembly,
There is a disadvantage that it is necessary to adjust each value of the capacitor C1 and the resistance R (n).

【0007】本発明の目的は、各部品にバラツキがあっ
ても、ポートの状態を補正することにより、正確な発振
周波数を出力することが出来るCR発振回路を提供する
ことにある。
An object of the present invention is to provide a CR oscillation circuit that can output an accurate oscillation frequency by correcting the state of a port even if each component has a variation.

【0008】[0008]

【課題を解決するための手段】本発明は、上記の課題を
解決するために以下の構成を備える。
The present invention has the following arrangement to solve the above-mentioned problems.

【0009】(1)CR発振部のR部を抵抗R0とr・
20〜r・2 n (R0とrは所定の値。nは整数)の各値
を持つn+1個の各抵抗R(n)〜R(0)とを並列接
続して構成し、各抵抗の接続パターンを制御部で設定す
ることにより任意の周波数を発振するCR発振回路にお
いて、制御部は、少なくとも2種類の抵抗接続パターン
に対応する発振周波数を計測し、その値から補間により
任意の周波数に対応する抵抗接続パターンを求めて設定
する。
(1) The R section of the CR oscillation section is connected to a resistor R0 and r ·
2 0 ~r · 2 n (R0 and r is a predetermined value .n is an integer) arrangement connected in parallel and with each value of the n + 1 of each resistor R (n) ~R (0) , the resistance In the CR oscillation circuit that oscillates an arbitrary frequency by setting the connection pattern of the control circuit in the CR oscillation circuit, the control section measures the oscillation frequency corresponding to at least two types of resistance connection patterns, and interpolates an arbitrary frequency from the value by interpolation. Find and set the resistor connection pattern corresponding to.

【0010】(2)前記少なくとも2種類の抵抗接続パ
ターンは、抵抗R0に対し、各抵抗R(n)〜R(0)
の接続状態をすべてオフする接続パターンと、すべてオ
ンする接続パターンである。
(2) The at least two types of resistance connection patterns are arranged such that the resistances R (n) to R (0)
A connection pattern that turns off all connection states and a connection pattern that turns on all connection states.

【0011】(3)制御部は、任意の周波数に対応する
抵抗接続パターンを設定した後、該任意の周波数と計測
周波数とを比較して、両者が同じ周波数となるように抵
抗接続パターンを補正する。
(3) After setting the resistance connection pattern corresponding to an arbitrary frequency, the control section compares the arbitrary frequency with the measurement frequency and corrects the resistance connection pattern so that both have the same frequency. I do.

【0012】本発明では、制御部(マイコン)側におい
て、発振周波数を計測する手段を持つ。すなわち、出力
を制御部にフィードバックして周期をカウントし、この
値から実際の発振周波数を知る。この方法により、少な
くとも2種類の抵抗接続パターンを設定して、それぞれ
のパターンでの発振周波数を計測する。
In the present invention, the control section (microcomputer) has means for measuring the oscillation frequency. That is, the output is fed back to the control unit, the cycle is counted, and the actual oscillation frequency is known from this value. By this method, at least two types of resistance connection patterns are set, and the oscillation frequency in each pattern is measured.

【0013】R部は、抵抗R0とr・20〜r・2 n (R
0とrは所定の値。nは整数)の各値を持つn+1個の
各抵抗R(n)〜R(0)との並列接続回路で構成され
るから、R(n)〜R(0)をすべてオフ状態にしたと
きと、すべてオン状態にしたときとの範囲で、並列接続
した合成抵抗の値はリニアに変化する。そこで、この2
種類の抵抗接続パターンによる発振周波数を計測して、
発振周波数と抵抗接続パターンとの関係を示す特性を求
め、この特性から補間により、任意の周波数に対応する
抵抗接続パターンを求める。
[0013] R unit, resistance R0 and r · 2 0 ~r · 2 n (R
0 and r are predetermined values. (n is an integer) and is configured in parallel with n + 1 resistors R (n) to R (0) having respective values, so that when R (n) to R (0) are all turned off, The values of the combined resistors connected in parallel change linearly in the range between when the switch is turned on. So this 2
Oscillation frequency measured by different types of resistor connection patterns,
A characteristic indicating the relationship between the oscillation frequency and the resistance connection pattern is obtained, and a resistance connection pattern corresponding to an arbitrary frequency is obtained from the characteristic by interpolation.

【0014】このような操作により、例えばインバータ
ICの特性バラツキが大きくても、各インバータICを
用いたCR発振回路でのリニアな周波数ー抵抗接続パタ
ーンを個々に求めることが出来るから、それぞれの発振
回路において所望の発振周波数を得ることが出来る。
By such an operation, even if the characteristic variation of the inverter ICs is large, for example, a linear frequency-resistance connection pattern in a CR oscillation circuit using each inverter IC can be individually obtained. A desired oscillation frequency can be obtained in the circuit.

【0015】なお、周波数ー抵抗接続パターンの特性は
リニアであるから、発振周波数を計測する2種類の抵抗
接続パターンは、必ずしも、R(n)〜R(0)をすべ
てオフ状態にしたときと、すべてオン状態にしたときの
2種類にしなくてもよく、任意のパターンであってよ
い。しかし、精度をより高くするために、R(n)〜R
(0)をすべてオフ状態にしたときと、すべてオン状態
にしたときの2種類の抵抗接続パターンで発振周波数を
計測した方がよい。
Since the characteristics of the frequency-resistance connection pattern are linear, the two types of resistance connection patterns for measuring the oscillation frequency are not always required when R (n) to R (0) are all turned off. , And not necessarily two types when all are turned on, and may be an arbitrary pattern. However, for higher accuracy, R (n) -R
It is better to measure the oscillation frequency with two types of resistance connection patterns when (0) is all turned off and when all are turned on.

【0016】本発明では、さらに、発振中において、上
記のようにして設定した任意の周波数に対する抵抗接続
パターンの補正を常時行う。すなわち、設定したパター
ンでの発振周波数を計測して、この計測値と該任意の周
波数とを比較し、両者がほぼ同じ周波数となるようにパ
ターンの補正を行う。
Further, according to the present invention, during oscillation, correction of the resistance connection pattern for an arbitrary frequency set as described above is always performed. That is, the oscillating frequency in the set pattern is measured, the measured value is compared with the arbitrary frequency, and the pattern is corrected so that both have substantially the same frequency.

【0017】発振回路の大きなバラツキ要因に対して
は、請求項1または2の構成で対応し、各抵抗の値の小
さなバラツキ等、回路の小さなバラツキ要因に対して
は、実際に発振動作を行っているときに補正する。発振
動作中常に後者の補正を行うことにより、温度ドリフト
に対しても有効に対応することが出来る。
A large variation factor of the oscillation circuit is dealt with by the configuration of claim 1 or 2, and an oscillation operation is actually performed for a small variation factor of the circuit such as a small variation of each resistor value. Correct when By always performing the latter correction during the oscillation operation, it is possible to effectively cope with temperature drift.

【0018】上記のCR発振回路は、例えば、発振周波
数を可変して調光する事の出来る蛍光ランプ駆動用のハ
ーフブリッジインバータに適用できる。
The CR oscillation circuit described above can be applied to, for example, a half-bridge inverter for driving a fluorescent lamp capable of adjusting the oscillation frequency to adjust the light.

【0019】[0019]

【発明の実施の形態】図3は、本発明の実施形態のCR
発振回路を示す。
FIG. 3 shows a CR according to an embodiment of the present invention.
2 shows an oscillation circuit.

【0020】このCR発振回路は、図2に示す従来の発
振回路に比較してマイコン2の出力ポートをP0〜P1
1としている(n=11)。また、D-Flip-Flop 4に代
えて12-stage-counter5を採用し、1/2分周出力をQ
1に、1/256分周出力をQ9に得るようにしてい
る。このうち、1/256分周出力は、発振周波数を計
測するためにマイコン2のポート20に帰還させる。
The CR oscillation circuit has output ports P0 to P1 of the microcomputer 2 as compared with the conventional oscillation circuit shown in FIG.
1 (n = 11). In addition, 12-stage-counter 5 is adopted in place of D-Flip-Flop 4, and the 1/2 frequency-divided output is Q
1, and a 1/256 frequency-divided output is obtained in Q9. Among them, the 1/256 frequency divided output is fed back to the port 20 of the microcomputer 2 to measure the oscillation frequency.

【0021】以下、上記の発振回路の詳細を説明する。
図1に示すシュミットインバータIC1を用いたCR発
振回路では、発振周波数を次式(1)で求めることが出
来る。
Hereinafter, the details of the above oscillation circuit will be described.
In the CR oscillation circuit using the Schmitt inverter IC1 shown in FIG. 1, the oscillation frequency can be obtained by the following equation (1).

【数1】 ここで、VOH,VOL,VP,VNは、インバータI
Cの特性で、 VOH:Hレベル出力電圧 VOL:Lレベル出力電圧 VP:Hレベル入力しきい値 VN:Lレベル入力しきい値 図3において、マイコン2のポートP0〜P11までの
状態を0から4095までの数値で表現すれば、インバ
ータICの入出力間の抵抗値は、次式で表わすことが出
来る。 R=(2048・r・R0)/(2048・r+n・R0)・・・・(2) n:P0〜P11のポート状態12bitを0〜409
5の数値で表現する。
(Equation 1) Here, VOH, VOL, VP, and VN correspond to the inverter I
In the characteristics of C, VOH: H level output voltage VOL: L level output voltage VP: H level input threshold VN: L level input threshold In FIG. 3, the state of the ports P0 to P11 of the microcomputer 2 is changed from 0 to 0. If expressed by numerical values up to 4095, the resistance between the input and output of the inverter IC can be expressed by the following equation. R = (2048 · r · R0) / (2048 · r + n · R0) (2) n: Port status 12 bits of P0 to P11 are 0 to 409
Expressed by the numerical value of 5.

【0022】よって、抵抗値は、P0〜P11が全てH
レベル、つまりn=4095のとき最小値となり、その
値は、 (2048・r・R0)/(2048・r+4095・
R0) である。また、P0〜P11が全てLレベル、つまりn
=0のとき最大となり、その値はR0である。
Accordingly, the resistance values of P0 to P11 are all H.
Level, that is, the minimum value when n = 4095, and the value is (2048 · r · R0) / (2048 · r + 4095 ·
R0). Also, P0 to P11 are all at L level, that is, n
When = 0, the maximum is reached, and the value is R0.

【0023】ここで、(1)式より、Here, from equation (1),

【数2】 とおくと、 f=k/R・・・・(3) (2)式を代入すると、 f=k(2048・r+n・R0)/(2048・r・R0) =k/R0 + k・n/2048・r a=k/2048・r b=k/R0 とおくと、f=a・n+bとなり、発振周波数は、ポー
トの設定値nに比例することがわかる。ここで、n=
0、および、n=4095の時の発振周波数を、fa、
fbとすると、 a=(fb−fa)/4095, b=fa となる。
(Equation 2) Then, f = k / R (3) By substituting equation (2), f = k (2048 · r + n · R0) / (2048 · r · R0) = k / R0 + kn If / 2048 · ra = k / 2048 · rb = k / R0, then f = a · n + b, and it can be seen that the oscillation frequency is proportional to the set value n of the port. Where n =
The oscillation frequency when 0 and n = 4095 is represented by fa,
If fb, then a = (fb-fa) / 4095 and b = fa.

【0024】fa〜fbの任意の周波数fxを得るため
のポート設定値nは、 n=(fx−b)/a=(fx−fa)・4095/(fb−fa)・・(4) となる。よって、n=0、および、n=4095の時の
発振周波数を得ることができれば、必要な周波数を得る
ためのポート設定値(抵抗接続パターン)nを求めるこ
とが出来る。なお、2種類の発振周波数は、nが0〜4
095の中の任意の値のものであってよい。
The port setting value n for obtaining an arbitrary frequency fx of fa to fb is as follows: n = (fx−b) / a = (fx−fa) · 4095 / (fb−fa) (4) Become. Therefore, if the oscillation frequency when n = 0 and n = 4095 can be obtained, the port set value (resistance connection pattern) n for obtaining the required frequency can be obtained. The two types of oscillation frequencies are such that n is 0 to 4
095.

【0025】次に、マイコン2によりポート設定値nを
求める具体的な計算方法について、図4のフローチャー
トを参照して説明する。
Next, a specific calculation method for obtaining the port set value n by the microcomputer 2 will be described with reference to the flowchart of FIG.

【0026】使用するマイコン2の特性として、動作周
波数を4MHz、1命令の実行サイクルを8クロックと
する。ポートP20には、CR発振出力を1/512分
周した信号が入力される。出力波形は、1/2分周した
ものである。
As a characteristic of the microcomputer 2 used, the operating frequency is 4 MHz, and the execution cycle of one instruction is 8 clocks. A signal obtained by dividing the CR oscillation output by 1/512 is input to the port P20. The output waveform is obtained by dividing the frequency by 1 /.

【0027】ここで、P20に入力される信号を10命
令サイクルずつカウントするカウンタで周期を測定する
と、カウント値は、発振周波数をfxとすると、(51
2/fx)/(10*8/4000000)となり、整
理すると、 Cn=256×105 /fx・・・・・(5) ポート設定値n=0のときの、出力周波数をfa、P2
0による周期のカウント値をCaとし、n=4095の
ときの出力周波数をfb、P20による周期のカウント
値をCbとすると、 fa=256×105 /Ca fb=256×105 /Cb の関係があり、(4)式より
Here, when the period of the signal input to P20 is measured by a counter that counts 10 instruction cycles, the count value is (51) when the oscillation frequency is fx.
2 / fx) / (10 * 8/400000), which can be summarized as follows: Cn = 256 × 10 5 / fx (5) When the port setting value n = 0, the output frequencies are fa and P2.
Assuming that the count value of the cycle based on 0 is Ca, the output frequency when n = 4095 is fb, and the count value of the cycle based on P20 is Cb, the relationship fa = 256 × 10 5 / Ca fb = 256 × 10 5 / Cb From equation (4)

【数3】 ここで、4095≒4096として整理すると、(Equation 3) Here, when rearranging as 4095 ≒ 4096,

【数4】 となる。(Equation 4) Becomes

【0028】今、発振回路から50kHzを30秒間出
力した後、100kHzに変更する場合の動作を考え
る。下記の〜は、図4のフローチャート中の〜
に対応している。なお、フロー中では、PORT12
は、P0〜P11の12ビットのポートを表わし、0〜
4095までの値をとる(各ポートは20 〜211の重み
を持つ)。
Now, let us consider an operation in a case where 50 kHz is output from the oscillation circuit for 30 seconds and then changed to 100 kHz. The following “-” in the flowchart of FIG.
It corresponds to. In the flow, PORT12
Represents a 12-bit port of P0 to P11,
It takes values up to 4095 (each port has a weight of 2 0 to 2 11 ).

【0029】・・ポート設定値n=0のとき(抵抗接
続パターンがR0だけのとき)のP20の信号周期をカ
ウントして、Caを得る。
... When the port setting value n = 0 (when the resistance connection pattern is only R0), the signal cycle of P20 is counted to obtain Ca.

【0030】フロー中では、P20への入力信号の正負
によりP20の信号の立ち上がりと立ち下がりを検出
し、までの操作により1周期をTCNTでカウント
し、これをメモリCAに設定する。
In the flow, the rise and fall of the signal of P20 are detected based on the sign of the input signal to P20, and one cycle is counted by TCNT by the above operations, and this is set in the memory CA.

【0031】・・ポート設定値n=4095のとき
(抵抗接続パターンが全ての抵抗の並列接続のとき)の
P20の信号周期をカウントして、Cbを得る。
... When the port setting value n = 4095 (when the resistance connection patterns are all resistances connected in parallel), the signal cycle of P20 is counted to obtain Cb.

【0032】フロー中では、上記と同様にP20への入
力信号の正負によりP20の信号の立ち上がりと立ち下
がりを検出し、以降のまでの操作により1周期をT
CNTでカウントし、これをメモリCBに設定する。
In the flow, the rise and fall of the signal of P20 are detected based on the sign of the input signal to P20 in the same manner as described above, and one cycle is set to T by the following operations.
The count is performed by CNT, and this is set in the memory CB.

【0033】ここで、出力周波数が50kHzのときの
発振周波数は100kHzであるから、(6)式にfx
=100kHzを代入して、
Here, when the output frequency is 50 kHz, the oscillation frequency is 100 kHz.
= 100 kHz,

【数5】 となる。(Equation 5) Becomes

【0034】・・ここでは、(7)式を計算し、ND
ATAにセットする。
... Here, equation (7) is calculated, and ND
Set to ATA.

【0035】・・・以降のまでは、上記までと
同様にP20の信号周期をカウントして、TCNTにセ
ットし、その値を256と比較する。256の値は、
(5)式より、 (256×105 )/100000=256 で求まる値であって、抵抗等にバラツキが全くない場合
の信号周期カウント値である。この値と実際のTCNT
のカウント値との差は上記バラツキに相当するから、
以下でこの差に基づいてで求めたNDATAの値を補
正する。すなわち、TCNTのカウント値の方が256
より小さければ、出力周波数を小さくするように(周期
を長くするように)NDATA−1を実行してPORT
12にNDATAをセットする。以上の動作により出力
周波数の修正が行われ、且つ、30秒間繰り返し実行さ
れる。
... From then on, the signal cycle of P20 is counted in the same manner as above, set to TCNT, and the value is compared with 256. The value of 256 is
From equation (5), this is a value obtained by (256 × 10 5 ) / 100,000 = 256, and is a signal cycle count value when there is no variation in resistance or the like. This value and the actual TCNT
Since the difference from the count value corresponds to the above variation,
In the following, the value of NDATA obtained on the basis of this difference will be corrected. That is, the count value of TCNT is 256
If smaller, PORT-1 is executed by executing NDATA-1 so as to reduce the output frequency (to increase the cycle).
12 is set to NDATA. The above operation corrects the output frequency, and is repeatedly executed for 30 seconds.

【0036】次に、出力周波数が100kHzのときの
発振周波数は200kHzであるから、(6)式にfx
=200kHzを代入して、
Next, when the output frequency is 100 kHz, the oscillation frequency is 200 kHz.
= 200 kHz,

【数6】 となる。(Equation 6) Becomes

【0037】・・そこで、fx=200kHzとし
て、(8)式を計算し、NDATAにセットする。
... Then, assuming that fx = 200 kHz, equation (8) is calculated and set to NDATA.

【0038】・・・以降のまでは、上記までと
同様にP20の信号周期をカウントして、TCNTにセ
ットし、その値を128と比較する。128の値は、
(5)式より、 (256×105 )/200000=128 で求まる値であって、抵抗等にバラツキが全くない場合
の信号周期カウント値である。この値と実際のTCNT
のカウント値との差は上記バラツキに相当するから、上
記と同様の手順により、以下でこの差に基づいて
で求めたNDATAの値を補正する。
From then on, the signal cycle of P20 is counted in the same manner as described above, set to TCNT, and the value is compared with 128. The value of 128 is
From equation (5), this is a value obtained by (256 × 10 5 ) / 200000 = 128, and is a signal cycle count value when there is no variation in resistance or the like. This value and the actual TCNT
Since the difference from the count value corresponds to the above-described variation, the value of NDATA obtained below based on this difference is corrected by the same procedure as above.

【0039】以上の動作により、50kHzを30秒間
出力した後、100kHzに出力周波数を変更すること
が出来、インバータIC5、3state buffer3、各抵抗
等のバラツキがあっても、正確な周波数を出力すること
が出来る。
With the above operation, after outputting 50 kHz for 30 seconds, the output frequency can be changed to 100 kHz, and an accurate frequency can be output even if there are variations in the inverter IC 5, 3 state buffer 3, each resistor and the like. Can be done.

【0040】なお、上記の処理及び次のステップであ
るPORT12の設定を行わないようにすれば、TCN
Tが128になる迄一つずつカウントアップしていく
か、またはカウントダウンしていくから、スムースな発
振周波数の推移をしたいときに便利である。この例で
は、50kHzから、100kHzへある時間幅で推移
することになる。
If the above process and the setting of the PORT 12, which is the next step, are not performed, the TCN
The count is incremented or decremented one by one until T reaches 128, which is convenient when smooth transition of the oscillation frequency is desired. In this example, the time changes from 50 kHz to 100 kHz with a certain time width.

【0041】図5は、図3のCR発振回路を蛍光ランプ
駆動用ハーフブリッジインバータの発振部に適用したと
きの回路図である。
FIG. 5 is a circuit diagram when the CR oscillation circuit of FIG. 3 is applied to the oscillation section of a half-bridge inverter for driving a fluorescent lamp.

【0042】CR発振回路OSCでスイッチング素子Q
1,Q2を交互にオンオフ駆動することで、蛍光ランプ
FLを点灯することが出来、発振周波数を制御すること
でランプ電流(蛍光ランプの明るさ)を可変できる。C
R発振回路OSCの発振周波数の精度が高いと、明るさ
の可変の精度も高くなり装置間の差がなくなり高品質を
得ることが出来る。また、図4ののステップと次のP
ORT12設定ステップをなくせば、周波数を変えると
きにスムースな明るさの変更が出来る。同様なことは
のステップと次のPORT12設定ステップをなくすこ
とでも実現出来る。この場合は、明るさが0%からの変
更となるから、いわゆるソフトスタート制御が出来るこ
とを意味する。なお、このハーフブリッジインバータ
は、同図に示すように、直列接続した2つのスイチング
素子Q1,Q2の接続点を共振用リアクトルL1と蛍光
ランプFLの直列回路に接続し、フィラメント間に予熱
用コンデンサC2を接続して構成したものである。
Switching element Q in CR oscillation circuit OSC
The fluorescent lamp FL can be turned on by alternately turning on and off 1 and Q2, and the lamp current (brightness of the fluorescent lamp) can be varied by controlling the oscillation frequency. C
When the accuracy of the oscillation frequency of the R oscillation circuit OSC is high, the accuracy of variable brightness is also high, and there is no difference between devices, and high quality can be obtained. In addition, the step of FIG.
By eliminating the ORT 12 setting step, it is possible to smoothly change the brightness when changing the frequency. The same can be realized by eliminating the step and the next PORT12 setting step. In this case, since the brightness is changed from 0%, it means that so-called soft start control can be performed. In this half-bridge inverter, as shown in the figure, a connection point of two switching elements Q1 and Q2 connected in series is connected to a series circuit of a resonance reactor L1 and a fluorescent lamp FL, and a preheating capacitor is provided between filaments. It is configured by connecting C2.

【0043】[0043]

【発明の効果】本発明によれば、発振回路を構成するイ
ンバータICの特性や、抵抗、その他の素子のバラツキ
があっても、正確な発振周波数を出力することが出来、
また、発振後において、温度ドリフト等の特性変化が生
じても、常に正しい周波数となるように補正される。
According to the present invention, an accurate oscillation frequency can be output even if there are variations in the characteristics of the inverter IC constituting the oscillation circuit, the resistance, and other elements.
Further, even after a characteristic change such as a temperature drift occurs after the oscillation, the frequency is corrected so as to always have a correct frequency.

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

【図1】シュミットインバータICを用いた基本CR発
振回路の回路図
FIG. 1 is a circuit diagram of a basic CR oscillation circuit using a Schmitt inverter IC.

【図2】マイコンを用いた従来のCR発振回路の回路図FIG. 2 is a circuit diagram of a conventional CR oscillation circuit using a microcomputer.

【図3】本発明の実施形態のマイコンを用いたCR発振
回路の回路図
FIG. 3 is a circuit diagram of a CR oscillation circuit using a microcomputer according to an embodiment of the present invention.

【図4】発振周波数の制御動作を示すフローチャートFIG. 4 is a flowchart showing an operation of controlling an oscillation frequency.

【図5】本発明のCR発振回路を用いた蛍光ランプ駆動
用ハーフブリッジインバータの回路図
FIG. 5 is a circuit diagram of a half-bridge inverter for driving a fluorescent lamp using the CR oscillation circuit of the present invention.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 CR発振部のR部を抵抗R0とr・20
r・2 n (R0とrは所定の値。nは整数)の各値を持
つn+1個の各抵抗R(n)〜R(0)とを並列接続し
て構成し、各抵抗の接続パターンを制御部で設定するこ
とにより任意の周波数を発振するCR発振回路におい
て、 制御部は、少なくとも2種類の抵抗接続パターンに対応
する発振周波数を計測し、その値から補間により任意の
周波数に対応する抵抗接続パターンを求めて設定するこ
とを特徴とするCR発振回路。
1. A resistor R portion of the CR oscillating section R0 and r · 2 0 ~
r · 2 n (where R0 and r are predetermined values, n is an integer) and are connected in parallel with (n + 1) resistors R (n) to R (0) having respective values, and a connection pattern of the resistors In a CR oscillation circuit that oscillates an arbitrary frequency by setting in the control unit, the control unit measures the oscillating frequency corresponding to at least two types of resistance connection patterns, and interpolates from the value to the arbitrary frequency by interpolation. A CR oscillation circuit wherein a resistor connection pattern is obtained and set.
【請求項2】 前記少なくとも2種類の抵抗接続パター
ンは、抵抗R0に対し、各抵抗R(n)〜R(0)の接
続状態をすべてオフする接続パターンと、すべてオンす
る接続パターンである、請求項1記載のCR発振回路。
2. The at least two types of resistance connection patterns are a connection pattern that turns off all the connection states of the resistors R (n) to R (0) and a connection pattern that turns on all of the resistances R0. The CR oscillation circuit according to claim 1.
【請求項3】 制御部は、任意の周波数に対応する抵抗
接続パターンを設定した後、該任意の周波数と計測周波
数とを比較して、両者がほぼ同じ周波数となるように抵
抗接続パターンを補正することを特徴とする、請求項1
または2記載のCR発振回路。
3. The control unit sets a resistance connection pattern corresponding to an arbitrary frequency, compares the arbitrary frequency with a measurement frequency, and corrects the resistance connection pattern so that both have substantially the same frequency. 2. The method according to claim 1, wherein
Or the CR oscillation circuit according to 2.
【請求項4】 請求項1〜3のいずれかのCR発振回路
と、任意の発振周波数を入力する入力部と、該発振回路
により交互にスイッチングされる直列接続した2つのス
イッチング素子と、を備え、前記2つのスイッチング素
子の接続点を共振用リアクトルと蛍光ランプとの直列回
路に接続して、正弦波状の電流を蛍光ランプに供給す
る、蛍光ランプ駆動用ハーフブリッジインバータ。
4. The CR oscillation circuit according to claim 1, further comprising: an input section for inputting an arbitrary oscillation frequency; and two switching elements connected in series which are alternately switched by the oscillation circuit. A half bridge inverter for driving a fluorescent lamp, wherein a connection point of the two switching elements is connected to a series circuit of a resonance reactor and a fluorescent lamp to supply a sinusoidal current to the fluorescent lamp.
JP19286499A 1999-07-07 1999-07-07 CR oscillation circuit Expired - Fee Related JP3614718B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19286499A JP3614718B2 (en) 1999-07-07 1999-07-07 CR oscillation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19286499A JP3614718B2 (en) 1999-07-07 1999-07-07 CR oscillation circuit

Publications (2)

Publication Number Publication Date
JP2001024486A true JP2001024486A (en) 2001-01-26
JP3614718B2 JP3614718B2 (en) 2005-01-26

Family

ID=16298252

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19286499A Expired - Fee Related JP3614718B2 (en) 1999-07-07 1999-07-07 CR oscillation circuit

Country Status (1)

Country Link
JP (1) JP3614718B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356719B2 (en) 2005-02-28 2008-04-08 Denso Corporation Microcomputer
US7554415B2 (en) 2006-01-17 2009-06-30 Denso Corporation Microcomputer including a CR oscillator circuit
JP2012186656A (en) * 2011-03-04 2012-09-27 Korg Inc Voltage-controlled oscillator with compensation function and electronic keyboard music instrument using the same
JP2019012944A (en) * 2017-06-30 2019-01-24 株式会社デンソー Clock signal generation circuit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356719B2 (en) 2005-02-28 2008-04-08 Denso Corporation Microcomputer
US7554415B2 (en) 2006-01-17 2009-06-30 Denso Corporation Microcomputer including a CR oscillator circuit
JP2012186656A (en) * 2011-03-04 2012-09-27 Korg Inc Voltage-controlled oscillator with compensation function and electronic keyboard music instrument using the same
JP2019012944A (en) * 2017-06-30 2019-01-24 株式会社デンソー Clock signal generation circuit

Also Published As

Publication number Publication date
JP3614718B2 (en) 2005-01-26

Similar Documents

Publication Publication Date Title
TWI504315B (en) High resolution pulse width modulation (pwm) frequency control using a tunable oscillator
JP2001024486A (en) Or oscillation circuit
TWI517552B (en) Circuit and method for calibrating oscillator and corresponding integrated circuit
JP3185425B2 (en) Inverter device
JPH0778696A (en) Discharge lamp lighting circuit
US8531122B2 (en) Circuit arrangement and method for operation of a discharge lamp
CN101340190B (en) Semiconductor integrated circuit and method of testing same
JP4938873B2 (en) Voltage controlled oscillator
JP2009545284A (en) Power supply with binary controller and binary controller
US6933682B2 (en) Method for operating fluorescent lamps and ballast
EP3644511B1 (en) Oscillation sensor with calibration unit and measurement device
JP4621013B2 (en) Inverter control device
JP2013516727A (en) Device for driving a gas discharge lamp
JP5950350B2 (en) DC / DC converter
TWI431942B (en) Pulse width modulation driving ic and pulse width modulation output signal generating method
CN108521229A (en) A kind of high-precision pwm signal modulator approach and its modulating device, supply unit
JP3943727B2 (en) Environmental measurement equipment
US6777921B2 (en) Analog filter with built-in self test
KR20070003284A (en) Control circuit of voltage control oscillator which has prescribed operational frequency
JPH05233091A (en) Clock generating circuit
JP2000206273A (en) Timer device
JP6539100B2 (en) Power supply control device for vehicle
KR20130000264U (en) Circuit assembly for operating at least one discharge lamp
JPS6142165Y2 (en)
KR960007569B1 (en) Switching control circuit of inverter of d-type zero vtg switching

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040517

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041019

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041027

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20091112

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees