JP2012053762A - Data input/output control device - Google Patents

Data input/output control device Download PDF

Info

Publication number
JP2012053762A
JP2012053762A JP2010196941A JP2010196941A JP2012053762A JP 2012053762 A JP2012053762 A JP 2012053762A JP 2010196941 A JP2010196941 A JP 2010196941A JP 2010196941 A JP2010196941 A JP 2010196941A JP 2012053762 A JP2012053762 A JP 2012053762A
Authority
JP
Japan
Prior art keywords
input
output
control
data
terminal
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.)
Withdrawn
Application number
JP2010196941A
Other languages
Japanese (ja)
Inventor
Takahide Takahashi
隆英 高橋
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.)
Toshiba TEC Corp
Original Assignee
Toshiba TEC 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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP2010196941A priority Critical patent/JP2012053762A/en
Publication of JP2012053762A publication Critical patent/JP2012053762A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data input/output control device which is excellent in reliability for writing control data in an input/output device without generating any error.SOLUTION: A CPU 1 address-designates an input terminal corresponding to a necessary control command, and outputs control data of 16 bits whose all bits are set to logic "1". A GPIO 30 fetches only input control data to the address-designated input terminal among control data input to each input terminal, and stores the fetched control data by a flip flop corresponding to the address-designated input terminal. The control data are output in which only the bits of an output terminal corresponding to the flip flop are set to logic "1" while the bits of the residual output terminals are not set to logic "1" from each output terminal.

Description

本発明の実施形態は、コントローラと、そのコントローラから発せられる制御データを保持および出力する入出力デバイスとを備えたデータ入出力制御装置に関する。   Embodiments described herein relate generally to a data input / output control device including a controller and an input / output device that holds and outputs control data generated from the controller.

コントローラとその制御対象機器との間に接続され、コントローラから発せられる制御データを保持および出力する汎用の入出力デバイスいわゆるGPIO(General Purpose Input/Output)が知られている(例えば特許文献1)。   A general-purpose input / output device so-called GPIO (General Purpose Input / Output) that is connected between a controller and a device to be controlled and holds and outputs control data emitted from the controller is known (for example, Patent Document 1).

コントローラは、GPIOに保持された制御データを新たな制御データに変更したい場合、GPIO内の制御データを読込んで内部のレジスタに記憶し、そのレジスタ内の制御データを同レジスタ上でモデファイしてからGPIOに書込むリード・モデファイ・ライト処理を行う。   When the controller wants to change the control data held in GPIO to new control data, it reads the control data in GPIO and stores it in an internal register, modifies the control data in that register on the same register, and so on. Read / modify / write processing to write to GPIO.

特開平11−134250号公報JP 11-134250 A

上記コントローラは、リード・モデファイ・ライト処理の最中に割込み処理が入ると、リードとモデファイとの間のタイミングまたはモデファイとライトの間のタイミングでレジスタ内の制御データをメモリに退避し、その退避後に割込み処理を実行し、割込み処理が終了してからメモリ内の制御データをレジスタに戻す処理を行う。   When an interrupt process is entered during the read / modify / write process, the controller saves the control data in the register to the memory at the timing between read and modify or between modify and write. The interrupt process is executed later, and after the interrupt process is completed, the process of returning the control data in the memory to the register is performed.

この場合、制御データを退避したり戻したりしているうちに、制御データに誤りを生じる可能性がある。対策として、リード・モデファイ・ライト処理の最中は割込み処理を受付けないようにすることも考えられるが、そうすると、コントローラが搭載されている機器のパフォーマンスが落ちるという問題がある。   In this case, an error may occur in the control data while the control data is saved or returned. As a countermeasure, it may be possible not to accept interrupt processing during read-modify-write processing. However, if this is done, there is a problem in that the performance of the device in which the controller is mounted deteriorates.

本発明の実施形態の目的は、制御データを誤りなく入出力デバイスに書込むことができる信頼性にすぐれたデータ入出力制御装置を提供することである。   An object of an embodiment of the present invention is to provide a highly reliable data input / output control apparatus capable of writing control data to an input / output device without error.

本発明の実施形態のデータ入出力制御装置は、制御対象機器に対する制御データを発するコントローラと、このコントローラに接続される複数の入力端子、および上記制御対象機器に接続される複数の出力端子を有し、制御対象機器に対する複数の制御指令が各入力端子に割当てられた入出力デバイスと、を備える。そして、コントローラは、制御対象機器に対する制御指令が必要になると、入出力デバイスの各入力端子のうち、必要となった制御指令が割当てられている入力端子をアドレス指定するとともに、全てのビットが所定の論理値となる制御データを出力する。入出力デバイスは、各入力端子に入力される制御データのうち前記アドレス指定された入力端子への入力制御データのみ取込んで保持することにより、同アドレス指定された入力端子に対応する出力端子のビットのみ所定の論理値となって残りの出力端子のビットは所定の論理値とならない制御データを各出力端子から出力する。   A data input / output control device according to an embodiment of the present invention includes a controller that issues control data for a control target device, a plurality of input terminals connected to the controller, and a plurality of output terminals connected to the control target device. And an input / output device in which a plurality of control commands for the device to be controlled are assigned to each input terminal. When a control command for the control target device is required, the controller addresses the input terminal to which the required control command is assigned among the input terminals of the input / output device, and all the bits are predetermined. The control data that becomes the logical value of is output. The input / output device captures and holds only the input control data to the addressed input terminal among the control data input to each input terminal, so that the output terminal corresponding to the addressed input terminal Only the bits have a predetermined logical value, and the control data in which the remaining output terminal bits do not have the predetermined logical value is output from each output terminal.

