JPH06339229A - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JPH06339229A JPH06339229A JP5124308A JP12430893A JPH06339229A JP H06339229 A JPH06339229 A JP H06339229A JP 5124308 A JP5124308 A JP 5124308A JP 12430893 A JP12430893 A JP 12430893A JP H06339229 A JPH06339229 A JP H06339229A
- Authority
- JP
- Japan
- Prior art keywords
- gate
- storage battery
- input
- operational amplifier
- signal
- 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
Links
- 230000003321 amplification Effects 0.000 claims description 8
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 8
- 238000007599 discharging Methods 0.000 abstract description 15
- 230000005540 biological transmission Effects 0.000 description 17
- 238000001514 detection method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000032683 aging Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 1
- 230000002498 deadly effect Effects 0.000 description 1
- 101150015442 ost-1 gene Proteins 0.000 description 1
Landscapes
- Microcomputers (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
- Tests Of Electric Status Of Batteries (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、周辺装置の状態(例え
ば蓄電池の充放電状態)に応じて発生するアナログ信号
の極性を判定し、該周辺装置の状態を正確に知らしめる
ことのできるマイクロコンピュータに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a micro-computer capable of judging the polarity of an analog signal generated according to the state of a peripheral device (for example, the charging / discharging state of a storage battery) and accurately informing the state of the peripheral device. Regarding computers.
【0002】[0002]
【従来の技術】VHS,8mm等の記録方式の携帯用V
TRが発売されて久しいが、これ等の携帯用VTRは商
用電源を直接使用できない為に蓄電池(バッテリー)を
装着して動作する様になっている。この蓄電池は商用電
源と接続することで充電を行い、携帯用VTRと接続す
ることで放電を行う訳であるが、最近では、使用者の使
い勝手を考慮して、蓄電池の充電の状態を複数のLED
を順次点灯させることで確認できる充電機器、及び、蓄
電池の放電の状態を複数のLEDを順次消灯させること
で確認できる機能を備えた携帯用VTR等も存在してい
る。この機能は、反転増幅及び非反転増幅を行う2種類
の演算増幅器と、蓄電池の接地端子と2種類の演算増幅
器の入力端子との間に接続された抵抗と、AD変換器を
含むマイクロコンピュータとを組合せることで実現でき
る。具体的には、蓄電池を商用電源と接続した場合、蓄
電池の正端子から負端子へ充電電流が流れるので、抵抗
の非接地側に負極性のアナログ電圧が現れる。このアナ
ログ電圧は2種類の演算増幅器に印加されるが、一方の
演算増幅器で反転増幅されるだけである。この反転増幅
されたアナログ電圧はマイクロコンピュータに印加さ
れ、極性を判定される他にデジタル変換されて充電経過
時間を示すデジタル情報と積算され、これより極性及び
積算情報を基にLEDを順次消灯させてゆく様にしてい
る。反対に、蓄電池を携帯用VTRと接続した場合、蓄
電池の負端子から正端子側へ放電電流が流れるので、抵
抗の非接地側に正極性のアナログ電圧が現れる。このア
ナログ電圧は2種類の演算増幅器に印加されるが、他方
の演算増幅器で非反転増幅されるだけである。この非反
転増幅されたアナログ電圧はマイクロコンピュータに印
加され、極性を判定される他にデジタル変換されて放電
経過時間を示すデジタル情報と積算され、これより極性
及び積算情報を基に携帯用VTRに設けたLEDを順次
消灯させてゆく様にしている。2. Description of the Related Art Portable V recording system such as VHS, 8 mm
Although it has been a long time since the TR was released, these portable VTRs are equipped with a storage battery (battery) to operate because commercial power sources cannot be used directly. This storage battery is charged by connecting it to a commercial power source, and is discharged by connecting it to a portable VTR. However, recently, in consideration of user's usability, the storage battery is charged in a plurality of charging states. LED
There is also a charging device that can be checked by sequentially turning on, and a portable VTR that has a function of checking the discharge state of a storage battery by sequentially turning off a plurality of LEDs. This function includes two types of operational amplifiers that perform inverting amplification and non-inverting amplification, a resistor connected between the ground terminal of the storage battery and the input terminals of the two types of operational amplifiers, and a microcomputer including an AD converter. It can be realized by combining. Specifically, when the storage battery is connected to a commercial power source, a charging current flows from the positive terminal to the negative terminal of the storage battery, so that a negative analog voltage appears on the non-grounded side of the resistor. This analog voltage is applied to two types of operational amplifiers, but only one of them is inverted and amplified. The inverted and amplified analog voltage is applied to the microcomputer, and the polarity is judged and digitally converted and integrated with the digital information indicating the elapsed charging time. From this, the LEDs are sequentially turned off based on the polarity and the integrated information. I am going to do it. On the contrary, when the storage battery is connected to the portable VTR, a discharge current flows from the negative terminal of the storage battery to the positive terminal side, so that a positive analog voltage appears on the non-grounded side of the resistor. This analog voltage is applied to two types of operational amplifiers, but is only non-inverted and amplified by the other operational amplifier. The non-inverted and amplified analog voltage is applied to a microcomputer, the polarity is determined, and also digitally converted and integrated with digital information indicating the discharge elapsed time. From this, the portable VTR is based on the polarity and the integrated information. It is designed to turn off the provided LEDs in sequence.
【0003】尚、蓄電池を商用電源及び携帯用VTRか
ら取り外した場合、蓄電池の正端子及び負端子の間には
充放電電流が流れないので、抵抗の非接地側に0ボルト
のアナログ電圧が現れる。このアナログ電圧は2種類の
演算増幅器に印加され反転増幅及び非反転増幅される
が、0ボルトのままである。このアナログ電圧はマイク
ロコンピュータに印加され、充放電のないことが判定さ
れ、これよりLEDを現状のまま点灯及び消灯させてお
く様にしている。When the storage battery is removed from the commercial power source and the portable VTR, a charging / discharging current does not flow between the positive terminal and the negative terminal of the storage battery, so that an analog voltage of 0 V appears on the non-grounded side of the resistor. . This analog voltage is applied to two types of operational amplifiers, and is inverted and non-inverted, but remains 0 volt. This analog voltage is applied to the microcomputer, and it is determined that there is no charging / discharging. Therefore, the LED is turned on and off as it is.
【0004】[0004]
【発明が解決しようとする課題】さて、演算増幅器の両
入力端子を同電位とした時の入力差(オフセット電圧)
は、理想状態では0ボルトであるが、現実では、演算増
幅器を形成する素子が温度、電源電圧、経時変化等の要
因を受けてしまい0ボルトにならない。その為、演算増
幅器は、入力電圧にオフセット電圧を加えた状態で演算
増幅してしまい、真の出力電圧を得ることができない。
従って、蓄電池が充電を完了しているにも関わらずLE
Dが1個だけ消灯していたり、或は、蓄電池が放電を完
了しているにも関わらずLEDが1個だけ点灯していた
りする問題があり、使用者が蓄電池の充放電状態を確認
する上で致命的であった。The input difference (offset voltage) when both input terminals of the operational amplifier are set to the same potential.
Is 0 volt in the ideal state, but in reality, the elements forming the operational amplifier are affected by factors such as temperature, power supply voltage, and change over time, and do not reach 0 volt. Therefore, the operational amplifier performs operational amplification in a state in which the offset voltage is added to the input voltage, and the true output voltage cannot be obtained.
Therefore, even though the storage battery is fully charged, the LE
There is a problem that only one D is off, or only one LED is on even though the storage battery has completed discharging, and the user confirms the charge / discharge state of the storage battery. Was deadly on.
【0005】そこで、本発明は、オフセット電圧に対す
る出力電圧が正極性となる演算増幅器を用いて、オフセ
ット電圧を事前に検出することで、蓄電池の急速充電、
普通充電等の状態を正確に判定でき、又、蓄電池の充放
電状態を正確に知らしめることのできるマイクロコンピ
ュータを提供することを目的とする。Therefore, the present invention uses an operational amplifier whose output voltage with respect to the offset voltage has a positive polarity to detect the offset voltage in advance, thereby rapidly charging the storage battery,
It is an object of the present invention to provide a microcomputer capable of accurately determining the state of ordinary charging and the like and accurately informing the charging / discharging state of a storage battery.
【0006】[0006]
【問題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、その特徴とするとこ
ろは、アナログ信号が印加される第1及び第2入力ゲー
トと、基準信号が印加される第1及び第2基準ゲート
と、前記第1入力ゲート及び前記第1基準ゲートを相補
的に導通又は遮断し、且つ、前記第2入力ゲート及び第
2基準ゲートを相補的に導通又は遮断する為の切換デー
タがセットされる入力切換レジスタと、前記第1入力ゲ
ート又は前記第1基準ゲートを通過した信号と前記基準
信号とを比較し、その比較結果を反転増幅する第1演算
増幅器と、前記第2入力ゲート又は前記第2基準ゲート
を通過した信号と前記基準信号とを比較し、その比較結
果を非反転増幅する第2演算増幅器と、前記第1及び第
2演算増幅器の動作電源が印加される第1及び第2スイ
ッチ素子と、前記第1及び第2スイッチ素子を選択的に
導通又は遮断する為の切換データがセットされる電源切
換レジスタと、前記第1及び第2演算増幅器の出力信号
をデジタル信号に変換するAD変換器と、前記第1及び
第2基準ゲートが導通した時の前記第1及び第2演算増
幅器の出力信号を基に、前記第1及び第2入力ゲートが
導通した時の前記第1及び第2演算増幅器の出力信号を
オフセット補正すると共に前記アナログ信号の極性を判
定する制御回路と、を備えた点である。The present invention has been made to solve the above problems, and is characterized in that it has first and second input gates to which an analog signal is applied, The first and second reference gates to which a reference signal is applied and the first input gate and the first reference gate are complementarily conducted or cut off, and the second input gate and the second reference gate are complementary. An input switching register in which switching data for conducting or cutting off is set, a signal that has passed through the first input gate or the first reference gate and the reference signal, and the comparison result is inverted and amplified. One operational amplifier, a second operational amplifier that compares the signal that has passed through the second input gate or the second reference gate with the reference signal, and non-inverts and amplifies the comparison result, and the first and second operations Amplifier operation A first and a second switching element to which a power source is applied, a power supply switching register in which switching data for selectively turning on and off the first and the second switching element is set, and the first and second operations An AD converter for converting the output signal of the amplifier into a digital signal, and the first and second inputs based on the output signals of the first and second operational amplifiers when the first and second reference gates are conducted. And a control circuit for offset-correcting the output signals of the first and second operational amplifiers when the gate is conductive and determining the polarity of the analog signal.
【0007】[0007]
【作用】本発明によれば、第1及び第2演算増幅器の2
入力を同電位とした時の演算増幅出力を予めAD変換し
ておく。その後、第1及び第2演算増幅器にアナログ信
号を印加した時の演算増幅出力をAD変換する。そし
て、前者及び後者のAD変換情報の相対関係を検出して
蓄電池の急速充電、普通充電等の状態を正確に判定して
いる。従って、蓄電池の充放電状態を正確に知らしめる
ことができる。According to the present invention, two of the first and second operational amplifiers are provided.
The operational amplification output when the inputs are at the same potential is AD-converted in advance. After that, the operational amplification output when the analog signal is applied to the first and second operational amplifiers is AD-converted. Then, the relative relationship between the AD conversion information of the former and the latter is detected to accurately determine the states of the rapid charging of the storage battery, the normal charging, and the like. Therefore, the charging / discharging state of the storage battery can be accurately notified.
【0008】[0008]
【実施例】本発明の詳細を図面に従って具体的に説明す
る。図1は本発明のオフセット補償機能を備えたマイク
ロコンピュータを示す図である。尚、図1は、蓄電池の
充電状態に対応して複数のLEDを順次点灯させる充電
機器、又は、蓄電池の放電状態に対応して複数のLED
を順次消灯させる機能を備えた携帯用VTR等に、マイ
クロコンピュータを使用した例である。The details of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a microcomputer having an offset compensation function of the present invention. It should be noted that FIG. 1 shows a charging device that sequentially lights a plurality of LEDs corresponding to the charging state of the storage battery, or a plurality of LEDs corresponding to the discharging state of the storage battery.
In this example, a microcomputer is used for a portable VTR or the like having a function of sequentially turning off the lights.
【0009】図1において、(1)は蓄電池であり、一
端は正の電源端子(2)と接続され、他端は接地され且
つ抵抗(3)を介して負の電源端子(4)と接続されて
いる。即ち、蓄電池(1)は商用電源と接続されて充電
を行い、携帯用VTRと接続されて放電を行う。(5−
1)〜(5−3)はLEDであり、蓄電池(1)の充放
電状態に応じて点灯又は消灯を行うものである。(6)
はスイッチであり、使用者の希望に応じて蓄電池(1)
の非接地側とLED(5−1)〜(5−3)のアノード
側とを接続又は遮断するものである。具体的には、スイ
ッチ(6)の閉成が後述のCPUで検出されると、充放
電の時間経過に応じてLED(5−1)〜(5−3)を
点灯又は消灯する「0」又は「1」の駆動信号が後述の
ドライバーから出力される。一方、スイッチ(6)の開
放がCPUで検出されると、LED(5−1)〜(5−
3)を強制的に消灯する全て「1」の駆動信号がドライ
バーから出力される様になっている。(7)(8)は各
々帰還抵抗及び入力抵抗であり、後述する第1演算増幅
器の利得を決定するものである。同様に、(9)(1
0)も各々帰還抵抗及び入力抵抗であり、後述する第2
演算増幅器の利得を決定するものである。これ等の素子
は後述するマイクロコンピュータに外部接続される。In FIG. 1, (1) is a storage battery, one end of which is connected to a positive power supply terminal (2), the other end of which is grounded and which is connected to a negative power supply terminal (4) via a resistor (3). Has been done. That is, the storage battery (1) is connected to a commercial power source for charging, and connected to a portable VTR for discharging. (5-
1) to (5-3) are LEDs, which are turned on or off according to the charging / discharging state of the storage battery (1). (6)
Is a switch, and a storage battery (1) according to the user's request
This is to connect or disconnect the non-grounded side and the anode side of the LEDs (5-1) to (5-3). Specifically, when the closing of the switch (6) is detected by the CPU (described later), the LEDs (5-1) to (5-3) are turned on or off according to the elapsed time of charging / discharging "0". Alternatively, a drive signal of "1" is output from the driver described later. On the other hand, when the opening of the switch (6) is detected by the CPU, the LEDs (5-1) to (5-
The driver outputs a drive signal of all "1" for forcibly turning off 3). (7) and (8) are a feedback resistance and an input resistance, respectively, which determine the gain of the first operational amplifier described later. Similarly, (9) (1
0) is also a feedback resistance and an input resistance, respectively.
It determines the gain of the operational amplifier. These elements are externally connected to a microcomputer described later.
【0010】一点鎖線の(11)はマイクロコンピュー
タであり、蓄電池(1)の充放電状態に応じてLED
(5−1)〜(5−3)を点灯又は消灯させる機能を備
えたものである。マイクロコンピュータ(11)内部に
おいて、(12)(13)はトランスミッションゲート
(第1及び第2入力ゲート)であり、一端は抵抗(3)
の非接地側と接続されている。同様に、(14)(1
5)もトランスミッションゲート(第1及び第2基準ゲ
ート)であり、一端は接地されている。(16)は反転
増幅を行う演算増幅器(第1演算増幅器)であり、反転
入力端子は帰還抵抗(7)を介して出力端子と接続され
ると共に入力抵抗(8)を介してトランスミッションゲ
ート(12)(14)の他端と接続され、非反転入力端
子は接地されている。同様に、(17)は非反転増幅を
行う演算増幅器(第2演算増幅器)であり、非反転入力
端子はトランスミッションゲート(13)(15)の他
端と接続され、反転入力端子は帰還抵抗(9)を介して
出力端子と接続されると共に入力抵抗(10)を介して
接地されている。(18)(19)はPチャンネル型の
MOSトランジスタ(第1及び第2スイッチ素子)であ
り、ソースドレイン路が電源Vddと演算増幅器(16)
(17)の電源端子との間に介挿されている。(20)
はROMであり、マイクロコンピュータ(11)が演算
処理を行う為のプログラムデータを記憶したものであ
る。(21)(22)はレジスタ(電源切換レジスタ)
であり、インバータ(39)(23)を介してMOSト
ランジスタ(18)(19)のゲートと接続されてい
る。該レジスタ(21)(22)は、ROM(20)の
プログラムデータの解読出力を受けて、MOSトランジ
スタ(18)(19)を選択的に導通又は遮断する為の
切換データがセットされる。同様に、(24)(25)
はレジスタ(入力切換レジスタ)であり、レジスタ(2
4)はトランスミッションゲート(12)の制御端子と
接続されると共にトランスミッションゲート(14)の
制御端子とインバータ(26)を介して接続され、レジ
スタ(25)はトランスミッションゲート(13)の制
御端子と接続されると共にトランスミッションゲート
(15)の制御端子とインバータ(27)を介して接続
されている。該レジスタ(24)(25)は、ROM
(20)のプログラムデータの解読出力を受けて、トラ
ンスミッションゲート(12)(13)を相補的に導通
又は遮断する為の切換データがセットされる。(28)
はAD変換器であり、演算増幅器(16)(17)の増
幅出力を8ビットのデジタル信号に変換するものであ
る。(29)はCPUであり、ROM(20)のプログ
ラムデータの解読出力を受けて、各種論理演算を行うも
のである。(30)はRAMであり、AD変換器(2
8)の変換情報及びCPU(29)の論理演算情報等を
書き込んだり読み出したりするものである。(31)は
ドライバーであり、CPU(29)の論理演算出力を受
けて、LED(5−1)〜(5−3)を点灯又は消灯さ
せるものである。A dot-dash line (11) is a microcomputer, which is an LED according to the charging / discharging state of the storage battery (1).
It has a function of turning on or off (5-1) to (5-3). Inside the microcomputer (11), (12) and (13) are transmission gates (first and second input gates), one end of which is a resistor (3).
Connected to the non-grounded side of. Similarly, (14) (1
5) is also a transmission gate (first and second reference gates), one end of which is grounded. (16) is an operational amplifier (first operational amplifier) for performing inverting amplification, the inverting input terminal is connected to the output terminal via the feedback resistor (7) and the transmission gate (12) is provided via the input resistor (8). ) (14) is connected to the other end, and the non-inverting input terminal is grounded. Similarly, (17) is an operational amplifier (second operational amplifier) that performs non-inverting amplification, the non-inverting input terminal is connected to the other ends of the transmission gates (13) and (15), and the inverting input terminal is a feedback resistor ( It is connected to the output terminal via 9) and is grounded via the input resistor (10). (18) (19) are P-channel type MOS transistors (first and second switch elements), the source / drain path of which is a power supply Vdd and an operational amplifier (16).
It is inserted between the power supply terminal (17) and the power supply terminal. (20)
Is a ROM, which stores program data for the microcomputer (11) to perform arithmetic processing. (21) and (22) are registers (power supply switching registers)
And is connected to the gates of the MOS transistors (18) and (19) through the inverters (39) and (23). The registers (21) and (22) receive the decoding output of the program data of the ROM (20), and the switching data for selectively turning on or off the MOS transistors (18) and (19) are set. Similarly, (24) (25)
Is a register (input switching register), and register (2
4) is connected to the control terminal of the transmission gate (12) and is connected to the control terminal of the transmission gate (14) via the inverter (26), and the register (25) is connected to the control terminal of the transmission gate (13). At the same time, it is connected to the control terminal of the transmission gate (15) through the inverter (27). The registers (24) and (25) are ROM
Upon receiving the decoded output of the program data of (20), the switching data for complementarily turning on or off the transmission gates (12) and (13) is set. (28)
Is an AD converter, which converts the amplified output of the operational amplifiers (16) and (17) into an 8-bit digital signal. Reference numeral (29) denotes a CPU, which receives the decoded output of the program data in the ROM (20) and performs various logical operations. (30) is a RAM, which is an AD converter (2
The conversion information of 8) and the logical operation information of the CPU (29) are written and read. Reference numeral (31) is a driver for turning on or off the LEDs (5-1) to (5-3) in response to the logical operation output of the CPU (29).
【0011】図2はAD変換器(28)の一例として逐
次比較型AD変換器を示す図である。図2において、
(32)は256(=28)本の抵抗であり、電源Vdd
及びアースの間に直列接続されている。(33)はデコ
ーダであり、後述する検出器の出力に応じて、抵抗(3
2)の特定の接続点に現れるアナログ電圧を導出するも
のである。該デコーダ(33)は、マイクロコンピュー
タ(11)がイニシャライズされた時の検出器の出力を
受けて、抵抗(32)の接続中点に現れるVdd/2の基
準電圧を導出する様になっている。(34)(35)は
トランスミッションゲートであり、一端は演算増幅器
(16)(17)の出力端子と接続されている。該トラ
ンスミッションゲート(34)(35)は、ROM(2
0)のプログラムデータの解読出力を受けて、相補的に
導通又は遮断するものである。(36)は比較器であ
り、反転入力端子はデコーダ(33)と接続され、非反
転入力端子はトランスミッションゲート(34)(3
5)の他端と接続されている。(37)は検出器であ
り、比較器(36)の比較出力に応じて、デコーダ(3
3)を制御するものである。(38)は8ビットのシフ
トレジスタであり、比較器(36)から出力される
「0」又は「1」の比較データを最下位ビットから最上
位ビットへ順次シフトするものである。以下、図2の動
作の一例を説明する。FIG. 2 is a diagram showing a successive approximation type AD converter as an example of the AD converter (28). In FIG.
(32) is a resistor of 256 (= 2 8 ) lines and has a power supply Vdd
And grounded in series. Denoted at (33) is a decoder, which has a resistance (3
The analog voltage appearing at the specific connection point of 2) is derived. The decoder (33) receives the output of the detector when the microcomputer (11) is initialized and derives a reference voltage of Vdd / 2 that appears at the connection midpoint of the resistor (32). . (34) and (35) are transmission gates, one end of which is connected to the output terminals of the operational amplifiers (16) and (17). The transmission gates (34) and (35) are connected to the ROM (2
It receives the decoding output of the program data of 0) and complementarily conducts or cuts off. (36) is a comparator, the inverting input terminal of which is connected to the decoder (33), and the non-inverting input terminal of which is the transmission gates (34) (3
5) is connected to the other end. Reference numeral (37) is a detector, which responds to the comparison output of the comparator (36) by a decoder (3
3) is controlled. Reference numeral (38) is an 8-bit shift register for sequentially shifting the comparison data of "0" or "1" output from the comparator (36) from the least significant bit to the most significant bit. Hereinafter, an example of the operation of FIG. 2 will be described.
【0012】初めに、マイクロコンピュータ(11)が
イニシャライズされた後、AD変換動作を行う命令が実
行されると、アナログ電圧及び基準電圧Vdd/2の大小
関係が比較器(36)で比較される。例えば「0」の比
較データが比較器(36)から出力されると、該比較デ
ータはシフトレジスタ(38)の最下位ビットにセット
されると共に検出器(37)に印加され、アナログ電圧
が基準電圧Vdd/2より小さいことを示す検出信号が検
出器(37)から出力される。次に、該検出信号がデコ
ーダ(33)に印加されると、0〜Vdd/2の中間電圧
Vdd/4がデコーダ(33)から導出され、前記アナロ
グ電圧及び基準電圧Vdd/4の大小関係が比較器(3
6)で比較される。例えば「1」の比較データが比較器
(36)から出力されると、該比較データはシフトレジ
スタ(38)の最下位ビットにセットされると共に検出
器(37)に印加され、アナログ電圧が基準電圧Vdd/
4〜Vdd/2の間であることを示す検出信号が検出器
(37)から出力される。この時、始めの「0」の比較
データはシフトレジスタ(38)の最下位ビットから下
位2ビット目へシフトされている。次に、この時の検出
信号がデコーダ(33)に印加されると、Vdd/4〜V
dd/2の中間電圧3Vdd/8がデコーダ(33)から導
出され、前記アナログ電圧及び基準電圧3Vdd/8の大
小関係が比較器(36)で比較される。例えば「0」の
比較データが比較器(36)から出力されると、該比較
データはシフトレジスタ(38)の最下位ビットにセッ
トされると共に検出器(37)に印加され、アナログ電
圧が基準電圧Vdd/4〜3Vdd/8の間であることを示
す検出信号が検出器(37)から出力される。この時、
始めの「0」の比較データはシフトレジスタ(38)の
下位2ビット目から下位3ビット目へシフトされ、その
直後の「1」の比較データはシフトレジスタ(38)の
最下位ビットから下位2ビット目へシフトされている。
以後、この動作を繰り返すことにより、前記アナログ電
圧に対応する8ビットのデジタル信号を発生できる様に
なっている。First, when the microcomputer (11) is initialized and then an instruction to perform an AD conversion operation is executed, the magnitude relationship between the analog voltage and the reference voltage Vdd / 2 is compared by the comparator (36). . For example, when the comparison data of "0" is output from the comparator (36), the comparison data is set to the least significant bit of the shift register (38) and is applied to the detector (37), and the analog voltage is set to the reference voltage. A detection signal indicating that the voltage is smaller than Vdd / 2 is output from the detector (37). Next, when the detection signal is applied to the decoder (33), an intermediate voltage Vdd / 4 of 0 to Vdd / 2 is derived from the decoder (33), and the magnitude relationship between the analog voltage and the reference voltage Vdd / 4 is obtained. Comparator (3
Compared in 6). For example, when the comparison data of "1" is output from the comparator (36), the comparison data is set to the least significant bit of the shift register (38) and is applied to the detector (37), and the analog voltage is set to the reference voltage. Voltage Vdd /
A detection signal indicating that it is between 4 and Vdd / 2 is output from the detector (37). At this time, the comparison data of "0" at the beginning is shifted from the least significant bit of the shift register (38) to the least significant second bit. Next, when the detection signal at this time is applied to the decoder (33), Vdd / 4 to V
The intermediate voltage 3Vdd / 8 of dd / 2 is derived from the decoder (33), and the magnitude relationship between the analog voltage and the reference voltage 3Vdd / 8 is compared by the comparator (36). For example, when the comparison data of "0" is output from the comparator (36), the comparison data is set to the least significant bit of the shift register (38) and is applied to the detector (37), and the analog voltage is set as a reference. A detection signal indicating that the voltage is between Vdd / 4 and 3Vdd / 8 is output from the detector (37). At this time,
The first comparison data of "0" is shifted from the lower 2nd bit to the lower 3rd bit of the shift register (38), and the comparison data of "1" immediately after that is shifted from the least significant bit to the lower 2nd bit of the shift register (38). It has been shifted to the bit position.
After that, by repeating this operation, an 8-bit digital signal corresponding to the analog voltage can be generated.
【0013】以下、図1の動作を説明する。例えば、充
電機器に使用する場合について説明する。まず、充電機
器の電源端子(2)(4)に蓄電池(1)を接続して急
速充電スイッチ(図示せず)を操作し、電源端子(2)
(4)に商用電源を整流した直流電圧を印加する。する
と、蓄電池(1)は急速充電を開始し、その充電電流は
蓄電池(1)の正端子から負端子へ流れると共に抵抗
(3)へも流れる。そして、抵抗(3)の非接地側には
普通充電に比べて低い負極性のアナログ電圧が現れる。
一方、マイクロコンピュータ(11)はイニシャライズ
され、ROM(20)の初期プログラムに従って、以下
の動作が実行される。The operation of FIG. 1 will be described below. For example, the case of using it for a charging device will be described. First, the storage battery (1) is connected to the power supply terminals (2) and (4) of the charging device, and the quick charge switch (not shown) is operated to connect the power supply terminal (2).
A DC voltage obtained by rectifying the commercial power supply is applied to (4). Then, the storage battery (1) starts rapid charging, and its charging current flows from the positive terminal to the negative terminal of the storage battery (1) and also to the resistor (3). Then, on the non-grounded side of the resistor (3), a negative analog voltage lower than that in normal charging appears.
On the other hand, the microcomputer (11) is initialized and the following operations are executed according to the initial program in the ROM (20).
【0014】まず、蓄電池(1)の残電圧に応じた駆動
信号がドライバー(31)から出力され、LED(5−
1)〜(5−3)は蓄電池の残電圧に応じた表示状態と
なっている。この状態で、電源切換レジスタ(21)
(22)に切換データ「1」「0」がセットされ、電源
Vdd及び演算増幅器(16)の電源端子がMOSトラン
ジスタ(18)を介して接続される。同時に、入力切換
レジスタ(24)に切換データ「0」がセットされ、ト
ランスミッションゲート(14)が導通する。即ち、マ
イクロコンピュータ(11)はオフセットモードとな
る。この時、演算増幅器(16)の反転入力端子及び非
反転入力端子が接地され、理想的には演算増幅器(1
6)の出力電圧は0ボルトになる筈であるが、実際には
演算増幅器(16)を形成する素子が特性を変動させる
要因(温度変化、経時変化、電源電圧等)を受ける為
に、オフセットを生じて0ボルトになることはない。そ
の為、演算増幅器(16)はオフセットに応じた正極性
のアナログ電圧を発生する。このアナログ電圧はAD変
換器(28)で8ビットのデジタル信号Dost1に変換さ
れ、RAM(30)の特定アドレスに書き込まれる。そ
の後、電源切換レジスタ(21)(22)の値を変更し
ないで、入力切換レジスタ(24)に切換データ「1」
がセットされ、トランスミッションゲート(12)が導
通する。即ち、マイクロコンピュータ(11)は通常モ
ードとなる。この時、負極性のアナログ電圧は演算増幅
器(16)で帰還抵抗(7)/入力抵抗(8)の利得に
従って反転増幅される。このアナログ電圧はAD変換器
(28)で8ビットのデジタル信号Dopr1に変換され、
RAM(30)の特定アドレスに書き込まれる。そし
て、RAM(30)の特定アドレスからデジタル信号D
ost1及びDopr1が読み出され、オフセットを含まない負
極性のアナログ電圧のみに純粋に対応するデジタル信号
(Dopr1−Dost1)が求められる。CPU(29)はこ
のデジタル信号を基にアナログ電圧が負極性であること
を判定すると共に急速充電を行っていることを確実に検
出できることになる。尚、この場合、電源Vdd及び演算
増幅器(17)の電源端子は遮断されている為、入力切
換レジスタ(25)の切換データは如何なる値でもよ
い。First, a drive signal corresponding to the residual voltage of the storage battery (1) is output from the driver (31) and the LED (5-
1) to (5-3) are displayed according to the remaining voltage of the storage battery. In this state, the power supply switching register (21)
The switching data "1" and "0" are set in (22), and the power supply Vdd and the power supply terminal of the operational amplifier (16) are connected via the MOS transistor (18). At the same time, the switching data "0" is set in the input switching register (24), and the transmission gate (14) becomes conductive. That is, the microcomputer (11) is in the offset mode. At this time, the inverting input terminal and the non-inverting input terminal of the operational amplifier (16) are grounded, and ideally the operational amplifier (1
The output voltage of 6) should be 0 volt, but in reality, the element forming the operational amplifier (16) receives a factor (temperature change, aging change, power supply voltage, etc.) that causes the characteristics to change, and therefore the offset It never occurs to 0 volt. Therefore, the operational amplifier (16) generates a positive analog voltage according to the offset. This analog voltage is converted into an 8-bit digital signal Dost1 by the AD converter (28) and written in a specific address of the RAM (30). Thereafter, without changing the values of the power source switching registers (21) and (22), the switching data "1" is stored in the input switching register (24).
Is set and the transmission gate (12) becomes conductive. That is, the microcomputer (11) is in the normal mode. At this time, the negative analog voltage is inverted and amplified by the operational amplifier (16) according to the gain of the feedback resistor (7) / input resistor (8). This analog voltage is converted into an 8-bit digital signal Dopr1 by the AD converter (28),
It is written to a specific address in the RAM (30). Then, the digital signal D from the specific address of the RAM (30)
ost1 and Dopr1 are read out, and a digital signal (Dopr1-Dost1) that purely corresponds to only the negative-polarity analog voltage that does not include an offset is obtained. Based on this digital signal, the CPU (29) can determine that the analog voltage has a negative polarity and can surely detect that rapid charging is being performed. In this case, since the power supply Vdd and the power supply terminal of the operational amplifier (17) are cut off, the switching data of the input switching register (25) may have any value.
【0015】次に、電源切換レジスタ(21)(22)
に切換データ「0」「1」がセットされ、電源Vdd及び
演算増幅器(17)の電源端子がMOSトランジスタ
(19)を介して接続される。同時に、入力切換レジス
タ(25)に切換データ「0」がセットされ、トランス
ミッションゲート(15)が導通する。即ち、マイクロ
コンピュータ(11)は再びオフセットモードとなる。
この時、演算増幅器(17)の反転入力端子及び非反転
入力端子が接地され、理想的には演算増幅器(17)の
出力電圧は0ボルトになる筈であるが、実際にはオフセ
ットを生じて0ボルトになることはない。その為、演算
増幅器(17)はオフセットに応じた正極性のアナログ
電圧を発生する。このアナログ電圧はAD変換器(2
8)で8ビットのデジタル信号Dost2に変換され、RA
M(30)の特定アドレスに書き込まれる。その後、電
源切り換えレジスタ(21)(22)の値を変更しない
で、入力切換レジスタ(25)に切換データ「1」がセ
ットされ、トランスミッションゲート(13)が導通す
る。即ち、マイクロコンピュータ(11)は通常モード
となる。この時、負極性のアナログ電圧は演算増幅器
(17)の非反転入力端子に印加されるが、反転入力端
子が接地されている為に、0ボルトのアナログ電圧が演
算増幅器(17)から出力される。このアナログ電圧は
AD変換器(28)で8ビットが全て「0」のデジタル
信号Dopr2に変換され、RAM(30)の特定アドレス
に書き込まれる。そして、RAM(30)の特定アドレ
スからデジタル信号Dost2及びDopr2が読み出され、差
信号(Dopr2−Dost2)が求められる。この差信号はオ
フセット電圧に対応するデジタル信号を極性反転しただ
けなので、CPU(29)はこの差信号からもアナログ
電圧が負極性であることを判定できる。尚、この場合、
電源Vdd及び演算増幅器(16)の電源端子は遮断され
ている為、入力切換レジスタ(24)の切換データは如
何なる値でもよい。Next, the power source switching registers (21) and (22)
The switching data "0" and "1" are set to the power supply Vdd and the power supply terminal of the operational amplifier (17) are connected via the MOS transistor (19). At the same time, the switching data “0” is set in the input switching register (25) and the transmission gate (15) is turned on. That is, the microcomputer (11) becomes the offset mode again.
At this time, the inverting input terminal and the non-inverting input terminal of the operational amplifier (17) are grounded, and ideally the output voltage of the operational amplifier (17) should be 0 V, but in reality an offset occurs. It will never go to 0 volts. Therefore, the operational amplifier (17) generates a positive analog voltage according to the offset. This analog voltage is applied to the AD converter (2
In 8), converted to 8-bit digital signal Dost2, RA
It is written to a specific address of M (30). After that, without changing the values of the power supply switching registers (21) and (22), the switching data "1" is set in the input switching register (25) and the transmission gate (13) is turned on. That is, the microcomputer (11) is in the normal mode. At this time, the negative analog voltage is applied to the non-inverting input terminal of the operational amplifier (17), but since the inverting input terminal is grounded, an analog voltage of 0 volt is output from the operational amplifier (17). It This analog voltage is converted by the AD converter (28) into a digital signal Dopr2 of which all 8 bits are "0" and written in a specific address of the RAM (30). Then, the digital signals Dost2 and Dopr2 are read from the specific address of the RAM (30), and the difference signal (Dopr2-Dost2) is obtained. Since this difference signal is only the polarity inversion of the digital signal corresponding to the offset voltage, the CPU (29) can also determine from this difference signal that the analog voltage has a negative polarity. In this case,
Since the power supply Vdd and the power supply terminal of the operational amplifier (16) are cut off, the switching data of the input switching register (24) may have any value.
【0016】そして、蓄電池(1)の充電が継続して行
われると、デジタル信号(Dopr1−Dost1)及び充電経
過時間を示すデジタル信号が積算され、この積算情報に
応じて、ドライバー(31)の出力が「1」から「0」
へ順次変化し、LED(5−1)〜(5−3)が順次点
灯されてゆく。以上より、使用者は蓄電池(1)の充電
状態を確実且つ容易に確認できることになる。Then, when the storage battery (1) is continuously charged, the digital signal (Dopr1-Dost1) and the digital signal indicating the charging elapsed time are integrated, and the driver (31) of the driver (31) is responsive to the integrated information. Output is "1" to "0"
The LEDs (5-1) to (5-3) are sequentially turned on. From the above, the user can surely and easily confirm the state of charge of the storage battery (1).
【0017】尚、図1のマイクロコンピュータを内蔵し
た携帯用VTR等の電源端子(2)(4)に満充電の蓄
電池(1)を接続した場合、蓄電池(1)が放電を開始
し、放電電流が抵抗(3)から蓄電池(1)の負端子を
介して正端子へ流れる為、抵抗(3)の非接地側には正
極性のアナログ電圧が現れる。このアナログ電圧は前述
のオフセットモード及び通常モードを繰り返すことによ
り正極性と判定される。そして、時間経過と共にLED
(5−1)〜(5−3)が順次消灯してゆくことにな
る。When a fully charged storage battery (1) is connected to the power supply terminals (2) and (4) of a portable VTR or the like having the microcomputer shown in FIG. 1, the storage battery (1) starts discharging and discharges. Since a current flows from the resistor (3) to the positive terminal of the storage battery (1) through the negative terminal, a positive analog voltage appears on the non-grounded side of the resistor (3). This analog voltage is determined to be positive by repeating the offset mode and the normal mode described above. And LED over time
(5-1) to (5-3) are sequentially turned off.
【0018】以上より、演算増幅器(16)(17)の
オフセット電圧を検出することで、蓄電池(1)の急速
充電、普通充電等の状態を正確に判定でき、又、蓄電池
(1)の充放電状態をLED(5−1)〜(5−2)等
の表示手段を用いて正確に確認できることになる。From the above, by detecting the offset voltage of the operational amplifiers (16) and (17), the states of the storage battery (1) such as rapid charge and normal charge can be accurately determined, and the charge of the storage battery (1) can be determined. The discharge state can be accurately confirmed by using the display means such as LEDs (5-1) to (5-2).
【0019】[0019]
【発明の効果】本発明によれば、温度変化、経時変化、
電源電圧変動等の要因で変化する第1及び第2演算増幅
器のオフセット電圧を事前に検出し、入力電圧からオフ
セット電圧を減算した真の出力電圧を得ることで、蓄電
池の急速充電、普通充電等の状態を正確に判定でき、
又、蓄電池の充放電状態を正確に知ることのできる利点
が得られる。According to the present invention, temperature change, aging change,
By detecting the offset voltage of the first and second operational amplifiers that change due to factors such as power supply voltage fluctuations in advance and obtaining the true output voltage by subtracting the offset voltage from the input voltage, rapid charging of the storage battery, normal charging, etc. The state of can be accurately determined,
Further, there is an advantage that the charging / discharging state of the storage battery can be accurately known.
【図1】本発明のマイクロコンピュータを示す図であ
る。FIG. 1 is a diagram showing a microcomputer of the present invention.
【図2】図1記載のAD変換器の一例を示す図である。FIG. 2 is a diagram showing an example of an AD converter shown in FIG.
(1) 蓄電池 (11) マイクロコンピュータ (12)(13)(14)(15) トランスミッショ
ンゲート (16)(17) 演算増幅器 (21)(22) 電源切換レジスタ (24)(25) 入力切換レジスタ (28) AD変換器 (29) CPU(1) Storage battery (11) Microcomputer (12) (13) (14) (15) Transmission gate (16) (17) Operational amplifier (21) (22) Power supply switching register (24) (25) Input switching register ( 28) AD converter (29) CPU
Claims (2)
入力ゲートと、 基準信号が印加される第1及び第2基準ゲートと、 前記第1入力ゲート及び前記第1基準ゲートを相補的に
導通又は遮断し、且つ、前記第2入力ゲート及び第2基
準ゲートを相補的に導通又は遮断する為の切換データが
セットされる入力切換レジスタと、 前記第1入力ゲート又は前記第1基準ゲートを通過した
信号と前記基準信号とを比較し、その比較結果を反転増
幅する第1演算増幅器と、 前記第2入力ゲート又は前記第2基準ゲートを通過した
信号と前記基準信号とを比較し、その比較結果を非反転
増幅する第2演算増幅器と、 前記第1及び第2演算増幅器の動作電源が印加される第
1及び第2スイッチ素子と、 前記第1及び第2スイッチ素子を選択的に導通又は遮断
する為の切換データがセットされる電源切換レジスタ
と、 前記第1及び第2演算増幅器の出力信号をデジタル信号
に変換するAD変換器と、 前記第1及び第2基準ゲートが導通した時の前記第1及
び第2演算増幅器の出力信号を基に、前記第1及び第2
入力ゲートが導通した時の前記第1及び第2演算増幅器
の出力信号をオフセット補正すると共に前記アナログ信
号の極性を判定する制御回路と、 を備えたことを特徴とするマイクロコンピュータ。1. A first and a second to which an analog signal is applied
An input gate, first and second reference gates to which a reference signal is applied, the first input gate and the first reference gate are complementarily conducted or cut off, and the second input gate and the second reference gate An input switching register in which switching data for complementarily turning on or off the gate is set, and the signal passed through the first input gate or the first reference gate and the reference signal are compared, and the comparison result is compared. A first operational amplifier that performs inverting amplification; a second operational amplifier that compares the signal that has passed through the second input gate or the second reference gate with the reference signal and non-invertingly amplifies the comparison result; And first and second switch elements to which operating power of the second operational amplifier is applied, and a power source switching register in which switching data for selectively connecting or disconnecting the first and second switch elements is set. An AD converter for converting the output signals of the first and second operational amplifiers into digital signals, and the output signals of the first and second operational amplifiers when the first and second reference gates are conductive. Based on the first and second
A control circuit that offset-corrects the output signals of the first and second operational amplifiers when the input gate is turned on and determines the polarity of the analog signal.
ナログ電圧を前記第1及び第2入力ゲートに印加し、前
記アナログ電圧の極性を判定することで前記蓄電池の充
放電状態を検出することを特徴とする請求項1記載のマ
イクロコンピュータ。2. A charge / discharge state of the storage battery is detected by applying analog voltages having different polarities to the first and second input gates according to charge / discharge of the storage battery and determining the polarity of the analog voltage. The microcomputer according to claim 1, characterized in that:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP12430893A JP3182253B2 (en) | 1993-05-26 | 1993-05-26 | Microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP12430893A JP3182253B2 (en) | 1993-05-26 | 1993-05-26 | Microcomputer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06339229A true JPH06339229A (en) | 1994-12-06 |
| JP3182253B2 JP3182253B2 (en) | 2001-07-03 |
Family
ID=14882122
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP12430893A Expired - Fee Related JP3182253B2 (en) | 1993-05-26 | 1993-05-26 | Microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3182253B2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010063264A (en) * | 2008-09-03 | 2010-03-18 | Fdk Corp | Voltage balance correcting circuit of serial storage cell |
| JP2013218880A (en) * | 2012-04-09 | 2013-10-24 | Mitsubishi Motors Corp | Residual quantity detection unit |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106463975B (en) | 2014-06-30 | 2019-02-26 | 惠普发展公司,有限责任合伙企业 | Cancel the voltage offset of the op amp |
-
1993
- 1993-05-26 JP JP12430893A patent/JP3182253B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010063264A (en) * | 2008-09-03 | 2010-03-18 | Fdk Corp | Voltage balance correcting circuit of serial storage cell |
| JP2013218880A (en) * | 2012-04-09 | 2013-10-24 | Mitsubishi Motors Corp | Residual quantity detection unit |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3182253B2 (en) | 2001-07-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2586722B2 (en) | Semiconductor storage device | |
| EP0238283B1 (en) | High voltage detecting circuit | |
| EP0434090B1 (en) | C-MOS differential sense amplifier | |
| JP3429917B2 (en) | Power supply monitoring circuit | |
| US6982559B2 (en) | Accurate and efficient sensing circuit and method for bi-directional signals | |
| US5262705A (en) | IC device for drive control of small hard disk drive unit | |
| JPH06339229A (en) | Microcomputer | |
| US8125572B2 (en) | System and method for automatic power-up and power-down of an output video circuit | |
| US4879669A (en) | Sensor signal processor | |
| JPS6260851B2 (en) | ||
| JPH06104711A (en) | Load detecting circuit | |
| JPH06325189A (en) | Microcomputer | |
| KR930008870A (en) | Pyrom IC (PROM IC) | |
| JPH10153640A (en) | Semiconductor circuit | |
| JP2001035335A (en) | Relay failure detecting device | |
| JP3077612B2 (en) | Successive approximation A / D converter and test method thereof | |
| JP2869248B2 (en) | A / D converter | |
| JP2692506B2 (en) | Amplitude peak value detector | |
| JPH02119315A (en) | Clock detection circuit | |
| JP3164697B2 (en) | A / D converter | |
| JPH0688955A (en) | Analog liquid crystal display | |
| JPH03185927A (en) | A/D converter | |
| JPH10232383A (en) | Level power source circuit for liquid crystal drive | |
| JP2001016790A (en) | Power cell state detector | |
| JP2000028654A (en) | Low voltage detection circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |