JP2017228209A - Device and system for input/output control - Google Patents

Device and system for input/output control Download PDF

Info

Publication number
JP2017228209A
JP2017228209A JP2016125540A JP2016125540A JP2017228209A JP 2017228209 A JP2017228209 A JP 2017228209A JP 2016125540 A JP2016125540 A JP 2016125540A JP 2016125540 A JP2016125540 A JP 2016125540A JP 2017228209 A JP2017228209 A JP 2017228209A
Authority
JP
Japan
Prior art keywords
input
output
ports
general
dedicated
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
JP2016125540A
Other languages
Japanese (ja)
Inventor
栗原 武弘
Takehiro Kurihara
武弘 栗原
恭平 山口
Kyohei Yamaguchi
恭平 山口
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.)
Noritz Corp
Original Assignee
Noritz Corp
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 Noritz Corp filed Critical Noritz Corp
Priority to JP2016125540A priority Critical patent/JP2017228209A/en
Publication of JP2017228209A publication Critical patent/JP2017228209A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To allow for sharing general-purpose input/output terminals (ports) of a device to enable switching among various input/output patterns.SOLUTION: An input/output control device including a microcomputer is provided, the microcomputer having a plurality of dedicated ports (P1-P3) configured to receive external voltages, general-purpose input/output ports (M1, M2) that are different from the plurality of dedicated ports, and a controller for controlling the general-purpose input/output ports. The controller detects whether a level of voltage received by each dedicated port is one or the other of two values, and switches each of the general-purpose input/output ports either to an input port or output port in accordance with a combination pattern consisting of a combination of detected values of the dedicated ports.SELECTED DRAWING: Figure 1

Description

この発明は入出力制御装置および入出力制御システムに関し、特に、マイコン(マイクロコンピュータの略)の入出力ポートを切替える入出力制御装置および入出力制御システムに関する。   The present invention relates to an input / output control device and an input / output control system, and more particularly to an input / output control device and an input / output control system for switching an input / output port of a microcomputer (abbreviation of a microcomputer).

電子機器のマイコンとして、フラッシュメモリを内蔵したマイコンの利用が多くなっている。フラッシュメモリは電源を切っても記憶内容が消えないROM(Read Only Memory)でありながら、記憶内容の書換えが可能という利点がある。電子機器の生産ラインでは、この利点に着目して、フラッシュメモリへのプログラムの書込みは、マイコンを備えたコントローラの組立完成(制御基板の防水のためのポッティング剤の充填)後に実施される。しかし、基板には書込み用の端子は設けられていないので、書込み用の専用治具を準備し、専用治具を介してプログラム書込みを行っていた。そのため、専用治具により転送不良が発生しプログラムを書込めない、または書込みに時間がかかる等の課題をあった。   As microcomputers for electronic devices, microcomputers with built-in flash memory are increasingly used. Although the flash memory is a ROM (Read Only Memory) whose stored contents do not disappear even when the power is turned off, there is an advantage that the stored contents can be rewritten. In the production line of electronic devices, paying attention to this advantage, the writing of the program to the flash memory is performed after the completion of the assembly of the controller equipped with the microcomputer (filling of a potting agent for waterproofing the control board). However, since there are no terminals for writing on the substrate, a writing dedicated jig is prepared and a program is written through the dedicated jig. For this reason, there is a problem that a transfer failure occurs due to a dedicated jig and the program cannot be written, or it takes time to write.

このような課題に関して、特許文献1(特開2008−196713号公報)は、空気調和機の室内機の端子に、通常は室外機を接続するが、制御プログラムを更新または変更する場合には、室外機に代えてプログラムの書込み機を接続する構成を開示する。   Regarding such a problem, Patent Document 1 (Japanese Patent Application Laid-Open No. 2008-196713) normally connects an outdoor unit to a terminal of an indoor unit of an air conditioner, but when updating or changing a control program, A configuration in which a program writer is connected instead of the outdoor unit is disclosed.

また、特許文献2(特開平10−300203号公報)は、給湯器のリモコンの接続端子部を介して、アフターサービス用の新制御基板が接続されると、故障した旧制御基板からのデータを、接続端子部を介して新制御基板に受信させて記憶させる構成を開示する。   Patent Document 2 (Japanese Patent Laid-Open No. 10-300203) discloses that when a new control board for after-sales service is connected via a connection terminal portion of a remote controller of a water heater, data from the old control board that has failed is displayed. A configuration is disclosed in which the new control board receives and stores the data via the connection terminal portion.

特開2008−196713号公報JP 2008-196713 A 特開平10−300203号公報JP-A-10-300203

特許文献1と2は、上述のように、電子機器の端子を既存の機能とプログラム書換え機能との両方に共有する構成とすることで、専用治具の廃止を可能にしている。しかしながら、生産ラインの現場では、電子機器のプログラム書込みの他に、当該電子機器とデータまたは信号を入出力しながら各種項目を検査する必要があり、その場合であっても、簡単な構成でこれら検査項目を実施したいとの要望があった。   As described above, Patent Documents 1 and 2 make it possible to eliminate the dedicated jig by using a configuration in which the terminal of the electronic device is shared by both the existing function and the program rewriting function. However, on the production line site, in addition to writing a program for an electronic device, it is necessary to inspect various items while inputting / outputting data or signals to / from the electronic device. There was a request to carry out inspection items.

しかし、特許文献1と2は、上述のように、電子機器の端子を既存の機能とプログラム書換え機能との両方に共有する構成を開示するが、生産ラインにおける各種検査項目のために端子を共用する構成は開示がない。   However, as described above, Patent Documents 1 and 2 disclose a configuration in which a terminal of an electronic device is shared by both an existing function and a program rewriting function, but the terminal is shared for various inspection items in a production line. There is no disclosure of the configuration.

この開示の目的は、装置の汎用入出力の端子(ポート)を共用して、入出力パターンの多様な切替えを可能にする入出力制御装置および入出力制御システムを提供することである。   An object of this disclosure is to provide an input / output control device and an input / output control system that allow various switching of input / output patterns by sharing a general-purpose input / output terminal (port) of the device.

この発明のある局面に従うマイコンを含む入出力制御装置が提供される。マイコンは、外部から電圧を受ける複数の専用ポートと、複数の専用ポートとは異なる汎用の入出力ポートと、汎用の入出力ポートを制御する制御部と、を備え、制御部は、各専用ポートが受ける電圧が2値の電位いずれであるかを検出し、各専用ポートの検出値の組みからなる組合せパターンに従い、汎用の入出力ポートを入力ポートまたは出力ポートに切替える。   An input / output control device including a microcomputer according to an aspect of the present invention is provided. The microcomputer includes a plurality of dedicated ports that receive voltage from the outside, a general-purpose input / output port that is different from the plurality of dedicated ports, and a control unit that controls the general-purpose input / output port. Is detected as a binary potential, and the general-purpose input / output port is switched to an input port or an output port in accordance with a combination pattern consisting of a combination of detection values of each dedicated port.

好ましくは、制御部は、入出力制御装置がリセットされてから予め定められた時間が経過したとき、検出を開始する。   Preferably, the control unit starts detection when a predetermined time has elapsed since the input / output control device was reset.

好ましくは、入出力制御装置は、さらに、複数の専用ポートに着脱自在に装着されるコネクタを含み、各専用ポートの電位は、装着されるコネクタの種類により決定される。   Preferably, the input / output control device further includes a connector detachably attached to the plurality of dedicated ports, and the potential of each dedicated port is determined by the type of the attached connector.

この発明の他の局面に従う入出力制御システムは、上記に述べた入出力制御装置と、電源と、複数の専用ポートに着脱自在の複数種類のコネクタと、を備え、各コネクタは、それぞれが各専用ポートに対応した位置に設けられた複数のコネクタピンを有し、各コネクタは、装着時に、電源と結線されるコネクタピンの数と当該コネクタピンの位置の組合せが、他のコネクタの当該組合せとは相違する。   An input / output control system according to another aspect of the present invention includes the above-described input / output control device, a power source, and a plurality of types of connectors that can be attached to and detached from a plurality of dedicated ports. Each connector has a plurality of connector pins provided at positions corresponding to the dedicated ports, and each connector has a combination of the number of connector pins connected to the power source and the position of the connector pins when the connector is installed. Is different.

本開示のある局面では、検査項目ごとに上記に述べた組合せパターンを異ならせることで、各検査項目について、汎用入出力ポートを介して当該検査項目のためのデータ入出力が可能となる。   In an aspect of the present disclosure, by changing the combination pattern described above for each inspection item, data input / output for the inspection item can be performed for each inspection item via the general-purpose input / output port.

実施の形態1にかかる入出力制御装置および入出力制御システムの構成を概略的に示す図である。1 is a diagram schematically showing a configuration of an input / output control device and an input / output control system according to a first embodiment; 実施の形態1にかかるテーブル122Aおよび122Bの構成の一例を示す図である。It is a figure which shows an example of a structure of table 122A and 122B concerning Embodiment 1. FIG. 実施の形態1にかかる処理のフローチャートである。3 is a flowchart of processing according to the first exemplary embodiment; 実施の形態2にかかる入出力制御システムの構成を概略的に示す図である。It is a figure which shows schematically the structure of the input / output control system concerning Embodiment 2. FIG.

以下、図面を参照しながら、各実施の形態にかかる入出力制御装置および当該入出力制御装置を備えるシステムを説明する。なお、以下に参照される図面において同一の符号が付されている部位は、同一の機能を果たすものであるため、特に必要がない限り、その説明は繰り返さない。   Hereinafter, an input / output control device according to each embodiment and a system including the input / output control device will be described with reference to the drawings. In addition, since the site | part to which the same code | symbol is attached | subjected in the drawing referred below performs the same function, the description is not repeated unless there is particular need.

[概要]
本開示にかかる入出力制御装置は、それぞれが外部から電圧を受ける複数の専用ポートと、複数の専用ポートとは異なる汎用の入出力ポートと、汎用の入出力ポートを制御する制御部と、を備える。制御部は、各専用ポートが受ける電圧は2値(電圧値が論理レベルがHigh/Lowの電位)のいずれであるかを検出し、各専用ポートの検出値であるHigh/Lowの組みからなる組合せパターンに従い、汎用の入出力ポートを、入力ポートおよび出力ポートの一方に切替える。
[Overview]
An input / output control device according to the present disclosure includes a plurality of dedicated ports each receiving a voltage from the outside, a general-purpose input / output port different from the plurality of dedicated ports, and a control unit that controls the general-purpose input / output port. Prepare. The control unit detects whether the voltage received by each dedicated port is binary (the voltage value is a potential having a logic level of High / Low), and consists of a set of High / Low that is a detection value of each dedicated port. According to the combination pattern, the general-purpose input / output port is switched to one of the input port and the output port.

したがって、専用ポートについて上記の組合せパターンを異ならせることで、各組合せパターンに応じた汎用入出力ポートの入出力切替えが可能となる。その結果、入出力制御装置を電子機器の制御マイコンの入出力制御に適用した場合には、当該マイコンの汎用入出力を介した入出力を、上記の組合せパターンに応じて切替えることが可能となり、電子機器またはそのマイコンについて多様な検査項目を実施することができる。   Therefore, by changing the above combination pattern for the dedicated port, it is possible to switch the input / output of the general-purpose input / output port according to each combination pattern. As a result, when the input / output control device is applied to the input / output control of the control microcomputer of the electronic device, it becomes possible to switch the input / output via the general-purpose input / output of the microcomputer according to the combination pattern, Various inspection items can be performed on the electronic device or its microcomputer.

[実施の形態1]
図1は、実施の形態1にかかる入出力制御装置および入出力制御システムの構成を概略的に示す図である。図1(A)を参照して、入出力制御システムは、マイコン1とコネクタ14を備える。
[Embodiment 1]
FIG. 1 is a diagram schematically illustrating a configuration of an input / output control device and an input / output control system according to the first embodiment. Referring to FIG. 1A, the input / output control system includes a microcomputer 1 and a connector 14.