一実施形態の構成を示すブロック図。The block diagram which shows the structure of one Embodiment. 一実施形態のGPIOの要部を示すブロック図。The block diagram which shows the principal part of GPIO of one Embodiment. 一実施形態における各制御指令とその各制御指令が割当てられた各入力端子のアドレスとの対応および各フリップフロップの動作パターンを示す図。The figure which shows the response | compatibility with each control command and the address of each input terminal to which each control command was allocated in one Embodiment, and the operation pattern of each flip-flop. 一実施形態における各制御指令とその各制御指令が割当てられた各入力端子のアドレスとの対応および各出力端子の出力の例を示す図。The figure which shows the example of a response | compatibility with each control command and the address of each input terminal to which each control command was assigned, and the output of each output terminal in one Embodiment.

1…CPU(コントローラ)、2…内部メモリ、3…内部レジスタ、4…入出力インタフェース、11…アドレスバス、12…16ビットのデータバス、13…コントロールバス、20…メモリ、30…GPIO(入出力デバイス)、32…データ入力ポート、35…データ出力ポート、41,51…8ビットのデータバス、42,52…ドライバ(制御対象機器)、43,53…ステップモータ、60…モードスイッチ   1 ... CPU (controller), 2 ... internal memory, 3 ... internal register, 4 ... input / output interface, 11 ... address bus, 12 ... 16-bit data bus, 13 ... control bus, 20 ... memory, 30 ... GPIO (input Output device), 32 ... Data input port, 35 ... Data output port, 41, 51 ... 8-bit data bus, 42, 52 ... Driver (device to be controlled), 43, 53 ... Step motor, 60 ... Mode switch

以下、一実施形態について図面を参照して説明する。
図1において、1は組込み機器のコントローラであるCPUで、内部メモリ2および内部レジスタ3を有し、後述のステップモータ43,53を駆動制御するための制御指令として16ビットの制御データを発する。
Hereinafter, an embodiment will be described with reference to the drawings.
In FIG. 1, reference numeral 1 denotes a CPU which is a controller of an embedded device, which has an internal memory 2 and an internal register 3, and issues 16-bit control data as a control command for driving and controlling step motors 43 and 53 described later.

このCPU1に、外部機器や操作部からの入力データを取込む入力インタフェース4が接続される。また、CPU1に、数ビットのアドレスバス11、16ビットのデータバス12、数ビットのコントロールバス13を介してデータ記憶用のメモリ20が接続される。また、CPU1に、上記アドレスバス11、データバス12、コントロールバス13を介して汎用の入出力デバイスいわゆるGPIO(General Purpose Input/Output)30が接続される。   The CPU 1 is connected to an input interface 4 that takes in input data from an external device or an operation unit. Further, a data storage memory 20 is connected to the CPU 1 via a several-bit address bus 11, a 16-bit data bus 12, and a several-bit control bus 13. Further, a general-purpose input / output device so-called GPIO (General Purpose Input / Output) 30 is connected to the CPU 1 through the address bus 11, the data bus 12, and the control bus 13.

GPIO30は、アドレスバス11が接続されるアドレス入力ポート31、データバス12が接続されるデータ入力ポート32、コントロールバス13が接続されるコントロール信号入力ポート33、モード信号入力ポート34、およびデータ出力ポート35を有する。   The GPIO 30 includes an address input port 31 to which the address bus 11 is connected, a data input port 32 to which the data bus 12 is connected, a control signal input port 33 to which the control bus 13 is connected, a mode signal input port 34, and a data output port. 35.

データ入力ポート32は、図2に示すように、16ビットのデータバス12が接続される16個の入力端子からなる。これら入力端子には、1000Hから1015Hまでのアドレスが設定されるとともに、後述するドライバ42,52に対する複数の制御指令が割当てられている。   As shown in FIG. 2, the data input port 32 includes 16 input terminals to which the 16-bit data bus 12 is connected. Addresses from 1000H to 1015H are set to these input terminals, and a plurality of control commands for drivers 42 and 52 described later are assigned.

モード信号入力ポート34には、第1ライトモードおよび第2ライトモードを選択的に設定するモード設定手段として、手操作開閉式のモードスイッチ60と抵抗61の相互接続点が接続される。このモードスイッチ60および抵抗61の直列回路に直流電圧Vdが印加され、その抵抗61に生じる電圧がモード設定信号としてモード信号入力ポート34に入力される。すなわち、モードスイッチ60がオンされるとモード設定信号が論理“1”となって第1ライトモードが設定され、モードスイッチ60がオフされるとモード設定信号が論理“0”となって第2ライトモードが設定される。モード設定信号はCPU1にも供給される。   The mode signal input port 34 is connected to an interconnection point between a manually operated open / close mode switch 60 and a resistor 61 as mode setting means for selectively setting the first light mode and the second light mode. A DC voltage Vd is applied to the series circuit of the mode switch 60 and the resistor 61, and a voltage generated in the resistor 61 is input to the mode signal input port 34 as a mode setting signal. That is, when the mode switch 60 is turned on, the mode setting signal becomes logic “1” to set the first write mode, and when the mode switch 60 is turned off, the mode setting signal becomes logic “0” and the second The light mode is set. The mode setting signal is also supplied to the CPU 1.

