JP4497166B2 - Analog input switching circuit - Google Patents

Analog input switching circuit Download PDF

Info

Publication number
JP4497166B2
JP4497166B2 JP2007050091A JP2007050091A JP4497166B2 JP 4497166 B2 JP4497166 B2 JP 4497166B2 JP 2007050091 A JP2007050091 A JP 2007050091A JP 2007050091 A JP2007050091 A JP 2007050091A JP 4497166 B2 JP4497166 B2 JP 4497166B2
Authority
JP
Japan
Prior art keywords
voltage
external
connection terminal
external connection
port
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.)
Active
Application number
JP2007050091A
Other languages
Japanese (ja)
Other versions
JP2008215866A (en
Inventor
直行 和佐
剛 高島
康祥 北野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Corp
Matsushita Electric Works 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 Panasonic Corp, Matsushita Electric Works Ltd filed Critical Panasonic Corp
Priority to JP2007050091A priority Critical patent/JP4497166B2/en
Publication of JP2008215866A publication Critical patent/JP2008215866A/en
Application granted granted Critical
Publication of JP4497166B2 publication Critical patent/JP4497166B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Description

本発明は、アナログ入力切換回路に関するものである。   The present invention relates to an analog input switching circuit.

従来、アナログ入力切換回路は例えばプログラマブルロジックコントローラ(PLC)などに用いられ、外部接続端子から入力されるアナログ値に基づいて各種対象機器の制御(例えば温度やストローク幅、荷重範囲などの制御)を行う機能を有している。外部接続端子から入力されるアナログ値としては、例えば対象機器に基づく外部電圧や外部抵抗の抵抗値などがある。なお、外部抵抗としては、例えばサーミスタやボリューム(可変抵抗器、ポテンショメータ)などが用いられる。   Conventionally, an analog input switching circuit is used for a programmable logic controller (PLC), for example, and controls various target devices (for example, control of temperature, stroke width, load range, etc.) based on an analog value input from an external connection terminal. Has the function to perform. Examples of the analog value input from the external connection terminal include an external voltage based on the target device and a resistance value of an external resistor. As the external resistance, for example, a thermistor or a volume (variable resistor, potentiometer) is used.

このような機能を有する従来のアナログ入力切換回路の一例として、図5に示すようなものがある。図5に示す従来のアナログ入力切換回路8は、アナログ電圧が入力される第1のA/Dポート(アナログ/デジタル変換ポート)800及び第2のA/Dポート801を有するマイコン80と、マイコン80の電源電圧Vccと同等の電圧が印加される第1の外部接続端子81と、第1のA/Dポート800に接続される第2の外部接続端子82と、第1の分圧抵抗86を介して第2のA/Dポート801に接続される第3の外部接続端子83と、グランドに接続される第4の外部接続端子84及び第5の外部接続端子85とを備えている。   An example of a conventional analog input switching circuit having such a function is shown in FIG. A conventional analog input switching circuit 8 shown in FIG. 5 includes a microcomputer 80 having a first A / D port (analog / digital conversion port) 800 and a second A / D port 801 to which an analog voltage is input, and a microcomputer The first external connection terminal 81 to which a voltage equivalent to the power supply voltage Vcc of 80 is applied, the second external connection terminal 82 connected to the first A / D port 800, and the first voltage dividing resistor 86 And a third external connection terminal 83 connected to the second A / D port 801, and a fourth external connection terminal 84 and a fifth external connection terminal 85 connected to the ground.

このような構成の従来のアナログ入力切換回路8は、最大電圧がマイコン80の電源電圧Vcc以上である外部電圧6の陽極が第3の外部接続端子83に接続され、陰極が第4の外部接続端子84に接続されると、第1の分圧抵抗86と第2の分圧抵抗87によって、第2のA/Dポート801に入力される電圧を電源電圧Vcc以下とし、この電圧を用いてマイコン80が対象機器(図示せず)を制御する。これに対して、外部抵抗7及び外部分圧抵抗70による直列回路の一端が第1の外部接続端子81に接続され、他端が第5の外部接続端子85に接続され、外部抵抗7と外部分圧抵抗70の間が第2の外部接続端子82に接続されると、第2の外部接続端子82からの電圧が第1のA/Dポート800に入力され、この電圧を用いてマイコン80が対象機器を制御する。   In the conventional analog input switching circuit 8 having such a configuration, the anode of the external voltage 6 whose maximum voltage is equal to or higher than the power supply voltage Vcc of the microcomputer 80 is connected to the third external connection terminal 83 and the cathode is the fourth external connection. When connected to the terminal 84, the voltage input to the second A / D port 801 is made lower than the power supply voltage Vcc by the first voltage dividing resistor 86 and the second voltage dividing resistor 87, and this voltage is used. The microcomputer 80 controls a target device (not shown). On the other hand, one end of the series circuit including the external resistor 7 and the external partial pressure resistor 70 is connected to the first external connection terminal 81, and the other end is connected to the fifth external connection terminal 85. When the space between the partial pressure resistors 70 is connected to the second external connection terminal 82, the voltage from the second external connection terminal 82 is input to the first A / D port 800, and the microcomputer 80 uses this voltage. Controls the target device.

また、上記とは別の従来のアナログ入力切換回路として、特許文献1には、分圧手段と2つのサーミスタとが直列に接続され、分圧手段と各サーミスタの間の電位をマイコンのA/Dポートに取り込む温度検出回路が開示されている。この特許文献1のマイコンは、外部電圧を測定する機能を有してはいないものの、2つのサーミスタの一方が分圧手段に接続されるように半導体スイッチの切り換えを行い、切り換えた後にA/Dポートに取り込んだ電位からサーミスタの抵抗値を算出し、算出した抵抗値から温度を検出することができる。
特開2003−121270号公報(段落0016〜0023及び第3図)
Further, as a conventional analog input switching circuit different from the above, in Patent Document 1, a voltage dividing means and two thermistors are connected in series, and the potential between the voltage dividing means and each thermistor is set to A / A of the microcomputer. A temperature detection circuit for taking in the D port is disclosed. Although the microcomputer disclosed in Patent Document 1 does not have a function of measuring an external voltage, the semiconductor switch is switched so that one of the two thermistors is connected to the voltage dividing means. The resistance value of the thermistor can be calculated from the potential taken into the port, and the temperature can be detected from the calculated resistance value.
Japanese Unexamined Patent Publication No. 2003-121270 (paragraphs 0016 to 0023 and FIG. 3)

しかしながら、上記従来のアナログ入力切換回路8には、図5に示すように、外部電圧6に基づいたアナログ値(分圧されたアナログ電圧)と外部抵抗7に基づいたアナログ値(アナログ電圧)とを別々のA/Dポート800,801に入力することから、同一のA/Dポート800(又は801)に切換入力することができず、A/Dポート800,801を効率よく用いることができないという問題があった。また、従来のアナログ入力切換回路8には、外部接続端子81〜85の数が多くなってしまうという問題があった。このため、外部接続端子81〜85を形成するコネクタ(図示せず)の形状も大きくなり、これに伴って、実装面積も大きくなってしまう。   However, the conventional analog input switching circuit 8 includes an analog value based on the external voltage 6 (divided analog voltage) and an analog value based on the external resistor 7 (analog voltage), as shown in FIG. Are input to separate A / D ports 800 and 801, the same A / D port 800 (or 801) cannot be switched in and the A / D ports 800 and 801 cannot be used efficiently. There was a problem. Further, the conventional analog input switching circuit 8 has a problem that the number of external connection terminals 81 to 85 is increased. For this reason, the shape of the connector (not shown) that forms the external connection terminals 81 to 85 is also increased, and accordingly, the mounting area is also increased.

本発明は上記の点に鑑みて為されたものであり、その目的とするところは、マイコンのA/Dポートを効率よく用いることができるとともに外部接続端子の数を減らすことができるアナログ入力切換回路を提供することにある。   The present invention has been made in view of the above points, and an object of the present invention is to make analog input switching that can efficiently use an A / D port of a microcomputer and reduce the number of external connection terminals. It is to provide a circuit.

請求項1の発明は、アナログ値が入力されるA/Dポートを有するマイコンと、前記マイコンの電源電圧以下の電圧が印加される第1の外部接続端子と、前記A/Dポートに接続される第2の外部接続端子と、一端が前記A/Dポートに接続される第1の分圧抵抗と、前記第1の分圧抵抗の他端に接続される第3の外部接続端子と、グランドに接続される第4の外部接続端子と、第2の分圧抵抗及びスイッチが直列に接続され一端が前記第1の分圧抵抗の一端に接続され他端が前記グランドに接続される直列回路とを備えることを特徴とする。   The invention of claim 1 is connected to the A / D port, a microcomputer having an A / D port to which an analog value is input, a first external connection terminal to which a voltage equal to or lower than the power supply voltage of the microcomputer is applied. A second external connection terminal, a first voltage dividing resistor having one end connected to the A / D port, a third external connection terminal connected to the other end of the first voltage dividing resistor, A fourth external connection terminal connected to the ground, a second voltage dividing resistor and a switch are connected in series, one end is connected to one end of the first voltage dividing resistor, and the other end is connected to the ground. And a circuit.

請求項1の発明によれば、スイッチのオンオフの切り換えによって、外部電圧を測定する場合と外部抵抗の抵抗値を測定する場合に、外部接続端子から入力されるそれぞれのアナログ値を同一のA/Dポートに入力することができるので、外部電圧に基づいたアナログ値と外部抵抗に基づいたアナログ値とを別々のA/Dポートに入力する構成に比べて、マイコンのA/Dポートを効率よく用いることができる。また、外部電圧を測定する場合と外部抵抗の抵抗値を測定する場合とで、グランドに接続される外部接続端子を共用することができるので、従来のものより外部接続端子の数を減らすことができる。   According to the first aspect of the present invention, when the external voltage is measured and the resistance value of the external resistance is measured by switching the switch on and off, the analog values inputted from the external connection terminals are set to the same A / Since it can be input to the D port, the A / D port of the microcomputer is more efficient than the configuration in which the analog value based on the external voltage and the analog value based on the external resistance are input to separate A / D ports. Can be used. In addition, the external connection terminal connected to the ground can be shared for measuring the external voltage and the resistance value of the external resistance, so the number of external connection terminals can be reduced compared to the conventional one. it can.

まず、本発明の実施形態に係るアナログ入力切換回路の構成について図1を用いて説明する。このアナログ入力切換回路1は、図1(a)に示すように、外部電圧6又は外部抵抗7に基づいたアナログ電圧を用いて対象機器(図示せず)を制御するものであり、アナログ電圧が入力されるA/Dポート20を有するマイコン2と、マイコン2の電源電圧Vccと同等の電圧が印加される第1の外部接続端子31と、A/Dポート20に接続される第2の外部接続端子32と、一端がA/Dポート20に接続される第1の分圧抵抗4と、第1の分圧抵抗4の他端に接続される第3の外部接続端子33と、グランドに接続される第4の外部接続端子34と、第2の分圧抵抗50及びスイッチ51が直列に接続され一端が第1の分圧抵抗4の一端に接続され他端がグランドに接続される直列回路5とを備えている。   First, the configuration of an analog input switching circuit according to an embodiment of the present invention will be described with reference to FIG. As shown in FIG. 1A, the analog input switching circuit 1 controls a target device (not shown) using an analog voltage based on an external voltage 6 or an external resistor 7, and the analog voltage is The microcomputer 2 having the input A / D port 20, the first external connection terminal 31 to which a voltage equivalent to the power supply voltage Vcc of the microcomputer 2 is applied, and the second external connected to the A / D port 20 A connection terminal 32, a first voltage dividing resistor 4 having one end connected to the A / D port 20, a third external connection terminal 33 connected to the other end of the first voltage dividing resistor 4, and a ground The fourth external connection terminal 34 to be connected, the second voltage dividing resistor 50 and the switch 51 are connected in series, one end is connected to one end of the first voltage dividing resistor 4 and the other end is connected to the ground. Circuit 5.

マイコン2は、A/Dポート20の他に、A/Dコンバータ(図示せず)などを備えている。A/Dコンバータでは、電圧コンパレータ(図示せず)がA/Dポート20から入力されたアナログ電圧を、直列抵抗ストリング(図示せず)によって作り出された基準電圧と比較してデジタル変換値を求めている。直列抵抗ストリングはA/Dコンバータ用の基準電圧端子とA/Dコンバータ用のグランド間に接続され、2端子間を1024段階の等価な電圧ステップにすることで基準電圧を作り出している。このようにして、マイコン2は、A/Dポート20から入力されたアナログ電圧をデジタル変換値に変換することができる。   The microcomputer 2 includes an A / D converter (not shown) in addition to the A / D port 20. In the A / D converter, a voltage comparator (not shown) compares an analog voltage input from the A / D port 20 with a reference voltage generated by a series resistor string (not shown) to obtain a digital conversion value. ing. The series resistor string is connected between the reference voltage terminal for the A / D converter and the ground for the A / D converter, and generates a reference voltage by making the two terminals have equivalent voltage steps of 1024 steps. In this way, the microcomputer 2 can convert the analog voltage input from the A / D port 20 into a digital conversion value.

第1の外部接続端子31には、外部抵抗7の抵抗値を測定する場合に、この外部抵抗7の一端が接続される。一方、第2の外部接続端子32には、外部抵抗7の抵抗値を測定する場合に、外部抵抗7の他端が接続される。このとき、第2の外部接続端子32は、外部分圧抵抗70を介して第4の外部接続端子34に接続される。   When the resistance value of the external resistor 7 is measured, one end of the external resistor 7 is connected to the first external connection terminal 31. On the other hand, when measuring the resistance value of the external resistor 7, the other end of the external resistor 7 is connected to the second external connection terminal 32. At this time, the second external connection terminal 32 is connected to the fourth external connection terminal 34 via the external partial pressure resistor 70.

第3の外部接続端子33には、外部電圧6を測定する場合に、この外部電圧6の陽極が接続される。一方、第4の外部接続端子34には、外部電圧6の陰極が接続される。   When the external voltage 6 is measured, the third external connection terminal 33 is connected to the anode of the external voltage 6. On the other hand, the cathode of the external voltage 6 is connected to the fourth external connection terminal 34.

直列回路5のスイッチ51は、ユーザの操作によって両端間の電気的接続のオンオフを切り換えるものである。外部電圧6を測定する場合にはスイッチ51をオンにし、第1の分圧抵抗4と第2の分圧抵抗50に外部電圧6を印加する。これに対して、外部抵抗7の抵抗値を測定する場合にはスイッチ51をオフにする。   The switch 51 of the series circuit 5 switches on / off of the electrical connection between both ends by a user operation. When measuring the external voltage 6, the switch 51 is turned on, and the external voltage 6 is applied to the first voltage dividing resistor 4 and the second voltage dividing resistor 50. On the other hand, when measuring the resistance value of the external resistor 7, the switch 51 is turned off.

このような構成のアナログ入力切換回路1において、マイコン2の電源電圧Vccは例えば3.3Vであり、A/Dコンバータ用電源電圧も電源電圧Vccと等しい。ここで、A/Dコンバータ用電源電圧(=電源電圧Vcc)以上のアナログ電圧がA/Dポート20に入力されるとデジタル変換値が不定となったり、A/Dポート20においてアナログ電圧の入力不良が発生したりする恐れがあることから、A/Dポート20に入力される最大アナログ電圧は電源電圧Vcc以下でなければならない。   In the analog input switching circuit 1 having such a configuration, the power supply voltage Vcc of the microcomputer 2 is 3.3 V, for example, and the power supply voltage for the A / D converter is also equal to the power supply voltage Vcc. Here, when an analog voltage equal to or higher than the power supply voltage for the A / D converter (= power supply voltage Vcc) is input to the A / D port 20, the digital conversion value becomes unstable or the analog voltage is input to the A / D port 20. The maximum analog voltage input to the A / D port 20 must be equal to or lower than the power supply voltage Vcc because a failure may occur.

外部抵抗7の抵抗値を測定する場合、この外部抵抗7と外部分圧抵抗70とで、第1の外部接続端子31に印加されたマイコン2の電源電圧Vccと同等の電圧が分圧され、この分圧された電圧がA/Dポート20に入力されるので、A/Dポート20に入力されるアナログ電圧は、{R4/(R3+R4)}×Vcc(R3:外部抵抗7の抵抗値、R4:外部分圧抵抗70の抵抗値、Vcc:マイコン2の電源電圧)となり、A/Dコンバータ用電源電圧つまり電源電圧Vccを超えるという問題は生じない。なお、第1の外部接続端子31に印加される電圧はマイコン2の電源電圧Vccに限定されず、電源電圧Vcc以下の大きさであってもよい。   When measuring the resistance value of the external resistor 7, a voltage equivalent to the power supply voltage Vcc of the microcomputer 2 applied to the first external connection terminal 31 is divided by the external resistor 7 and the external partial pressure resistor 70. Since this divided voltage is input to the A / D port 20, the analog voltage input to the A / D port 20 is {R4 / (R3 + R4)} × Vcc (R3: resistance value of the external resistor 7, R4: resistance value of the external partial pressure resistor 70, Vcc: power supply voltage of the microcomputer 2, and the problem of exceeding the power supply voltage for the A / D converter, that is, the power supply voltage Vcc does not occur. The voltage applied to the first external connection terminal 31 is not limited to the power supply voltage Vcc of the microcomputer 2 and may be a magnitude equal to or lower than the power supply voltage Vcc.

これに対して、外部電圧6を測定する場合、マイコン2の電源電圧Vcc(例えば3.3V)を超える外部電圧6を直接A/Dポート20に入力することができない。このため、アナログ入力切換回路1において、第1の分圧抵抗4と第2の分圧抵抗50とが外部電圧6を分圧し、この分圧した電圧をA/Dポート20に入力させる必要がある。このときA/Dポート20に入力されるアナログ電圧は、{R2/(R1+R2)}×V(R1:第1の分圧抵抗4の抵抗値、R2:第2の分圧抵抗50の抵抗値、V:外部電圧6)である。例えば、マイコン2の電源電圧Vccが3.3Vである場合、外部電圧6が10Vであったとき、第1の分圧抵抗4の抵抗値を670kΩ、第2の分圧抵抗50の抵抗値を330kΩとすると、10Vの外部電圧6ではなく3.3V(={330kΩ/(670kΩ+330kΩ)}×10V)に分圧された電圧をA/Dポート20に入力させることができる。   On the other hand, when measuring the external voltage 6, the external voltage 6 exceeding the power supply voltage Vcc (for example, 3.3 V) of the microcomputer 2 cannot be directly input to the A / D port 20. For this reason, in the analog input switching circuit 1, the first voltage dividing resistor 4 and the second voltage dividing resistor 50 need to divide the external voltage 6, and this divided voltage needs to be input to the A / D port 20. is there. At this time, the analog voltage input to the A / D port 20 is {R2 / (R1 + R2)} × V (R1: resistance value of the first voltage dividing resistor 4, R2: resistance value of the second voltage dividing resistor 50) , V: external voltage 6). For example, when the power supply voltage Vcc of the microcomputer 2 is 3.3 V, when the external voltage 6 is 10 V, the resistance value of the first voltage dividing resistor 4 is 670 kΩ and the resistance value of the second voltage dividing resistor 50 is When 330 kΩ is set, a voltage divided to 3.3 V (= {330 kΩ / (670 kΩ + 330 kΩ)} × 10 V) instead of the external voltage 6 of 10 V can be input to the A / D port 20.

ところで、本実施形態のアナログ入力切換回路1には、外部入力インタフェースの第1〜4の外部接続端子31〜34を形成するものとして4ピンのコネクタ(図示せず)が用いられている。このコネクタはプリント基板(図示せず)に実装されて設けられる。本実施形態では、4ピンのコネクタを用いることができるので、従来(5ピンのコネクタ)よりもコネクタの形状を小さくすることができ、その結果、プリント基板上の実装面積の削減つまり省スペース化を図ることができる。   By the way, in the analog input switching circuit 1 of the present embodiment, a 4-pin connector (not shown) is used to form the first to fourth external connection terminals 31 to 34 of the external input interface. This connector is mounted on a printed board (not shown). In this embodiment, since a 4-pin connector can be used, the shape of the connector can be made smaller than that of the conventional (5-pin connector). As a result, the mounting area on the printed circuit board can be reduced, that is, the space can be saved. Can be achieved.

また、プリント基板(図示せず)には、コネクタ(図示せず)を実装できる箇所が複数設けられており、それぞれの箇所には、コネクタに代えてボリュームや端子台を実装できるように形成されている。上記より、コネクタに代えてボリュームや端子台を実装することも可能であり、実装段階でユーザの要望を取り入れて、容易にカスタマイズすることが可能である。   The printed circuit board (not shown) is provided with a plurality of locations where a connector (not shown) can be mounted, and each location is formed so that a volume or a terminal block can be mounted instead of the connector. ing. From the above, it is possible to mount a volume or a terminal block in place of the connector, and it is possible to easily customize it by incorporating the user's request at the mounting stage.

次に、本実施形態のアナログ入力切換回路1の動作について説明する。まず、外部電圧6を測定するときの動作について図1(a)を用いて説明する。外部電圧6は0V以上10V以下とする。スイッチ51がオンの状態で、第3の外部接続端子33に外部電圧6の陽極が接続され、第4の外部接続端子34に外部電圧6の陰極が接続される。このとき、第1の外部接続端子31及び第2の外部接続端子32は開放しておく。第1の分圧抵抗4及び第2の分圧抵抗50で外部電圧6が分圧され、分圧された電圧がマイコン2のA/Dポート20に入力される。マイコン2は、A/Dポート20から入力された電圧を用いて対象機器(図示せず)を制御する。   Next, the operation of the analog input switching circuit 1 of the present embodiment will be described. First, the operation when measuring the external voltage 6 will be described with reference to FIG. The external voltage 6 is 0V or more and 10V or less. With the switch 51 turned on, the anode of the external voltage 6 is connected to the third external connection terminal 33, and the cathode of the external voltage 6 is connected to the fourth external connection terminal 34. At this time, the first external connection terminal 31 and the second external connection terminal 32 are opened. The external voltage 6 is divided by the first voltage dividing resistor 4 and the second voltage dividing resistor 50, and the divided voltage is input to the A / D port 20 of the microcomputer 2. The microcomputer 2 controls a target device (not shown) using the voltage input from the A / D port 20.

続いて、外部抵抗7としてサーミスタ71の抵抗値を測定するときの動作について図2を用いて説明する。図2のアナログ入力切換回路1は図1(a)と表現が異なっているが、図1(a)のアナログ入力切換回路1と同等のものである。スイッチ51がオフの状態で、第1の外部接続端子31にサーミスタ71の一端が接続され、第2の外部接続端子32にサーミスタ71の他端及び外部分圧抵抗70の一端が接続され、第4の外部接続端子34に外部分圧抵抗70の他端が接続される。このとき、第3の外部接続端子33は開放しておく。サーミスタ71及び外部分圧抵抗70で、電源電圧Vccと同様の電圧が分圧され、分圧された電圧が第2の外部接続端子32を介してマイコン2のA/Dポート20に入力される。マイコン2は、A/Dポート20から入力された電圧を用いて対象機器(図示せず)を制御する。   Next, the operation when measuring the resistance value of the thermistor 71 as the external resistor 7 will be described with reference to FIG. The analog input switching circuit 1 of FIG. 2 is equivalent to the analog input switching circuit 1 of FIG. 1A although the expression is different from that of FIG. With the switch 51 turned off, one end of the thermistor 71 is connected to the first external connection terminal 31, and the other end of the thermistor 71 and one end of the external partial pressure resistor 70 are connected to the second external connection terminal 32. The other end of the external partial resistance 70 is connected to the four external connection terminals 34. At this time, the third external connection terminal 33 is left open. A voltage similar to the power supply voltage Vcc is divided by the thermistor 71 and the external partial pressure resistor 70, and the divided voltage is input to the A / D port 20 of the microcomputer 2 via the second external connection terminal 32. . The microcomputer 2 controls a target device (not shown) using the voltage input from the A / D port 20.

また、図3のような場合も同様に、スイッチ51がオフの状態で、マイコン2の電源電圧Vccと同等の電圧がサーミスタ71と外部分圧抵抗70で分圧され、分圧された電圧がそのまま第2の外部接続端子32からA/Dポート20に入力される。   Similarly, in the case of FIG. 3, the voltage equivalent to the power supply voltage Vcc of the microcomputer 2 is divided by the thermistor 71 and the external partial pressure resistor 70 in the state where the switch 51 is off, and the divided voltage is obtained. The data is directly input from the second external connection terminal 32 to the A / D port 20.

続いて、外部抵抗7の抵抗値としてボリューム72の抵抗値を測定するときの動作について図4を用いて説明する。図4のアナログ入力切換回路1は図1(a)と表現が異なっているが、図1(a)のアナログ入力切換回路1と同等のものである。スイッチ51がオフの状態で、第1の外部接続端子31にボリューム72の固定端子の一方が接続され、第4の外部接続端子34にボリューム72の固定端子の他方が接続され、第2の外部接続端子32にボリューム72の可動端子が接続される。このとき、第3の外部接続端子33は開放しておく。ボリューム72の可動端子と固定端子の他端との間の電圧が第2の外部接続端子32を介してマイコン2のA/Dポート20に入力される。マイコン2は、この電圧を用いて対象機器(図示せず)を制御する。   Next, an operation when measuring the resistance value of the volume 72 as the resistance value of the external resistor 7 will be described with reference to FIG. The analog input switching circuit 1 in FIG. 4 is equivalent to the analog input switching circuit 1 in FIG. 1A although the expression is different from that in FIG. With the switch 51 turned off, one of the fixed terminals of the volume 72 is connected to the first external connection terminal 31, the other of the fixed terminals of the volume 72 is connected to the fourth external connection terminal 34, and the second external connection terminal 31 The movable terminal of the volume 72 is connected to the connection terminal 32. At this time, the third external connection terminal 33 is left open. A voltage between the movable terminal of the volume 72 and the other end of the fixed terminal is input to the A / D port 20 of the microcomputer 2 via the second external connection terminal 32. The microcomputer 2 controls a target device (not shown) using this voltage.

上記のようなアナログ入力切換回路1の各動作によって、図1(b)に示すように、外部電圧6の測定と外部抵抗7の抵抗値の測定との間で、アナログ電圧の入力切換を容易に行うことができる。これにより、マイコン2の電源電圧Vcc以上の外部電圧6に基づいたアナログ電圧と、外部抵抗7に基づいたアナログ電圧とを同一のA/Dポート20で入力することができる。   By the operations of the analog input switching circuit 1 as described above, as shown in FIG. 1B, the analog voltage input can be easily switched between the measurement of the external voltage 6 and the resistance value of the external resistor 7. Can be done. Thereby, the analog voltage based on the external voltage 6 equal to or higher than the power supply voltage Vcc of the microcomputer 2 and the analog voltage based on the external resistor 7 can be input through the same A / D port 20.

以上、本実施形態によれば、スイッチ51のオンオフの切り換えによって、マイコン2の電源電圧Vcc以上の外部電圧6を測定する場合と外部抵抗7の抵抗値を測定する場合に、第2,3の外部接続端子32,33から入力されるアナログ電圧を同一のA/Dポート20に入力することができるので、外部電圧6に基づいたアナログ電圧と外部抵抗7に基づいたアナログ電圧とを別々のA/Dポートに入力する構成に比べて、マイコン2のA/Dポート20を効率よく用いることができる。また、外部電圧6を測定する場合と外部抵抗7の抵抗値を測定する場合とで、グランドに接続される外部接続端子を第4の外部接続端子34で共用することができるので、従来のものより外部接続端子31〜34の数を減らすことができる。   As described above, according to the present embodiment, when the external voltage 6 equal to or higher than the power supply voltage Vcc of the microcomputer 2 is measured and the resistance value of the external resistor 7 is measured by switching the switch 51 on and off, Since the analog voltages input from the external connection terminals 32 and 33 can be input to the same A / D port 20, the analog voltage based on the external voltage 6 and the analog voltage based on the external resistor 7 are separated from each other by A. The A / D port 20 of the microcomputer 2 can be used more efficiently than the configuration for inputting to the / D port. Further, since the external connection terminal connected to the ground can be shared by the fourth external connection terminal 34 when measuring the external voltage 6 and when measuring the resistance value of the external resistor 7, the conventional one is used. In addition, the number of external connection terminals 31 to 34 can be reduced.

本発明の実施形態に係るアナログ入力切換回路において、(a)は外部電圧が接続された回路図、(b)は状態の切り換えを示す図である。In the analog input switching circuit according to the embodiment of the present invention, (a) is a circuit diagram to which an external voltage is connected, and (b) is a diagram showing state switching. 同上に係るアナログ入力切換回路にサーミスタが接続された回路図である。It is the circuit diagram by which the thermistor was connected to the analog input switching circuit which concerns on the same as the above. 同上に係るアナログ入力切換回路にサーミスタが接続された他の回路図である。It is another circuit diagram by which the thermistor was connected to the analog input switching circuit which concerns on the same as the above. 同上に係るアナログ入力切換回路にボリュームが接続された回路図である。It is a circuit diagram in which a volume is connected to the analog input switching circuit according to the same. 従来のアナログ入力切換回路の回路図である。It is a circuit diagram of a conventional analog input switching circuit.

符号の説明Explanation of symbols

2 マイコン
20 A/Dポート
31 第1の外部接続端子
32 第2の外部接続端子
33 第3の外部接続端子
34 第4の外部接続端子
4 第1の分圧抵抗
5 直列回路
50 第2の分圧抵抗
51 スイッチ
6 外部電圧
7 外部抵抗
70 外部分圧抵抗
2 Microcomputer 20 A / D port 31 1st external connection terminal 32 2nd external connection terminal 33 3rd external connection terminal 34 4th external connection terminal 4 1st voltage dividing resistor 5 Series circuit 50 2nd part Voltage resistance 51 Switch 6 External voltage 7 External resistance 70 External voltage dividing resistance

Claims (1)

アナログ値が入力されるA/Dポートを有するマイコンと、
前記マイコンの電源電圧以下の電圧が印加される第1の外部接続端子と、
前記A/Dポートに接続される第2の外部接続端子と、
一端が前記A/Dポートに接続される第1の分圧抵抗と、
前記第1の分圧抵抗の他端に接続される第3の外部接続端子と、
グランドに接続される第4の外部接続端子と、
第2の分圧抵抗及びスイッチが直列に接続され一端が前記第1の分圧抵抗の一端に接続され他端が前記グランドに接続される直列回路と
を備えることを特徴とするアナログ入力切換回路。
A microcomputer having an A / D port to which an analog value is input;
A first external connection terminal to which a voltage equal to or lower than the power supply voltage of the microcomputer is applied;
A second external connection terminal connected to the A / D port;
A first voltage dividing resistor having one end connected to the A / D port;
A third external connection terminal connected to the other end of the first voltage dividing resistor;
A fourth external connection terminal connected to the ground;
An analog input switching circuit comprising: a second voltage dividing resistor and a switch connected in series, one end connected to one end of the first voltage dividing resistor, and the other end connected to the ground. .
JP2007050091A 2007-02-28 2007-02-28 Analog input switching circuit Active JP4497166B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007050091A JP4497166B2 (en) 2007-02-28 2007-02-28 Analog input switching circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007050091A JP4497166B2 (en) 2007-02-28 2007-02-28 Analog input switching circuit

Publications (2)

Publication Number Publication Date
JP2008215866A JP2008215866A (en) 2008-09-18
JP4497166B2 true JP4497166B2 (en) 2010-07-07

Family

ID=39836090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007050091A Active JP4497166B2 (en) 2007-02-28 2007-02-28 Analog input switching circuit

Country Status (1)

Country Link
JP (1) JP4497166B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63113967U (en) * 1987-01-16 1988-07-22
JPH10289037A (en) * 1997-04-11 1998-10-27 Matsushita Electric Ind Co Ltd Battery voltage monitoring device and wireless printer
JP2001185233A (en) * 1999-12-27 2001-07-06 Fujitsu Kiden Ltd Detection circuit for battery voltage, battery pack and detection method of battery voltage
JP2003121270A (en) * 2001-10-12 2003-04-23 Rinnai Corp Temperature-detecting circuit communication device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63113967U (en) * 1987-01-16 1988-07-22
JPH10289037A (en) * 1997-04-11 1998-10-27 Matsushita Electric Ind Co Ltd Battery voltage monitoring device and wireless printer
JP2001185233A (en) * 1999-12-27 2001-07-06 Fujitsu Kiden Ltd Detection circuit for battery voltage, battery pack and detection method of battery voltage
JP2003121270A (en) * 2001-10-12 2003-04-23 Rinnai Corp Temperature-detecting circuit communication device

Also Published As

Publication number Publication date
JP2008215866A (en) 2008-09-18

Similar Documents

Publication Publication Date Title
US7460973B2 (en) Sensing apparatus
JP2009250613A (en) Temperature detection apparatus
JP4497166B2 (en) Analog input switching circuit
JP6264160B2 (en) Semiconductor physical quantity sensor device
JP4231038B2 (en) High voltage measuring device
JP6714860B2 (en) Measurement module
JP4350458B2 (en) Signal input device
US8466817B2 (en) Electronic device and method for driving an internal function block of a processor of the electronic device to operate in a linear region
JP2004085288A (en) Multivariable transmitter
JP4223697B2 (en) Programmable controller analog module
JP2010048733A (en) Control circuit
CN110582915A (en) Microcomputer input/output circuit
JP4902476B2 (en) Analog signal input device
WO2017122297A1 (en) Electronic device and fa device
US6137351A (en) Universal current source and current sink interface
JP4357755B2 (en) Signal input circuit
JP2012068074A (en) Voltage range detecting device
JP2010068369A (en) Switch input circuit
JP2002238148A (en) Overcurrent protective circuit
CN117666450B (en) Control signal output circuit and control device
JP5115406B2 (en) Signal input circuit
JP5464481B2 (en) Digital / analog conversion circuit
US20090185323A1 (en) Overheat protection circuit
JP6455718B2 (en) Type discrimination device
JP2007147124A (en) Controller for air conditioner

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091208

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: 20100323

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100405

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4497166

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

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: 20130423

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130423

Year of fee payment: 3

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: 20130423

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140423

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250