マイコン1は、CPU(Central Processing Unit)10、給湯器等の外部機器と通信するための通信I/F(インターフェイスの略)11、揮発性メモリおよび不揮発性メモリ(例えば、フラッシュメモリ)を含む記憶部12、入出力I/F(インターフェイスの略)13、専用ポートP1、P2およびP3、ならびに汎用入出力ポートM1、M2、M3、M4およびM5を備える。図示しない制御基板はマイコン1および後述するベースコネクタ141が装着されポッティング剤で充填されている。なお、ベースコネクタ141は充填表面に突出した態様で設けられている。   The microcomputer 1 includes a CPU (Central Processing Unit) 10, a communication I / F (abbreviation for interface) 11 for communicating with an external device such as a water heater, a volatile memory, and a nonvolatile memory (for example, a flash memory). Section 12, input / output I / F (abbreviation of interface) 13, dedicated ports P1, P2 and P3, and general-purpose input / output ports M1, M2, M3, M4 and M5. A control board (not shown) is mounted with a microcomputer 1 and a base connector 141 described later, and is filled with a potting agent. The base connector 141 is provided so as to protrude from the filling surface.

記憶部12は、外部機器を制御するためのデータおよびプログラム等の各種のデータおよびプログラムを記憶するためのデータ領域120およびプログラム領域121を有する。また、記憶部12は、後述するテーブル122Aおよび122Bを格納する。   The storage unit 12 includes a data area 120 and a program area 121 for storing various data and programs such as data and programs for controlling external devices. The storage unit 12 stores tables 122A and 122B described later.

入出力I/F13は、CPU10の制御のもとに、専用ポートP1〜P3および汎用入出力ポートM1〜M5を介して信号を入出力するための回路(例えば、入出力電圧の値を格納するレジスタ等)を含む。   The input / output I / F 13 stores a circuit (for example, the value of the input / output voltage) for inputting / outputting signals through the dedicated ports P1 to P3 and the general purpose input / output ports M1 to M5 under the control of the CPU 10. Register).

専用ポートP1〜P3および汎用入出力ポートM1とM2には、コネクタ14が着脱自在に装着される。例えばプログラム領域121へのプログラム書込み(更新)時または検査時等に、検査用コネクタが装着される。通常時(例えば、外部機器の制御時)には制御用コネクタが装着される。   A connector 14 is detachably attached to the dedicated ports P1 to P3 and the general-purpose input / output ports M1 and M2. For example, an inspection connector is attached when writing (updating) a program to the program area 121 or when inspecting. A control connector is attached at normal times (for example, when controlling an external device).

専用ポートP1〜P3のそれぞれは、装着されたコネクタ14を介して、汎用入出力ポートM1またはM2を入力ポートまたは出力ポートに切替えるための電圧を受ける。   Each of the dedicated ports P1 to P3 receives a voltage for switching the general-purpose input / output port M1 or M2 to an input port or an output port via the attached connector 14.

汎用入出力ポートM1〜M5は、通常時(例えば、給湯器等の外部機器の制御時)において、制御するための信号を入出力する。制御するための信号としては、例えば連続燃焼時間(10分または20分)の指定の入力信号、またはガス種類(13A、LPG)の指定の入力信号等を含む。   The general-purpose input / output ports M1 to M5 input / output signals for control during normal times (for example, when controlling external devices such as a water heater). The signal for control includes, for example, a designated input signal for continuous combustion time (10 minutes or 20 minutes) or a designated input signal for gas type (13A, LPG).

専用ポートP1は、抵抗を介して電源Vccに接続されることによりHigh(以下、‘H’と略す)に設定されている。専用ポートP2およびP3は、それぞれ抵抗を介して接地(GND)されることによりLow(以下、Lと略す)に設定されている。また、汎用入出力ポートM1とM2もそれぞれ抵抗を介して接地(GND)されることにより‘L’に設定されている。   The dedicated port P1 is set to High (hereinafter abbreviated as 'H') by being connected to the power supply Vcc through a resistor. The dedicated ports P2 and P3 are set to Low (hereinafter abbreviated as L) by being grounded (GND) through resistors. The general purpose input / output ports M1 and M2 are also set to 'L' by being grounded (GND) through resistors.

なお、専用ポートはポートP1〜P3の3個に限定されず、また入出力が切替えられる汎用入出力ポートはポートM1,M2の2個に限定されない。   The dedicated ports are not limited to three ports P1 to P3, and the general-purpose input / output ports to which input / output is switched are not limited to two ports M1 and M2.

(コネクタの構成と組合せパターン)
コネクタ14は、ベースコネクタ141とハウジングコネクタ142からなる。ベースコネクタ141は、コネクタピンB1、B2、B3、B4およびB5を有する。コネクタピンB1、B2、B3、B4およびB5は、専用ポートP1、P2およびP3ならびに汎用入出力ポートM1およびM2に対応した位置にそれぞれ配置される。この各コネクタピンは、抵抗を介して対応したポートに電気的に接続される。ハウジングコネクタ142は、コネクタピンB1、B2、B3、B4およびB5のそれぞれに対応した位置に配置されたコネクタピンH1、H2、H3、H4およびH5を有する。ベースコネクタ141とハウジングコネクタ142の一方はメス型コネクタであり他方はオス型コネクタである。両者は嵌合により着脱自在に接続される。
(Connector configuration and combination pattern)
The connector 14 includes a base connector 141 and a housing connector 142. The base connector 141 has connector pins B1, B2, B3, B4 and B5. Connector pins B1, B2, B3, B4 and B5 are arranged at positions corresponding to dedicated ports P1, P2 and P3 and general purpose input / output ports M1 and M2, respectively. Each connector pin is electrically connected to a corresponding port via a resistor. The housing connector 142 has connector pins H1, H2, H3, H4, and H5 arranged at positions corresponding to the connector pins B1, B2, B3, B4, and B5, respectively. One of the base connector 141 and the housing connector 142 is a female connector, and the other is a male connector. Both are detachably connected by fitting.