データ出力ポート35は、図2に示すように、16ビットの制御データを出力する16個の出力端子からなる。これら出力端子にはD0からD15までの名称が付けられている。そして、これら出力端子D0〜D15に対応する16個のフリップフロップF0〜F15がGPIO30内に設けられ、これらフリップフロップF0〜F15の出力端が出力端子D0〜D15に接続される。   As shown in FIG. 2, the data output port 35 includes 16 output terminals for outputting 16-bit control data. These output terminals are named D0 to D15. Then, 16 flip-flops F0 to F15 corresponding to these output terminals D0 to D15 are provided in the GPIO 30, and output terminals of these flip-flops F0 to F15 are connected to the output terminals D0 to D15.

このデータ出力ポート35の出力端子D0〜D15のうち、出力端子D0〜D7に8ビットのデータバス41を介して第1制御対象機器たとえばドライバ42が接続され、残りの出力端子D8〜D15に8ビットのデータバス51を介して第2制御対象機器たとえばドライバ52が接続される。   Among the output terminals D0 to D15 of the data output port 35, the first control target device, for example, the driver 42 is connected to the output terminals D0 to D7 via the 8-bit data bus 41, and 8 is connected to the remaining output terminals D8 to D15. A second control target device such as a driver 52 is connected via a bit data bus 51.

ドライバ42は、CPU1およびGPIO30の第1ライトモードに合せた仕様を有するもので、GPIO30の出力端子D0〜D7から出力される8ビットの制御データのうち、論理“1”(=所定の論理値)となるビットに割当てられている動作モードたとえば励磁方式および電流でステップモータ43を駆動する。ドライバ52は、同じくCPU1およびGPIO30の第1ライトモードに合せた仕様を有するもので、GPIO30の出力端子D8〜D15から出力される8ビットの制御データのうち、論理“1”(=所定の論理値)となるビットに割当てられている動作モードたとえば励磁方式および電流でステップモータ53を駆動する。   The driver 42 has a specification that matches the first write mode of the CPU 1 and the GPIO 30, and among the control data of 8 bits output from the output terminals D0 to D7 of the GPIO 30, a logical “1” (= predetermined logical value) The step motor 43 is driven by the operation mode assigned to the bit to be), for example, the excitation method and current. The driver 52 also has a specification adapted to the first write mode of the CPU 1 and the GPIO 30, and among the control data of 8 bits output from the output terminals D8 to D15 of the GPIO 30, a logic “1” (= predetermined logic) The step motor 53 is driven by the operation mode assigned to the bit (value), for example, the excitation method and current.

なお、ドライバ42,52の仕様としては、CPU1およびGPIO30の第1ライトモードに合せた仕様のほかに、CPU1およびGPIO30の第2ライトモードに相当するリード・モデファイ・ライト処理に対応する仕様がある。リード・モデファイ・ライト処理に対応する仕様のドライバ42は、GPIO30の出力端子D0〜D7から出力される8ビットの制御データのコードパターンから動作モードである励磁方式および電流を識別し、識別した励磁方式および電流でステップモータ43を駆動する。同様に、リード・モデファイ・ライト処理に対応する仕様のドライバ52は、GPIO30の出力端子D8〜D15から出力される8ビットの制御データのコードパターンに基づいて動作モードである励磁方式および電流を判定し、判定した励磁方式および電流でステップモータ53を駆動する。   The specifications of the drivers 42 and 52 include a specification corresponding to the read / modify / write processing corresponding to the second write mode of the CPU 1 and GPIO 30 in addition to the specification adapted to the first write mode of the CPU 1 and GPIO 30. . The driver 42 having the specifications corresponding to the read-modify-write process identifies the excitation method and current as the operation mode from the code pattern of the 8-bit control data output from the output terminals D0 to D7 of the GPIO 30, and identifies the identified excitation. The step motor 43 is driven by the method and current. Similarly, the driver 52 having the specifications corresponding to the read / modify / write process determines the excitation method and current as the operation mode based on the code pattern of the 8-bit control data output from the output terminals D8 to D15 of the GPIO 30. Then, the step motor 53 is driven with the determined excitation method and current.

CPU1の内部メモリ2には、ドライバ42,52に対する複数の制御指令とその各制御指令が割当てられた各入力端子のアドレス1000H〜1015Hとを対応付けた第1データファイル、ドライバ42,52に対する制御指令ごとに異なる複数のコードパターンを格納した第2データファイルが記憶されている。   In the internal memory 2 of the CPU 1, the first data file in which a plurality of control commands for the drivers 42 and 52 are associated with the addresses 1000H to 1015H of the input terminals to which the control commands are assigned, and the control for the drivers 42 and 52. A second data file storing a plurality of different code patterns for each command is stored.

そして、CPU1は、主要な機能として、次の(1)(2)の手段を有する。
(1)モードスイッチ60のオンによる第1ライトモードの設定時、ドライバ42またはドライバ52に対する制御指令が必要になると、GPIO30の各入力端子のうち、必要となった制御指令が割当てられている入力端子のアドレスを内部メモリ2の第1データファイルから検出し、検出したアドレスを指定するためのアドレス指定データをGPIO30に供給し、かつ全てのビットが論理“1”(=所定の論理値)となる制御データを出力する手段。
The CPU 1 has the following means (1) and (2) as main functions.
(1) At the time of setting the first light mode by turning on the mode switch 60, if a control command for the driver 42 or the driver 52 is required, the input to which the required control command is assigned among the input terminals of the GPIO 30 The address of the terminal is detected from the first data file in the internal memory 2, address designation data for designating the detected address is supplied to the GPIO 30, and all bits are set to logic “1” (= predetermined logic value). Means for outputting control data.

