JPH05122078A - A/d converting method by use of microcomputer - Google Patents

A/d converting method by use of microcomputer

Info

Publication number
JPH05122078A
JPH05122078A JP3279441A JP27944191A JPH05122078A JP H05122078 A JPH05122078 A JP H05122078A JP 3279441 A JP3279441 A JP 3279441A JP 27944191 A JP27944191 A JP 27944191A JP H05122078 A JPH05122078 A JP H05122078A
Authority
JP
Japan
Prior art keywords
converter
microcomputer
comparator
voltage
integrator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3279441A
Other languages
Japanese (ja)
Inventor
Kazuo Miyata
一雄 宮田
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.)
NEC IC Microcomputer Systems Co Ltd
Original Assignee
NEC IC Microcomputer Systems 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 NEC IC Microcomputer Systems Co Ltd filed Critical NEC IC Microcomputer Systems Co Ltd
Priority to JP3279441A priority Critical patent/JPH05122078A/en
Publication of JPH05122078A publication Critical patent/JPH05122078A/en
Pending legal-status Critical Current

Links

Landscapes

  • Analogue/Digital Conversion (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To unnecessitate an expensive A/D converter and to enable A/D converting even with a microcomputer without a dedicated terminal such as a serial input, etc., by using a general purpose input port and an easy V-F converting circuit. CONSTITUTION:A system consists of a V-F converter 1 converting an analog signal Vin into a pulse having a frequency corresponding to an input voltage and the microcomputer 2 which measures pulse width outputted from the V-F converter 1 and also converts it into digital data so as to execute an processing. The V-F converter 1 is provided with a integrator 3, a comparator 4, resistors R1-R5, a capacitor C and a transistor TR. The integrator 3 outputs the triangle wave of the frequency being proportional to the Vin voltage and the comparator 4 reshapes it to be a square wave. The output of the comparator 4 inverts a polarity by the transistor TR so as to feed it back to the integrator 3. The microcomputer 2 can obtain the input voltage of Vin by measuring pulse width outputted from the V-F converter 1.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はA/D変換方法に関し、
特にマイクロコンピュータによるA/D変換方法に関す
る。
The present invention relates to an A / D conversion method,
In particular, it relates to an A / D conversion method by a microcomputer.

【0002】[0002]

【従来の技術】従来のマイクロコンピュータによるA/
D変換方法は、電圧・周波数変換(以下、V−F変換器
と称す)型や無帰還比較型等の外付けまたは内蔵のA/
D変換器によリアナログ信号をデジタルデータに変換
し、そのシリアルまたはパラレルのデータを内部データ
に変換してから処理を行っている。
2. Description of the Related Art A / by a conventional microcomputer
The D conversion method is a voltage / frequency conversion (hereinafter referred to as VF converter) type or non-feedback comparison type external or built-in A /
The D converter converts the analog signal into digital data and converts the serial or parallel data into internal data before processing.

【0003】図3は従来のA/D変換方法を説明するた
めのA/D変換器とマイクロコンピュータのブロック図
である。図3に示すように、従来のかかるA/D変換方
法は、アナログ信号をシリアルデータに変換するA/D
変換器5と、このA/D変換器5からのシリアルデータ
をデジタルデータに変換して処理を行うマイクロコンピ
ュータ2aとを有している。しかも、A/D変換器5
は、アナログ信号Vinを入力し且つこのVinの電圧
に応じた周波数の三角波を出力する積分器3や抵抗R
1,R2およびコンデンサCからなる積分回路6と、こ
の積分器3から出力された三角波から方形波を出力する
比較器4と、比較器4からの方形波とクロック発生回路
11から出力される信号に同期させてスイッチを開閉す
るタイミング制御回路7と、タイミング制御回路7から
出力されるパルスを計測するパルス計測回路9と、この
パルス計測回路9で計測した結果をシリアルデータとし
て出力するデータ転送回路10とを有している。
FIG. 3 is a block diagram of an A / D converter and a microcomputer for explaining a conventional A / D conversion method. As shown in FIG. 3, the conventional A / D conversion method is an A / D that converts an analog signal into serial data.
It has a converter 5 and a microcomputer 2a for converting the serial data from the A / D converter 5 into digital data for processing. Moreover, the A / D converter 5
Is an integrator 3 for inputting an analog signal Vin and outputting a triangular wave having a frequency corresponding to the voltage of Vin, and a resistor R.
1 and R2 and a capacitor C, a comparator 4 that outputs a square wave from the triangular wave output from the integrator 3, a square wave from the comparator 4, and a signal output from the clock generation circuit 11. A timing control circuit 7 for opening and closing a switch in synchronization with a pulse measurement circuit 9 for measuring a pulse output from the timing control circuit 7, and a data transfer circuit for outputting a result measured by the pulse measurement circuit 9 as serial data. 10 and 10.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のマイク
ロコンピュータによるA/D変換方法は、A/D変換器
またはA/D変換器を内蔵したマイクロコンピュータを
使用しているため、システムとして高価になる。また、
A/D変換器を内蔵しない場合は、A/D変換器からデ
ータを受信するためのシリアル入力等の専用端子が必要
となるため、専用端子を持たないマイクロコンピュータ
では使用できないという欠点がある。
The above-described conventional A / D conversion method by the microcomputer uses the A / D converter or the microcomputer with the built-in A / D converter, which makes the system expensive. Become. Also,
If the A / D converter is not built-in, a dedicated terminal for serial input or the like for receiving data from the A / D converter is required, so that it cannot be used in a microcomputer without a dedicated terminal.

【0005】本発明の目的は、高価なA/D変換器を必
要とせずに、専用端子を持たないマイクロコンピュータ
でも可能なマイクロコンピュータによるA/D変換方法
を提供することにある。
An object of the present invention is to provide an A / D conversion method by a microcomputer which does not require an expensive A / D converter and can be used by a microcomputer having no dedicated terminal.

【0006】[0006]

【課題を解決するための手段】本発明のマイクロコンピ
ュータによるA/D変換方法は、アナログ信号を入力し
てその電圧に応じた周波数の方形波を出力する電圧・周
波数変換器と、前記電圧・周波数変換器の方形波出力を
入力して周波数を計測しデジタルデータに変換するとと
もに処理を行うマイクロコンピュータとを有して構成さ
れる。
An A / D conversion method by a microcomputer of the present invention is a voltage / frequency converter for inputting an analog signal and outputting a square wave having a frequency corresponding to the voltage, and the voltage / frequency converter. A square wave output of a frequency converter is input, a frequency is measured, the frequency is converted into digital data, and a microcomputer is provided for processing.

【0007】[0007]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0008】図1は本発明の一実施例を説明するための
V−F変換器とマイクロコンピュータのブロック図であ
る。図1に示すように、本実施例はアナログ信号Vin
を入力電圧に応じた周波数のパルスに変換するV−F変
換器1と、このV−F変換器1から出力されるパルス幅
を計測し且つデジタルデータに変換して処理を行うマイ
クロコンピュータ2とを有する。このV−F変換器1は
積分器3と比較器4および抵抗R1〜R5,コンデンサ
C,トランジスタTRとを有する。積分器3からVin
電圧に比例した周波数の三角波を出力し、比較器4で方
形波に整形する。また、比較器4の出力はトランジスタ
TRによる極性を反転して積分器3にフィードバックす
る。同様に、比較器4の出力は抵抗R5を介し比較器4
の+側に入力される。マイクロコンピュータ2は、この
F−V変換器1より出力されるパルス幅を計測すること
によりVinの入力電圧を求めることができる。
FIG. 1 is a block diagram of a VF converter and a microcomputer for explaining an embodiment of the present invention. As shown in FIG. 1, this embodiment uses the analog signal Vin.
A V-F converter 1 for converting the pulse into a pulse having a frequency corresponding to an input voltage, and a microcomputer 2 for measuring the pulse width output from the V-F converter 1 and converting the pulse width into digital data for processing. Have. The VF converter 1 has an integrator 3, a comparator 4, resistors R1 to R5, a capacitor C, and a transistor TR. From integrator 3 to Vin
A triangular wave having a frequency proportional to the voltage is output, and the comparator 4 shapes the square wave. Further, the output of the comparator 4 inverts the polarity of the transistor TR and feeds it back to the integrator 3. Similarly, the output of the comparator 4 is transmitted through the resistor R5 to the comparator 4
Is input to the + side of. The microcomputer 2 can obtain the Vin input voltage by measuring the pulse width output from the FV converter 1.

【0009】図2は図1における入出力電圧の波形図で
ある。図2に示すように、アナログ入力電圧VinはV
−F変換器1でパルス出力Voutのように変換され
る。
FIG. 2 is a waveform diagram of the input / output voltage in FIG. As shown in FIG. 2, the analog input voltage Vin is V
It is converted by the −F converter 1 like the pulse output Vout.

【0010】[0010]

【発明の効果】以上説明したように、本発明のマイクロ
コンピュータによるA/D変換方法は、汎用入力ポート
と簡易V−F変換回路を用いることにより、高価なA/
D変換器を必要とせず、またシリアル入力等の専用端子
を持たないマイクロコンピュータでもA/D変換を可能
とする効果がある。
As described above, the microcomputer A / D conversion method of the present invention uses an expensive A / D conversion circuit by using a general-purpose input port and a simple VF conversion circuit.
There is an effect that A / D conversion can be performed even in a microcomputer that does not require a D converter and does not have a dedicated terminal for serial input or the like.

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

【図1】本発明の一実施例を説明するためのV−F変換
器とマイクロコンピュータのブック図である。
FIG. 1 is a book diagram of a VF converter and a microcomputer for explaining an embodiment of the present invention.

【図2】図1における入出力電圧の波形図である。FIG. 2 is a waveform diagram of input / output voltages in FIG.

【図3】従来の一例を説明するためのA/D変換器とマ
イクロコンピュータのブロック図である。
FIG. 3 is a block diagram of an A / D converter and a microcomputer for explaining a conventional example.

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

1 V−F変換器 2 マイクロコンピュータ 3 積分器 4 比較器 R1〜R4 抵抗 C コンデンサ Vin 入力電圧 Vout 出力電圧 TR トランジスタ 1 VF Converter 2 Microcomputer 3 Integrator 4 Comparator R1 to R4 Resistor C Capacitor Vin Input Voltage Vout Output Voltage TR Transistor

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 アナログ信号を入力してその電圧に応じ
た周波数の方形波を出力する電圧・周波数変換器と、前
記電圧・周波数変換器の方形波出力を入力して周波数を
計測しデジタルデータに変換するとともに処理を行うマ
イクロコンピュータとを有することを特徴とするマイク
ロコンピュータによるA/D変換方法。
1. A voltage / frequency converter for inputting an analog signal and outputting a square wave having a frequency corresponding to the voltage, and a square wave output of the voltage / frequency converter for measuring the frequency to obtain digital data. And an A / D conversion method using a microcomputer.
JP3279441A 1991-10-25 1991-10-25 A/d converting method by use of microcomputer Pending JPH05122078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3279441A JPH05122078A (en) 1991-10-25 1991-10-25 A/d converting method by use of microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3279441A JPH05122078A (en) 1991-10-25 1991-10-25 A/d converting method by use of microcomputer

Publications (1)

Publication Number Publication Date
JPH05122078A true JPH05122078A (en) 1993-05-18

Family

ID=17611114

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3279441A Pending JPH05122078A (en) 1991-10-25 1991-10-25 A/d converting method by use of microcomputer

Country Status (1)

Country Link
JP (1) JPH05122078A (en)

Similar Documents

Publication Publication Date Title
JPS6166971A (en) Method and circuit for measuring resistance of temperature detector and digitizing it
JPH05122078A (en) A/d converting method by use of microcomputer
US5745062A (en) Pulse width modulation analog to digital converter
US10778162B1 (en) Sensing analog signal through digital I/O pins
JP2720556B2 (en) Phase difference measurement method
JPS632488B2 (en)
SU1156097A1 (en) Device for calculating ratio of periods of two pulsed voltages
SU1091333A1 (en) Device for pulse-position converting of d.c. voltage to number
JPS5920692Y2 (en) f/v conversion circuit
JPH02196523A (en) Test circuit for delta sigma modulation type a/d converter
SU855534A1 (en) Device for measuring direct-current resistance
SU1323971A1 (en) Device for measuring power factor
RU2017161C1 (en) Capacitance measurement device
SU1374253A2 (en) Voltage multiplier
JPH0360525A (en) Pwm system a/d converter
SU661381A2 (en) Frequrncy sensor
SU932587A1 (en) Control signal conversion device
JP2800326B2 (en) Frequency transducer
JPS6331100A (en) Sample holding circuit
SU991319A1 (en) Converter of ac to dc voltage effective value
JP3210127B2 (en) Voltage pulse width conversion circuit
JPS63133071A (en) Current-frequency converter
JPH0485296U (en)
JPS5994919A (en) Signal processor
JPS6070024U (en) signal converter