ハウジングコネクタ142では、専用ポートP1〜P3に対応したコネクタピンH1〜H3のうちコネクタピンH1とH2とが、結線143により短絡されている。したがって、ハウジングコネクタ142がベースコネクタ141に装着されたときは、電源Vcc→コネクタピンB1→コネクタピンH1→結線143→コネクタピンH2→コネクタピンB2→専用ポートP2の回路が確立されて、専用ポートP2は‘L’→‘H’に切替え設定される。なお、専用ポートP1は‘H’、専用ポートP3は‘L’のままである。この場合、CPU10は、入出力I/F13を介して専用ポートP1、P2およびP3が受ける電圧の値を検出し、検出値の組みからなる組合せパターン(H,H,L)を判定する。   In the housing connector 142, the connector pins H1 and H2 among the connector pins H1 to H3 corresponding to the dedicated ports P1 to P3 are short-circuited by the connection 143. Therefore, when the housing connector 142 is attached to the base connector 141, the circuit of the power source Vcc → connector pin B1 → connector pin H1 → connection 143 → connector pin H2 → connector pin B2 → dedicated port P2 is established, and the dedicated port P2 is switched from “L” to “H”. The dedicated port P1 remains “H” and the dedicated port P3 remains “L”. In this case, the CPU 10 detects the value of the voltage received by the dedicated ports P1, P2, and P3 via the input / output I / F 13, and determines a combination pattern (H, H, L) including a set of detection values.

図1(B)〜(D)には、図1(A)のハウジングコネクタ142とは異なる組合せパターンとなるハウジングコネクタが示される。例えば、図1(B)のハウジングコネクタ142は、図1(A)とは異なり専用ポートP1〜P3に対応したコネクタピンH1〜H3が結線143により短絡されている。したがって、図1(B)のハウジングコネクタ142がベースコネクタ141に装着されたときは、CPU10は、入出力I/F13を介して専用ポートP1、P2およびP3が受ける電圧の値を検出し、検出値の組みからなる組合せパターン(H,H,H)を判定する。   FIGS. 1B to 1D show a housing connector having a combination pattern different from the housing connector 142 of FIG. For example, the housing connector 142 in FIG. 1B is different from FIG. 1A in that the connector pins H1 to H3 corresponding to the dedicated ports P1 to P3 are short-circuited by the connection 143. Therefore, when the housing connector 142 in FIG. 1B is attached to the base connector 141, the CPU 10 detects the value of the voltage received by the dedicated ports P1, P2, and P3 via the input / output I / F 13, and detects the detected values. A combination pattern (H, H, H) consisting of a set of values is determined.

また、図1(C)のハウジングコネクタ142は、専用ポートP1〜P3に対応したコネクタピンH1〜H3のうち、コネクタピンH1とH3が結線143により短絡されている。したがって、図1(C)のハウジングコネクタ142がベースコネクタ141に装着されたときは、CPU10は、入出力I/F13を介して専用ポートP1、P2およびP3が受ける電圧の値を検出し、検出値の組みからなる組合せパターン(H,L,H)を判定する。   In the housing connector 142 of FIG. 1C, the connector pins H1 and H3 are short-circuited by the connection 143 among the connector pins H1 to H3 corresponding to the dedicated ports P1 to P3. Therefore, when the housing connector 142 of FIG. 1C is attached to the base connector 141, the CPU 10 detects the value of the voltage received by the dedicated ports P1, P2, and P3 via the input / output I / F 13 and detects A combination pattern (H, L, H) consisting of a set of values is determined.

また、図1(D)のハウジングコネクタ142は、専用ポートP1〜P3に対応したコネクタピンH1〜H3は結線143により短絡されていない。したがって、図1(D)のハウジングコネクタ142がベースコネクタ141に装着されたときは、CPU10は、入出力I/F13を介して専用ポートP1、P2およびP3が受ける電圧の値を検出し、検出値の組みからなる組合せパターン(H,L,L)を判定する。   In the housing connector 142 of FIG. 1D, the connector pins H1 to H3 corresponding to the dedicated ports P1 to P3 are not short-circuited by the connection 143. Therefore, when the housing connector 142 of FIG. 1D is attached to the base connector 141, the CPU 10 detects the value of the voltage received by the dedicated ports P1, P2, and P3 via the input / output I / F 13 and detects them. A combination pattern (H, L, L) consisting of a set of values is determined.

(テーブルの構成)
図2は、実施の形態1にかかるテーブル122Aおよび122Bの構成の一例を示す図である。図2(A)は検査時に検索されるテーブル122Aを示す、図2(B)は通常時に検索されるテーブル122Bを示す。検査時のテーブル122Aには、図1(A)〜図1(C)に示された3つの組合せパターン16と、各組合せパターンに関連付けてデータ17が登録されている。データ17は、関連した組合せパターンに対応して機能の種類と、当該機能において汎用入出力ポートM1とM2を入力ポートおよび出力ポートのいずれに切替えるかを指示する切替えデータとを含む。
(Table structure)
FIG. 2 is a diagram illustrating an example of a configuration of the tables 122A and 122B according to the first embodiment. 2A shows a table 122A searched at the time of inspection, and FIG. 2B shows a table 122B searched at the normal time. In the table 122A at the time of inspection, the three combination patterns 16 shown in FIGS. 1A to 1C and the data 17 are registered in association with each combination pattern. The data 17 includes the type of function corresponding to the associated combination pattern, and switching data indicating whether the general purpose input / output ports M1 and M2 are switched to the input port or the output port in the function.

データ17の機能の種類は、検査項目と「プログラム書込」とを含む。検査項目は、例えば、検査結果を表示する「LED(Light Emitting Diode)点灯」およびマイコン1の「処理データ読出」を含む。   The type of function of the data 17 includes an inspection item and “program writing”. The inspection items include, for example, “LED (Light Emitting Diode) lighting” for displaying the inspection result and “processing data reading” of the microcomputer 1.