(2)モードスイッチ60のオフによる第2ライトモードの設定時、ドライバ42またはドライバ52に対する制御指令が必要になると、内部メモリ2の第2データファイル内の各コードパターンのうち必要となった制御指令に対応するコードパターンを抽出し、かつGPIO30に保持されている制御データを読込んで内部レジスタ3に格納し、その内部レジスタ3内の制御データを上記抽出したコードパターンに合せて同内部レジスタ3上でモデファイ(マスキングを含む)してからGPIO30に書込むリード・モデファイ・ライト処理の手段。なお、このリード・モデファイ・ライト処理では、例えば入力インタフェース4からのデータ入力による何らかの割込み処理が入ると、リードとモデファイとの間のタイミングまたはモデファイとライトの間のタイミングで内部レジスタ3内の制御データをメモリ20に退避し、その退避後に割込み処理を実行し、割込み処理が終了してからメモリ20内の制御データを内部レジスタ3に戻す処理を行う。   (2) When the second write mode is set by turning off the mode switch 60, if a control command to the driver 42 or the driver 52 is required, the control required among the code patterns in the second data file of the internal memory 2 is required. The code pattern corresponding to the command is extracted, the control data held in the GPIO 30 is read and stored in the internal register 3, and the control data in the internal register 3 is matched with the extracted code pattern. Means for read-modify-write processing after modifying (including masking) and writing to GPIO 30 above. In this read-modify-write process, for example, when some interrupt process is performed by data input from the input interface 4, the control in the internal register 3 is performed at the timing between read and modify or at the timing between modify and write. The data is saved in the memory 20, interrupt processing is executed after the saving, and the control data in the memory 20 is returned to the internal register 3 after the interrupt processing is completed.

また、GPIO30は、主要な機能として、次の(11)(12)の手段を有する。
(11)モードスイッチ60のオンによる第1ライトモードの設定時、データ入力ポート32の各入力端子に入力される制御データのうちCPU1からアドレス指定された入力端子への入力制御データのみ取込み、取込んだ制御データを同アドレス指定された入力端子に対応するフリップフロップで保持することにより、同フリップフロップに対応する出力端子のビットのみ論理“1”(=所定の論理値)となって残りの出力端子のビットは論理“1”(=所定の論理値)とならない制御データをデータ出力ポート35の各出力端子から出力する手段。
The GPIO 30 has the following means (11) and (12) as main functions.
(11) When the first write mode is set by turning on the mode switch 60, only the control data input to the input terminal addressed by the CPU 1 among the control data input to each input terminal of the data input port 32 is fetched. By holding the received control data in the flip-flop corresponding to the input terminal designated by the same address, only the bit of the output terminal corresponding to the flip-flop becomes logic “1” (= predetermined logic value) and the remaining Means for outputting control data from each output terminal of the data output port 35 in which the bit of the output terminal does not become logic “1” (= predetermined logic value).

(12)モードスイッチ60のオフによる第2ライトモードの設定時、データ入力ポート32の各入力端子に入力される制御データを取込んで各フリップフロップで保持し、保持した制御データを各出力端子から出力する機能。   (12) When the second write mode is set by turning off the mode switch 60, the control data input to each input terminal of the data input port 32 is fetched and held by each flip-flop, and the held control data is sent to each output terminal. Function to output from.

つぎに、作用を説明する。
ドライバ42,52の仕様がCPU1およびGPIO30の第1ライトモードに合せた仕様であれば、モードスイッチ60がオン操作される。このモードスイッチ60のオンにより、CPU1およびGPIO30において第1ライトモードが設定される。
Next, the operation will be described.
If the specifications of the drivers 42 and 52 are specifications that match the first write mode of the CPU 1 and the GPIO 30, the mode switch 60 is turned on. When the mode switch 60 is turned on, the CPU 1 and the GPIO 30 set the first write mode.

この第1ライトモード用として、図3に示すように、GPIO30におけるアドレス1000H〜1015Hの入力端子のうち、8ビットのアドレス1000H〜1007Hの入力端子に対し、ドライバ42の動作モード“1相励磁”“2相励磁”“1−2相励磁”“マイクロステップ駆動”“1相励磁及び電流増”“2相励磁及び電流増”“1−2相励磁及び電流増”“マイクロステップ駆動及び電流増”をそれぞれ設定するための制御指令がそれぞれ割当てられている。残りの8ビットのアドレス1008H〜1015Hの入力端子に対し、ドライバ52の動作モード“1相励磁”“2相励磁”“1−2相励磁”“マイクロステップ駆動”“1相励磁及び電流増”“2相励磁及び電流増”“1−2相励磁及び電流増”“マイクロステップ駆動及び電流増”をそれぞれ設定するための制御指令がそれぞれ割当てられている。   For the first write mode, as shown in FIG. 3, among the input terminals of the addresses 1000H to 1015H in the GPIO 30, the operation mode “one phase excitation” of the driver 42 is applied to the input terminals of the 8-bit addresses 1000H to 1007H. “2-phase excitation” “1-2-phase excitation” “micro-step drive” “1-phase excitation and current increase” “2-phase excitation and current increase” “1-2-phase excitation and current increase” “micro-step drive and current increase” Each of the control commands for setting "" is assigned. For the remaining 8-bit addresses 1008H to 1015H, the operation mode of the driver 52 is “1 phase excitation”, “2 phase excitation”, “1-2 phase excitation”, “microstep drive”, “1 phase excitation and current increase” Control commands for setting “2-phase excitation and current increase”, “1-2-phase excitation and current increase”, and “microstep drive and current increase” are assigned.

GPIO30は、図3に示すように、ドライバ42用の制御指令“1相励磁”に対応するアドレス1000Hの入力端子が指定されると、フリップフロップF0をアクティブ状態(○印)とする。同様に、ドライバ42用の制御指令“2相励磁”に対応するアドレス1001Hの入力端子が指定されると、フリップフロップF1をアクティブ状態とする。ドライバ42用の制御指令“1−2相励磁”に対応するアドレス1002Hの入力端子が指定されると、フリップフロップF2をアクティブ状態とする。ドライバ42用の制御指令“マイクロステップ駆動”に対応するアドレス1003Hの入力端子が指定されると、フリップフロップF3をアクティブ状態とする。ドライバ42用の制御指令“1相励磁及び電流増”に対応するアドレス1004Hの入力端子が指定されると、フリップフロップF4をアクティブ状態とする。ドライバ42用の制御指令“2相励磁及び電流増”に対応するアドレス1005Hの入力端子が指定されると、フリップフロップF5をアクティブ状態とする。ドライバ42用の制御指令“1−2相励磁及び電流増”に対応するアドレス1006Hの入力端子が指定されると、フリップフロップF6をアクティブ状態とする。制御指令“マイクロステップ駆動及び電流増”に対応するアドレス1007Hの入力端子が指定されると、フリップフロップF7をアクティブ状態とする。アドレス指定のない入力端子に対応するフリップフロップについては、リセットしてしかも非アクティブ状態とする。   As shown in FIG. 3, when the input terminal at the address 1000H corresponding to the control command “one-phase excitation” for the driver 42 is designated, the GPIO 30 sets the flip-flop F0 in an active state (marked with a circle). Similarly, when the input terminal of the address 1001H corresponding to the control command “two-phase excitation” for the driver 42 is designated, the flip-flop F1 is activated. When the input terminal of the address 1002H corresponding to the control command “1-2 phase excitation” for the driver 42 is designated, the flip-flop F2 is activated. When the input terminal of the address 1003H corresponding to the control command “microstep drive” for the driver 42 is designated, the flip-flop F3 is activated. When the input terminal of the address 1004H corresponding to the control command “1 phase excitation and current increase” for the driver 42 is designated, the flip-flop F4 is activated. When the input terminal of the address 1005H corresponding to the control command “two-phase excitation and current increase” for the driver 42 is designated, the flip-flop F5 is activated. When the input terminal of the address 1006H corresponding to the control command “1-2 phase excitation and current increase” for the driver 42 is designated, the flip-flop F6 is activated. When the input terminal of the address 1007H corresponding to the control command “microstep drive and current increase” is designated, the flip-flop F7 is activated. The flip-flop corresponding to the input terminal without addressing is reset and made inactive.

ドライバ52用の制御指令“1相励磁”に対応するアドレス1008Hの入力端子が指定されると、フリップフロップF8をアクティブ状態とする。同様に、ドライバ52用の制御指令“2相励磁”に対応するアドレス1009Hの入力端子が指定されると、フリップフロップF9をアクティブ状態とする。ドライバ52用の制御指令“1−2相励磁”に対応するアドレス1010Hの入力端子が指定されると、フリップフロップF10をアクティブ状態とする。ドライバ52用の制御指令“マイクロステップ駆動”に対応するアドレス1011Hの入力端子が指定されると、フリップフロップF11をアクティブ状態とする。ドライバ52用の制御指令“1相励磁及び電流増”に対応するアドレス1012Hの入力端子が指定されると、フリップフロップF12をアクティブ状態とする。ドライバ52用の制御指令“2相励磁及び電流増”に対応するアドレス1013Hの入力端子が指定されると、フリップフロップF13をアクティブ状態とする。ドライバ52用の制御指令“1−2相励磁及び電流増”に対応するアドレス1014Hの入力端子が指定されると、フリップフロップF14をアクティブ状態とする。制御指令“マイクロステップ駆動及び電流増”に対応するアドレス1015Hの入力端子が指定されると、フリップフロップF15をアクティブ状態とする。アドレス指定のない入力端子に対応するフリップフロップについては、リセットしてしかも非アクティブ状態とする。   When the input terminal of the address 1008H corresponding to the control command “1 phase excitation” for the driver 52 is designated, the flip-flop F8 is activated. Similarly, when the input terminal of the address 1009H corresponding to the control command “two-phase excitation” for the driver 52 is designated, the flip-flop F9 is activated. When the input terminal of the address 1010H corresponding to the control command “1-2 phase excitation” for the driver 52 is designated, the flip-flop F10 is activated. When the input terminal of the address 1011H corresponding to the control command “microstep drive” for the driver 52 is designated, the flip-flop F11 is activated. When the input terminal of the address 1012H corresponding to the control command “1 phase excitation and current increase” for the driver 52 is designated, the flip-flop F12 is activated. When the input terminal of the address 1013H corresponding to the control command “two-phase excitation and current increase” for the driver 52 is designated, the flip-flop F13 is activated. When the input terminal of the address 1014H corresponding to the control command “1-2 phase excitation and current increase” for the driver 52 is designated, the flip-flop F14 is activated. When the input terminal of the address 1015H corresponding to the control command “microstep drive and current increase” is designated, the flip-flop F15 is activated. The flip-flop corresponding to the input terminal without addressing is reset and made inactive.