データ17が示す「LED点灯」の切替えデータは、汎用入出力ポートM1とM2をいずれも出力ポートに切替えることを示す。また、データ17が示す「処理データ読出」の切替えデータは、汎用入出力ポートM1とM2をいずれも出力ポートに切替えることを示すとともに、汎用入出力ポートM1からはデータを出力することを示し、汎用入出力ポートM2からはデータが読出されたアドレスを出力することを示す。   The switching data of “LED lighting” indicated by the data 17 indicates that both the general-purpose input / output ports M1 and M2 are switched to output ports. The switching data of “process data read” indicated by the data 17 indicates that both the general-purpose input / output ports M1 and M2 are switched to the output port, and indicates that data is output from the general-purpose input / output port M1. The general input / output port M2 indicates that an address from which data is read is output.

また、データ17の「プログラム書込」の切替えデータは、汎用入出力ポートM1とM2をいずれも入力ポートに切替えることを示すとともに、汎用入出力ポートM1からはプログラムのデータ(プログラムコード)を入力することを示し、汎用入出力ポートM2からはプログラムを書込むアドレスを入力することを示す。   In addition, the “program write” switching data of data 17 indicates that both the general-purpose input / output ports M1 and M2 are switched to the input port, and program data (program code) is input from the general-purpose input / output port M1. This indicates that an address for writing a program is input from the general-purpose input / output port M2.

図1および図2(A)のテーブル122Aによれば、図1(A)のハウジングコネクタ142が装着されたときは、CPU10は組合せパターン(H,H,L)を判定する。したがって、CPU10は、組合せパターン(H,H,L)に基づきテーブル122Aを検索し、検索結果に基づき、汎用入出力ポートM1から入力するプログラムデータを、汎用入出力ポートM2から入力するアドレスを用いたアドレス指定によりプログラム領域121に書込む「プログラム書込」の機能が設定されたことを判断する。   According to the table 122A of FIGS. 1 and 2A, when the housing connector 142 of FIG. 1A is attached, the CPU 10 determines the combination pattern (H, H, L). Therefore, the CPU 10 searches the table 122A based on the combination pattern (H, H, L), and uses the program data input from the general-purpose input / output port M1 based on the search result using the address input from the general-purpose input / output port M2. It is determined that the “program write” function for writing to the program area 121 is set by the designated address.

図1(B)のハウジングコネクタ142が装着されたときは、CPU10は組合せパターン(H,H,H)を判定する。したがって、CPU10は、組合せパターン(H,H,H)に基づきテーブル122Aを検索し、検索結果に基づき、図示しないLEDを点灯させるための制御信号を、汎用入出力ポートM1またはM2から出力する機能が設定されたことを判断する。   When the housing connector 142 of FIG. 1B is attached, the CPU 10 determines the combination pattern (H, H, H). Therefore, the CPU 10 searches the table 122A based on the combination pattern (H, H, H), and outputs a control signal for turning on an LED (not shown) from the general-purpose input / output port M1 or M2 based on the search result. It is determined that is set.

また、図1(C)のハウジングコネクタ142が装着されたときは、CPU10は組合せパターン(H,L,H)を判定する。したがって、CPU10は、組合せパターン(H,L,H)に基づきテーブル122Aを検索し、検索結果に基づき、データ領域120のデータをアドレス指定により読出し、読出されたデータを汎用入出力ポートM1から出力し、指定アドレスを汎用入出力ポートM2から出力する機能が設定されたことを判断する。   When the housing connector 142 of FIG. 1C is attached, the CPU 10 determines the combination pattern (H, L, H). Therefore, the CPU 10 searches the table 122A based on the combination pattern (H, L, H), reads the data in the data area 120 by addressing based on the search result, and outputs the read data from the general-purpose input / output port M1. Then, it is determined that the function for outputting the designated address from the general-purpose input / output port M2 is set.

図2(B)を参照して、通常時のテーブル122Bには、図1(D)に示された組合せパターン(H,L,L)に関連付けて、例えば給湯器の制御信号の種類が、汎用入出力ポートM1とM2の値の組と対応付けて登録されている。例えば、汎用入出力ポートM1およびMが受ける電圧がパターン(L,L)を示すときは、CPU10はパターン(L,L)に基づき当該テーブル122Bを検索することにより、連続燃焼時間として10分の制御信号を読出して設定することができる。   Referring to FIG. 2B, in the normal table 122B, for example, the type of control signal of the water heater is associated with the combination pattern (H, L, L) shown in FIG. It is registered in association with a set of general purpose input / output ports M1 and M2. For example, when the voltages received by the general-purpose input / output ports M1 and M indicate the pattern (L, L), the CPU 10 searches the table 122B based on the pattern (L, L), thereby obtaining a continuous combustion time of 10 minutes. The control signal can be read and set.

また、同様に、汎用入出力ポートM1およびMが受ける電圧がパターン(H,L)を示すときは、CPU10はパターン(H,L)に基づき当該テーブル122Bから連続燃焼時間として20分の制御信号を読出して設定することができる。   Similarly, when the voltages received by the general-purpose input / output ports M1 and M indicate the pattern (H, L), the CPU 10 controls the control signal from the table 122B based on the pattern (H, L) for 20 minutes as a continuous combustion time. Can be read and set.

また、同様に、汎用入出力ポートM1およびMが受ける電圧がパターン(H,H)または(L,H)を示すときは、CPU10はパターン(H,H)または(L,H)に基づき当該テーブル122Bからガス種類として13AまたはLPGの制御信号を読出して設定することができる。   Similarly, when the voltage received by the general-purpose input / output ports M1 and M indicates the pattern (H, H) or (L, H), the CPU 10 performs the operation based on the pattern (H, H) or (L, H). The control signal of 13A or LPG can be read and set as the gas type from the table 122B.