CPU1は、ドライバ42の“2相励磁”およびドライバ52の“1−2相励磁”を設定する場合、GPIO30のアドレス1001Hの入力端子およびアドレス1010Hの入力端子をそれぞれアドレス指定し、かつ全てのビットが論理“1”となる16ビットの制御データ“1111111111111111”を出力する。   When setting “2-phase excitation” of the driver 42 and “1-2-phase excitation” of the driver 52, the CPU 1 addresses the input terminal of the address 1001H and the input terminal of the address 1010H of the GPIO 30, respectively, and sets all bits. Outputs 16-bit control data “1111111111111111” having a logic “1”.

この場合、GPIO30では、アドレス1001Hの入力端子に対応するフリップフロップF1およびアドレス1010Hの入力端子に対応するフリップフロップF10がアクティブ状態となって制御データの入力を受け入れ、残りのフリップフロップはリセットされてしかも非アクティブ状態となる。この状態で上記制御データ“1111111111111111”が入力されと、図4に示すように、フリップフロップF1およびフリップフロップF10がセットされて論理“1”を出力し、残りのフリップフロップの出力は論理“0”となる。こうして、16ビットの制御データ“0000010000000010”が出力端子D0〜D15から出力される。   In this case, in the GPIO 30, the flip-flop F1 corresponding to the input terminal of the address 1001H and the flip-flop F10 corresponding to the input terminal of the address 1010H are in the active state to accept the control data input, and the remaining flip-flops are reset. Moreover, it becomes inactive. When the control data “1111111111111111” is input in this state, as shown in FIG. 4, flip-flop F1 and flip-flop F10 are set and output logic “1”, and the output of the remaining flip-flops is logic “0”. " Thus, 16-bit control data “0000010000000010” is output from the output terminals D0 to D15.

出力された制御データ“0000010000000010”のうち、下位8ビット“00000010”はドライバ42に供給され、上位8ビット“00000100”はドライバ52に供給される。   Of the output control data “0000010000000010”, the lower 8 bits “00000010” are supplied to the driver 42, and the upper 8 bits “00000100” are supplied to the driver 52.

ドライバ42は、入力される8ビットの制御データ“00000010”の2番目のビットが論理“1”なので、動作モードとして2相励磁を設定し、その2相励磁でステップモータ43を駆動する。ドライバ52は、入力される8ビットの制御データ“00000100”の3番目のビットが論理“1”なので、動作モードとして1−2相励磁を設定し、その1−2相励磁でステップモータ43を駆動する。   The driver 42 sets the two-phase excitation as the operation mode because the second bit of the input 8-bit control data “00000010” is logic “1”, and drives the step motor 43 by the two-phase excitation. Since the third bit of the input 8-bit control data “00000100” is logic “1”, the driver 52 sets the 1-2 phase excitation as the operation mode, and the step motor 43 is set by the 1-2 phase excitation. To drive.

このように、必要な制御指令に対応する入力端子をアドレス指定し、かつ全てのビットが論理“1”となる16ビットの制御データ“1111111111111111”を出力するだけで、必要な制御指令に対応する誤りのない制御データをGPIO30に書込むことができる。よって、間違いのない適正な制御指令をドライバ42,52に送ることができ、データ入出力制御装置としての高い信頼性を確保できる。割込み処理が入っても、制御データを退避したり戻すといった処置を要することなく、割込み処理を即時に実行できる。これは、当該データ入出力制御装置が搭載された組込み機器のパフォーマンスの向上につながる。   As described above, only the 16-bit control data “1111111111111111” in which all the bits are logic “1” is output and the input terminal corresponding to the necessary control command is addressed. Control data without error can be written into the GPIO 30. Therefore, an appropriate control command without error can be sent to the drivers 42 and 52, and high reliability as a data input / output control device can be secured. Even if an interrupt process is entered, the interrupt process can be executed immediately without requiring any action such as saving or returning the control data. This leads to an improvement in performance of an embedded device in which the data input / output control device is mounted.

ドライバ42,52は、入力される制御データの各ビットのうち、論理“1”のビットに対応付けられている動作モードを設定するだけであり、リード・モデファイ・ライト処理の場合のように制御データのコードパターンを識別する処理が不要なので、構成の簡略化とコストの低減が図れる。   The drivers 42 and 52 only set the operation mode associated with the logic “1” bit among the bits of the input control data, and control is performed as in the case of the read-modify-write process. Since the process for identifying the data code pattern is not required, the configuration can be simplified and the cost can be reduced.

ドライバ42,52の仕様がリード・モデファイ・ライト処理に対応する仕様であれば、モードスイッチ60をオフして第2ライトモードを設定することにより、リード・モデファイ・ライト処理を実行することも可能である。この点、汎用性の向上が図れる。   If the specifications of the drivers 42 and 52 correspond to the read / modify / write process, the read / modify / write process can be executed by turning off the mode switch 60 and setting the second write mode. It is. In this respect, versatility can be improved.

なお、上記実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、書き換え、変更を行うことができる。この実施形態や変形は、発明の範囲は要旨に含まれるとともに、特許請求の範囲に記録された発明とその均等の範囲に含まれる。   The above embodiment is presented as an example, and is not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, rewrites, and changes can be made without departing from the scope of the invention. The scope of the invention is included in the gist of the embodiments and modifications, and is included in the invention recorded in the claims and the equivalents thereof.

Claims (7)