このように、CPU10は、コネクタ14が装着された場合に、専用ポートP1、P2およびP3のそれぞれが受ける電圧が2値(HまたはL)のいずれであるかを検出し、各専用ポートの検出値の組からなる組合せパターンに基づき、汎用入出力ポートM1とM2を、入力ポートまたは出力ポートのいずれに切替えるか、および各汎用入出力ポートから入力(または出力)する内容(プログラムデータ、読書きアドレス、制御信号)を決定することができる。   As described above, when the connector 14 is attached, the CPU 10 detects whether the voltage received by each of the dedicated ports P1, P2, and P3 is binary (H or L), and detects each dedicated port. Based on the combination pattern consisting of value pairs, the general-purpose input / output ports M1 and M2 are switched to input ports or output ports, and the contents (program data, read / write) are input (or output) from each general-purpose input / output port. Address, control signal) can be determined.

(処理フローチャート)
図3は、実施の形態1にかかる処理のフローチャートである。このフローチャートに従うプログラムは、予め記憶部12に格納される。CPU110が、プログラムを読出し実行することにより処理が実現される。図3の処理は、マイコン1の電源がオンされる等してCPU10がリセットされたときに開始される。
(Processing flowchart)
FIG. 3 is a flowchart of processing according to the first embodiment. The program according to this flowchart is stored in the storage unit 12 in advance. The processing is realized by the CPU 110 reading and executing the program. The process of FIG. 3 is started when the CPU 10 is reset by turning on the power of the microcomputer 1 or the like.

CPU10は、処理を開始後は、タイマを用いて予め定められた時間が経過する否かを判定する(ステップS5)。予め定められた時間は、コネクタ14が装着されて専用ポートP1〜P3が受ける電圧が、十分に安定するのに要する時間に基づき決定される。   After starting the process, the CPU 10 determines whether or not a predetermined time has elapsed using a timer (step S5). The predetermined time is determined based on the time required for the voltage received by the dedicated ports P1 to P3 when the connector 14 is attached to be sufficiently stabilized.

CPU10は、予め定められた時間が経過したと判定しない間(ステップS5でNO)は、ステップS5の処理を繰返す。一方、予め定められた時間が経過したと判定されると(ステップS5でYES)、CPU10は、専用ポートP1〜P3が受ける電圧が2値(HまたはL)のいずれであるかを、入出力I/F13を介して検出する(ステップS6)。そして、CPU10は、各専用ポートの検出値の組みからなる組合せパターンを判定する。   CPU 10 repeats the process of step S5 while it is not determined that a predetermined time has elapsed (NO in step S5). On the other hand, when it is determined that a predetermined time has elapsed (YES in step S5), the CPU 10 inputs / outputs whether the voltage received by the dedicated ports P1 to P3 is binary (H or L). Detection is performed via the I / F 13 (step S6). And CPU10 determines the combination pattern which consists of a set of the detection value of each dedicated port.

CPU10は、判定された組合せパターンに従い、“検査”または“通常”のいずれのパターンであるかを決定する(ステップS7)。CPU10は、専用P1〜P3が受ける電圧の値の組合せパターンが(H,L,L)であると判定したときは、すなわち図1(D)のハウジングコネクタ142が装着された場合には“通常”と決定し(ステップS7で“通常”)、それ以外の組合せパターンと判定したときは、すなわち図1(A)〜(C)のハウジングコネクタ142が装着された場合には“検査”と決定する(ステップS7で“検査”)。   The CPU 10 determines whether the pattern is “inspection” or “normal” according to the determined combination pattern (step S7). When the CPU 10 determines that the combination pattern of the voltage values received by the dedicated P1 to P3 is (H, L, L), that is, when the housing connector 142 of FIG. ("Normal" in step S7), and when it is determined that the combination pattern is other than that, that is, when the housing connector 142 of FIGS. (“Inspection” in step S7).

“通常”と決定された場合は(ステップS7で“通常”)、CPU10は汎用の入出力ポートM1とM2が受ける電圧の値を入力し(ステップS15)、入力値のパターン((L,L)、(H,L)、(H,H)および(L,H)のいずれか)に基づきテーブル122Bを検索し(ステップS16)、検索によりテーブル122Bから制御信号を読出して設定する(ステップS17)。‘設定’は、制御信号が示す内容(燃焼時間またはガス種)を例えばデータ領域120に格納することを言う。CPU10は給湯器の運転時にデータ領域120に格納された内容を参照しながら、制御プログラムを実行することにより、給湯器を制御信号による設定内容に従い運転制御することができる。   When it is determined as “normal” (“normal” in step S7), the CPU 10 inputs the voltage value received by the general-purpose input / output ports M1 and M2 (step S15), and the input value pattern ((L, L ), (H, L), (H, H), or (L, H)) (step S16), and the control signal is read from the table 122B and set by the search (step S17). ). 'Setting' means that the content (combustion time or gas type) indicated by the control signal is stored in the data area 120, for example. The CPU 10 can control the operation of the water heater in accordance with the setting contents by the control signal by executing the control program while referring to the contents stored in the data area 120 during the operation of the water heater.

“検査”と決定された場合は(ステップS7で“検査”)、CPU10は汎用の入出力ポートM1とM2が受ける電圧の値のパターンに基づきテーブル122Aを検索する(ステップS12)。検索の結果に従い、汎用の入出力ポートM1とM2のそれぞれを、入力ポートまたは出力ポートのいずれに切替えるか、および各汎用入出力ポートから入力(または出力)する内容(プログラム、データ、アドレス、制御信号)を決定する(ステップS13)。   If “inspection” is determined (“inspection” in step S7), the CPU 10 searches the table 122A based on the voltage value pattern received by the general-purpose input / output ports M1 and M2 (step S12). According to the search result, each of the general-purpose input / output ports M1 and M2 is switched to either an input port or an output port, and contents (program, data, address, control) input (or output) from each general-purpose input / output port Signal) is determined (step S13).