制御対象機器に対する制御データを発するコントローラと、
このコントローラに接続される複数の入力端子、および前記制御対象機器に接続される複数の出力端子を有し、前記制御対象機器に対する複数の制御指令が各入力端子に割当てられた入出力デバイスと、
を備え、
前記コントローラは、前記制御対象機器に対する制御指令が必要になると、前記入出力デバイスの各入力端子のうち、必要となった制御指令が割当てられている入力端子をアドレス指定するとともに、全てのビットが所定の論理値となる制御データを出力する、
前記入出力デバイスは、各入力端子に入力される制御データのうち前記アドレス指定された入力端子への入力制御データのみ取込んで保持することにより、同アドレス指定された入力端子に対応する出力端子のビットのみ所定の論理値となって残りの出力端子のビットは所定の論理値とならない制御データを各出力端子から出力する、
ことを特徴とするデータ入出力制御装置。
A controller that emits control data for the control target device;
An input / output device having a plurality of input terminals connected to the controller and a plurality of output terminals connected to the control target device, wherein a plurality of control commands for the control target device are assigned to each input terminal;
With
When the control command for the control target device is required, the controller addresses the input terminal to which the required control command is assigned among the input terminals of the input / output device, and all bits are set. Output control data with a predetermined logical value,
The input / output device captures and holds only the input control data to the addressed input terminal among the control data input to each input terminal, so that an output terminal corresponding to the addressed input terminal Only the bits of the above become a predetermined logical value and the control data that does not become the predetermined logical value of the remaining output terminal bits are output from each output terminal.
A data input / output control device.
前記制御対象機器は、前記入出力デバイスから出力される制御データの各ビットのうち、所定の論理値となるビットに割当てられている動作モードで動作する、
ことを特徴とする請求項1に記載のデータ入出力制御装置。
The control target device operates in an operation mode assigned to a bit having a predetermined logical value among the bits of control data output from the input / output device.
The data input / output control device according to claim 1.
前記制御対象機器に対する複数の制御指令とその各制御指令が割当てられた各入力端子のアドレスとを対応付けて記憶した記憶手段、
をさらに備えることを特徴とする請求項1または請求項2に記載のデータ入出力制御装置。
Storage means for storing a plurality of control commands for the device to be controlled and addresses of input terminals to which the control commands are assigned in association with each other,
The data input / output control device according to claim 1, further comprising:
前記制御対象機器は、第1制御対象機器および第2制御対象機器であり、
前記コントローラは、前記各制御対象機器のいずれかに対する制御指令が必要になると、前記入出力デバイスの各入力端子のうち、必要となった制御指令が割当てられている入力端子をアドレス指定するとともに、全てのビットが所定の論理値となる制御データを出力する、
ことを特徴とする請求項1または請求項2記載のデータ入出力制御装置。
The control target devices are a first control target device and a second control target device,
When the controller requires a control command for any of the devices to be controlled, among the input terminals of the input / output device, the input terminal to which the required control command is assigned is addressed, Output control data in which all bits have a predetermined logical value.
3. The data input / output control device according to claim 1, wherein the data input / output control device is a data input / output control device.
前記入出力デバイスは、前記コントローラに接続されるとともにそれぞれのアドレスに前記制御対象機器に対する複数の制御指令が割当てられた複数の入力端子、およびこれら入力端子に対応する複数のフリップフロップ、これらフリップフロップの出力端に接続されるとともに前記制御対象機器に接続される複数の出力端子を有し、各入力端子に入力される制御データのうち前記アドレス指定された入力端子への入力制御データのみ取込み、取込んだ制御データを同アドレス指定された入力端子に対応するフリップフロップで保持することにより、同フリップフロップに対応する出力端子のビットのみ所定の論理値となって残りの出力端子のビットは所定の論理値とならない制御データを各出力端子から出力する、
ことを特徴とする請求項1乃至請求項4のいずれかに記載のデータ入出力制御装置。
The input / output device includes a plurality of input terminals connected to the controller and assigned with a plurality of control commands for the control target device at respective addresses, a plurality of flip-flops corresponding to the input terminals, and the flip-flops A plurality of output terminals connected to the control target device and connected to the output terminal of the control terminal, taking only the input control data to the addressed input terminal out of the control data input to each input terminal, By holding the captured control data in the flip-flop corresponding to the input terminal designated by the same address, only the bit of the output terminal corresponding to the flip-flop becomes a predetermined logical value, and the bits of the remaining output terminals are predetermined. Control data that does not become the logical value of is output from each output terminal.
5. The data input / output control device according to claim 1, wherein the data input / output control device is a data input / output control device.
第1ライトモードおよび第2ライトモードを選択的に設定するモード設定手段、をさらに備え、
前記コントローラは、前記第1ライトモードの設定時、前記制御対象機器に対する制御指令が必要になると、前記入出力デバイスの各入力端子のうち、必要となった制御指令が割当てられている入力端子をアドレス指定するとともに、全てのビットが所定の論理値となる制御データを出力する手段と、前記第2ライトモードの設定時、前記制御対象機器に対する制御指令が必要になると、必要となった制御指令に対応するコードパターンを前記記憶手段から抽出し、かつ前記入出力デバイスに保持されている制御データを読込んで内部レジスタに格納し、その内部レジスタ内の制御データを上記抽出したコードパターンに合せて同内部レジスタ上でモデファイしてから前記入出力デバイスに書込むリード・モデファイ・ライト処理の手段とを含み、
前記入出力デバイスは、前記第1ライトモードの設定時、各入力端子に入力される制御データのうち前記アドレス指定された入力端子への入力制御データのみ取込んで保持することにより、同アドレス指定された入力端子に対応する出力端子のビットのみ所定の論理値となって残りの出力端子のビットは所定の論理値とならない制御データを各出力端子から出力する手段と、前記第2ライトモードの設定時、前記各入力端子に入力される制御データを取込んで保持し、保持した制御データを各出力端子から出力する手段とを含む、
ことを特徴とする請求項1記載のデータ入出力制御装置。
Mode setting means for selectively setting the first light mode and the second light mode;
When the controller requires a control command for the device to be controlled when the first light mode is set, an input terminal to which the required control command is assigned among the input terminals of the input / output device. Means for addressing and outputting control data in which all bits have a predetermined logical value, and when setting the second light mode, if a control command is required for the control target device, the required control command Is extracted from the storage means, and the control data held in the input / output device is read and stored in the internal register, and the control data in the internal register is matched with the extracted code pattern. Read-modify-write processing means to write to the input / output device after modifying on the internal register Look,
When the first write mode is set, the input / output device captures and holds only the input control data to the addressed input terminal among the control data input to each input terminal, thereby specifying the same address. Means for outputting control data from each output terminal in which only the bit of the output terminal corresponding to the inputted input terminal has a predetermined logical value and the bits of the remaining output terminals do not have the predetermined logical value; Means for fetching and holding control data input to each input terminal at the time of setting, and outputting the held control data from each output terminal;
The data input / output control device according to claim 1.
前記入出力デバイスは、前記コントローラに接続されるとともにそれぞれのアドレスに前記制御対象機器に対する複数の制御指令が割当てられた複数の入力端子、これら入力端子に対応する複数のフリップフロップ、これらフリップフロップの出力端に接続されるとともに前記制御対象機器に接続される複数の出力端子を有し、前記第1ライトモードの設定時、各入力端子に入力される制御データのうち前記アドレス指定された入力端子への入力制御データのみ取込み、取込んだ制御データを同アドレス指定された入力端子に対応するフリップフロップで保持することにより、同フリップフロップに対応する出力端子のビットのみ所定の論理値となって残りの出力端子のビットは所定の論理値とならない制御データを各出力端子から出力する手段と、前記第2ライトモードの設定時、前記各入力端子に入力される制御データを取込んで各フリップフロップで保持し、保持した制御データを各出力端子から出力する機能とを含む、
ことを特徴とする請求項6記載のデータ入出力制御装置。
The input / output device is connected to the controller and has a plurality of input terminals to which a plurality of control commands for the control target device are assigned to respective addresses, a plurality of flip-flops corresponding to these input terminals, A plurality of output terminals connected to the output terminal and connected to the device to be controlled, and the addressed input terminal of the control data input to each input terminal when the first light mode is set Only the input control data to the input terminal is fetched, and the fetched control data is held in the flip-flop corresponding to the input terminal designated by the same address, so that only the bit of the output terminal corresponding to the same flip-flop becomes a predetermined logical value. The remaining output terminal bits output control data from each output terminal that does not have a predetermined logic value. And stage, setting of the second write mode, and a function of said held by the flip-flops by captures and control data input to the input terminals, and outputs the held control data from the output terminals,
The data input / output control device according to claim 6.
JP2010196941A 2010-09-02 2010-09-02 Data input/output control device Withdrawn JP2012053762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010196941A JP2012053762A (en) 2010-09-02 2010-09-02 Data input/output control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010196941A JP2012053762A (en) 2010-09-02 2010-09-02 Data input/output control device

Publications (1)

Publication Number Publication Date
JP2012053762A true JP2012053762A (en) 2012-03-15

Family

ID=45906978

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010196941A Withdrawn JP2012053762A (en) 2010-09-02 2010-09-02 Data input/output control device

Country Status (1)

Country Link
JP (1) JP2012053762A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102057092B1 (en) * 2017-11-03 2019-12-18 (주)지트론시스템 Manufacturing system having input and output device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102057092B1 (en) * 2017-11-03 2019-12-18 (주)지트론시스템 Manufacturing system having input and output device

Similar Documents

Publication Publication Date Title
CN108090010B (en) Bus device, processing method, setting method and setting system
US8755246B2 (en) Semiconductor memory device and method of setting operation environment therein
JP6088202B2 (en) Display panel driver setting method, display panel driver, and display device including the same
JP5350723B2 (en) Inverter device
CN109410828B (en) LED point light source driving method, system and controller
JP5633764B2 (en) Control device
JP2012053762A (en) Data input/output control device
US10146200B2 (en) Apparatus and method for updating operating system in programmable logic controller
JP2010177897A (en) Configuration circuit of fpga
JP4740982B2 (en) Programmable logic circuit
CN106782266B (en) Display screen drive control method and device and display screen drive control circuit
CN111477154A (en) Communication structure of display panel and display panel
JP6616341B2 (en) Display panel driver setting method and display device
SE514785C2 (en) Processor and method for executing instructions from multiple instruction sources
US10372094B2 (en) Motor control device and game machine
CN111082732B (en) Automatic learning system for current curve mode of voice coil motor driver
JP2019003226A (en) Display panel driver
CN113676096A (en) Motor control method and device and motor controller
JP2012060199A (en) Clocked serial interface
JPH11353170A (en) Flash memory controller and memory access method of flash memory controller
JP2004240717A (en) Software updating device
JP2001318907A (en) Microcomputer incorporating flash memory
JP5388965B2 (en) Control device
JPH07193860A (en) Portable terminal equipment having program memory
JP2000097141A (en) Engine ignition timing control device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20131105