例えば、「プログラム書込」の決定がなされた場合は(ステップS13で“プログラム書込”)、CPU10は、入出力I/F13を介して汎用入出力ポートM1とM2を入力ポートに切替えて、シリアル伝送されるプログラムデータを汎用入出力ポートM1から入力し、また、汎用入出力ポートM2からアドレスデータを入力する。CPU10は、汎用入出力ポートM1から入力するプログラムデータを、汎用入出力ポートM2から入力するアドレスを用いたアドレス指定により、プログラム領域121に書込む(ステップS19とS20)。   For example, when “program write” is determined (“program write” in step S13), the CPU 10 switches the general-purpose input / output ports M1 and M2 to input ports via the input / output I / F 13. Serially transmitted program data is input from the general-purpose input / output port M1, and address data is input from the general-purpose input / output port M2. The CPU 10 writes the program data input from the general-purpose input / output port M1 into the program area 121 by addressing using the address input from the general-purpose input / output port M2 (steps S19 and S20).

また、「データ読出」の決定がなされた場合は(ステップS13で“データ読出”)、CPU10は、入出力I/F13を介して汎用入出力ポートM1とM2を出力ポートに切替える。CPU10は、データ領域120からアドレス指定によりデータを読出し、汎用入出力ポートM1から読出されたデータをシリアル伝送により出力する。また、CPU10は、読出しに用いた指定アドレスを汎用入出力ポートM2から出力する(ステップS23とS25)。   When “data read” is determined (“data read” in step S13), the CPU 10 switches the general-purpose input / output ports M1 and M2 to output ports via the input / output I / F 13. The CPU 10 reads data from the data area 120 by address designation, and outputs the data read from the general-purpose input / output port M1 by serial transmission. Further, the CPU 10 outputs the designated address used for reading from the general-purpose input / output port M2 (steps S23 and S25).

また、「LED点灯」の決定がなされた場合は(ステップS13で“LED点灯”)、CPU10は、入出力I/F13を介して汎用入出力ポートM1またはM2を出力ポートに切替えて、汎用入出力ポートM1またはM2からLED点灯のための制御信号を出力する(ステップS27とS29)。   In addition, when “LED lighting” is determined (“LED lighting” in step S13), the CPU 10 switches the general-purpose input / output port M1 or M2 to the output port via the input / output I / F 13 to perform general-purpose input. A control signal for lighting the LED is output from the output port M1 or M2 (steps S27 and S29).

上記に述べたプログラム書込みの終了後、またはデータ読出しの終了後、またはLED点灯、または制御信号の入力後は、図3の一連の処理は終了する。   After completion of the program writing described above or after completion of data reading, or after the LED is turned on or a control signal is input, the series of processes in FIG. 3 ends.

[実施の形態2]
実施の形態2は、実施の形態1の変形例を示す。図4は、実施の形態2にかかる入出力制御システムの構成を概略的に示す図である。図4は、図1と比較してハウジングコネクタ142の構成が相違するが、マイコン1の構成は図1のそれと同様であり、説明は繰返さない。ここでは、主に当該相違点を説明する。
[Embodiment 2]
The second embodiment shows a modification of the first embodiment. FIG. 4 is a diagram schematically illustrating a configuration of the input / output control system according to the second embodiment. 4 differs from FIG. 1 in the configuration of the housing connector 142, but the configuration of the microcomputer 1 is the same as that in FIG. 1, and description thereof will not be repeated. Here, the difference will be mainly described.

実施の形態1では、コネクタ14が装着された場合に、電源Vccと結線するコネクタピンの数と当該コネクタピンの位置の組合せパターンは4通りであった。これに対して、実施の形態2では、外部の検査装置等を接続する場合であって、図4(A)〜図4(H)に示す8通りのパターンに変化させることができる。具体的には、図4(A)〜図4(H)では、ハウジングコネクタ142にコネクタピンH0を追加して、電源VccをコネクタピンH0に接続する。そして、残りのコネクタピンH1〜H3について、結線143によって、コネクタピンH0を介して電源Vccに短絡されるコネクタピンの数と当該コネクタピンの位置の組合せを、図4(A)〜図4(H)に示す8通りのパターンに変化させることができる。なお、図4(B)〜図4(H)では電源Vccの図示が略されているが、コネクタピンH0には電源Vccが図4(B)と同様に接続されている。   In the first embodiment, when the connector 14 is mounted, there are four combinations of the number of connector pins connected to the power supply Vcc and the position of the connector pins. On the other hand, in the second embodiment, an external inspection apparatus or the like is connected, and the pattern can be changed to eight patterns shown in FIGS. 4 (A) to 4 (H). Specifically, in FIGS. 4A to 4H, a connector pin H0 is added to the housing connector 142, and the power supply Vcc is connected to the connector pin H0. For the remaining connector pins H1 to H3, combinations of the number of connector pins short-circuited to the power supply Vcc via the connector pin H0 by the connection 143 and the positions of the connector pins are shown in FIGS. The pattern can be changed to eight patterns shown in H). 4 (B) to 4 (H), the power supply Vcc is not shown, but the power supply Vcc is connected to the connector pin H0 in the same manner as in FIG. 4 (B).

例えば、図4(A)のハウジングコネクタ142が装着された場合は、組合せパターンは(H,H,L)となる。また、同様に図4(B)の場合は(H,H,H)となり、図4(C)の場合は(H,L,H)となり、図4(D)の場合は(L,H,H)となり、図4(E)の場合は(L,L,H)となり、図4(F)の場合は(L,H,L)となり、図4(G)の場合は(H,L,L)となり、および図4(H)の場合は(L,L,L)となる。   For example, when the housing connector 142 of FIG. 4A is attached, the combination pattern is (H, H, L). Similarly, in the case of FIG. 4B, it becomes (H, H, H), in the case of FIG. 4C, it becomes (H, L, H), and in the case of FIG. , H), (L, L, H) in the case of FIG. 4 (E), (L, H, L) in the case of FIG. 4 (F), (H, H in the case of FIG. 4 (G)). L, L), and (L, L, L) in the case of FIG.

したがって、実施の形態2では、実施の形態1に比較して組合せパターンが増加することにより、実施の形態1に比較して検査項目の種類を増加させることができる。検査項目として、外部機器の負荷を作動させて検査することができる。   Therefore, in the second embodiment, the number of types of inspection items can be increased as compared with the first embodiment by increasing the combination patterns as compared with the first embodiment. As an inspection item, it is possible to inspect by operating a load of an external device.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 マイコン、12 記憶部、14 コネクタ、120 データ領域、121 プログラム領域、122A,122B テーブル、141 ベースコネクタ、142 ハウジングコネクタ、143 結線、B1,B2,B3,B4,B5,H0,H1,H2,H3,H4,H5 コネクタピン、M1,M2,M3,M4,M5 汎用入出力ポート、P1,P2,P3 専用ポート。 1 microcomputer, 12 storage unit, 14 connector, 120 data area, 121 program area, 122A, 122B table, 141 base connector, 142 housing connector, 143 connection, B1, B2, B3, B4, B5, H0, H1, H2, H3, H4, H5 connector pins, M1, M2, M3, M4, M5 general purpose input / output ports, P1, P2, P3 dedicated ports.

Claims (4)

マイコンを含む入出力制御装置であって、
前記マイコンは、
外部から電圧を受ける複数の専用ポートと、
前記複数の専用ポートとは異なる汎用の入出力ポートと、
前記汎用の入出力ポートを制御する制御部と、を備え、
前記制御部は、
各前記専用ポートが受ける電圧が2値の電位のいずれであるかを検出し、各前記専用ポートの検出値の組みからなる組合せパターンに従い、前記汎用の入出力ポートを入力ポートまたは出力ポートに切替える、入出力制御装置。
An input / output control device including a microcomputer,
The microcomputer is
Multiple dedicated ports that receive voltage from outside,
A general-purpose input / output port different from the plurality of dedicated ports;
A control unit for controlling the general-purpose input / output port;
The controller is
Detecting which of the binary potentials the voltage received by each dedicated port is detected, and switching the general-purpose input / output port to an input port or an output port according to a combination pattern composed of a combination of detection values of each dedicated port , I / O controller.
前記制御部は、
前記制御装置がリセットされてから予め定められた時間が経過したとき、前記検出を開始する、請求項1に記載の入出力制御装置。
The controller is
The input / output control device according to claim 1, wherein the detection is started when a predetermined time has elapsed since the control device was reset.
前記入出力制御装置は、さらに、前記複数の専用ポートに着脱自在に装着されるコネクタを含み、
各専用ポートの電位は、装着される前記コネクタの種類により決定される、請求項1または2に記載の入出力制御装置。
The input / output control device further includes a connector that is detachably attached to the plurality of dedicated ports,
The input / output control device according to claim 1, wherein the potential of each dedicated port is determined by a type of the connector to be mounted.
請求項1または2に記載の入出力制御装置と、
電源と、
前記複数の専用ポートに着脱自在の複数種類のコネクタと、を備え、
各前記コネクタは、それぞれが各前記専用ポートに対応した位置に設けられた複数のコネクタピンを有し、
前記各コネクタは、装着時に、前記電源と結線される前記コネクタピンの数と当該コネクタピンの位置の組合せが、他のコネクタの当該組合せとは相違する、入出力制御システム。
The input / output control device according to claim 1 or 2,
Power supply,
A plurality of types of connectors detachably attached to the plurality of dedicated ports;
Each of the connectors has a plurality of connector pins provided at positions corresponding to the dedicated ports,
Each connector is an input / output control system in which the combination of the number of connector pins connected to the power source and the position of the connector pins is different from the combination of other connectors at the time of mounting.
JP2016125540A 2016-06-24 2016-06-24 Device and system for input/output control Pending JP2017228209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016125540A JP2017228209A (en) 2016-06-24 2016-06-24 Device and system for input/output control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016125540A JP2017228209A (en) 2016-06-24 2016-06-24 Device and system for input/output control

Publications (1)

Publication Number Publication Date
JP2017228209A true JP2017228209A (en) 2017-12-28

Family

ID=60891999

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016125540A Pending JP2017228209A (en) 2016-06-24 2016-06-24 Device and system for input/output control

Country Status (1)

Country Link
JP (1) JP2017228209A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114413537A (en) * 2020-10-28 2022-04-29 海信(山东)冰箱有限公司 Refrigerator and control scheme determination method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114413537A (en) * 2020-10-28 2022-04-29 海信(山东)冰箱有限公司 Refrigerator and control scheme determination method thereof

Similar Documents

Publication Publication Date Title
US7668685B2 (en) Electrical connector and process for decentralized storage of the parameters of a sensor
JP2008191989A (en) Numerical controller
JP4784759B2 (en) PLC equipment
TW201327386A (en) Manufacturing system and firmware burning method
JP2017228209A (en) Device and system for input/output control
US7559043B2 (en) Library test circuit and library test method
CN114008984B (en) Computer readable storage medium and management method
JP3740746B2 (en) Programmable controller with expansion unit
US7051057B2 (en) General-purpose functional circuit and general-purpose unit for programmable controller
US7212442B2 (en) Structure for directly burning program into motherboard
JP4953788B2 (en) Electronic equipment
CN110008160B (en) Information processing apparatus
JP4938296B2 (en) Image forming apparatus
CN200986663Y (en) Programable controller system
JP2006209876A (en) Electronic control device
US11398260B2 (en) Network device and network connection method with linear feedback shift register
CN108052462B (en) OLED substrate identification system and method
US7257748B2 (en) Method for programming and/or testing for correct functioning of an electronic circuit
JP5341674B2 (en) Vending machine control equipment
JP2009077253A (en) Sensor system, control unit and detection sensor
JP2006350501A (en) Microcomputer driving board
JP2017228204A (en) Control circuit
US10935594B1 (en) Curve trace analysis testing apparatus controller
JP5115274B2 (en) Logic control apparatus and program writing method
JP5294721B2 (en) Board identification device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190530

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200630

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20201222