JPH0353317A - Printer interface circuit - Google Patents

Printer interface circuit

Info

Publication number
JPH0353317A
JPH0353317A JP1187295A JP18729589A JPH0353317A JP H0353317 A JPH0353317 A JP H0353317A JP 1187295 A JP1187295 A JP 1187295A JP 18729589 A JP18729589 A JP 18729589A JP H0353317 A JPH0353317 A JP H0353317A
Authority
JP
Japan
Prior art keywords
timer
data
time
pulse
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1187295A
Other languages
Japanese (ja)
Inventor
Ryuichi Wakatsuki
若槻 隆一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Data Terminal Ltd
Original Assignee
NEC Data Terminal Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Data Terminal Ltd filed Critical NEC Data Terminal Ltd
Priority to JP1187295A priority Critical patent/JPH0353317A/en
Publication of JPH0353317A publication Critical patent/JPH0353317A/en
Pending legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PURPOSE:To reduce the load of a CPU and to improve the data transfer speed by using the hardware including the 1st and 2nd timers to produce the answer signals. CONSTITUTION:At application of power supply, a CPU 11 reads the data 'bit1' - 'bit3' out of a nonvolatile memory 12 and sets the 1st bit data 'bit1' to a 1st timer 15 which is used to measure the transmission start time of an answer signal 19. The 2nd and 3rd bit data 'bit2' and 'bit3' are set to a 2nd timer 16 which is used to measure the transmission end time of the signal 19. Then the data on the 1st and 2nd times which are stored in the memory 12 are controlled so that the start timing and the width of an answer pulse are controlled. As a result, the transmission timing and the pulse width of the answer signal are changed in accordance with the types of devices. Then the effective transfer of data is attained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、上位装置からデータ送出信号が出力されたと
きにプリンタ側からこれに応答するための応答信号を出
力するために用いるプリンタインタフエイス回路に関す
る。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a printer interface used for outputting a response signal from a printer side in response to a data transmission signal output from a host device. Regarding circuits.

〔従来の技術〕[Conventional technology]

上位装置からデータ送出信号が送られてきたとき、これ
を受信したことを確認するための応答信号をプリンタ側
で送出することは広く行われている。従来、プリンタイ
ンタフェイス回路ではデータ送出信号が送られてくると
、プログラムタイマを用いて応答信号の送出タイミング
とその信号の送出時間を制御するようになっていた。
When a data transmission signal is sent from a host device, it is widely practiced that the printer side sends a response signal to confirm that it has received the data transmission signal. Conventionally, when a data sending signal is sent to a printer interface circuit, a program timer is used to control the sending timing of a response signal and the sending time of that signal.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

このように、従来では応答信号を生戊する際に、プリン
タインクフェイス回路はプログラムによって応答信号生
或の条件がそろったかどうかを調べ、この条件がそろっ
た時点からプログラム実行時間を利用したタイマによっ
て信号のパルス幅を設定していた。
In this way, conventionally, when generating a response signal, the printer ink face circuit uses a program to check whether certain conditions for generating the response signal are met, and from the moment the conditions are met, a timer using the program execution time starts the process. The pulse width of the signal was set.

このため、装置に応じて応答信号の送出タイミングやそ
のパルス幅を変更することができず、効率的なデータ転
送を行うことができないという問題があった。
For this reason, there is a problem in that it is not possible to change the sending timing of the response signal or its pulse width depending on the device, and it is not possible to perform efficient data transfer.

そこで本発明の目的は、応答信号の送出されるタイミン
グやパルス幅を所望の値に変更することが可能なプリン
タインクフエイス回路を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a printer ink face circuit that can change the timing and pulse width of a response signal to desired values.

〔課題を解決するための手段〕[Means to solve the problem]

本発明では、(i)上位装置からのデータ送出信号の受
信によって起動され第1の時間を計時する第1のタイマ
と、( ii )この第1のタイマの計時終了によって
起動され第2の時間を計時する第2のタイマと、( i
ii )第1および第2の時間をそれぞれ調整可能な時
間量として記憶した不揮発性メモリと、(iv)不揮発
性メモリに記憶されたこれらの時間をそれぞれ第1およ
び第2のタイマに設定する時間設定手段と、(v)第1
のタイマの計時終了時にデータ送出信号に対する応答パ
ルスの送出を開始し、第2のタイマの計時終了までをそ
の応答パルスのパルス幅とする応答パルス作戊手段とを
ブリンクインタフエイス回路に具備させる。
In the present invention, (i) a first timer that is started by receiving a data transmission signal from a host device and measures a first time; and (ii) a second timer that is started when the first timer ends and measures a first time. a second timer for timing (i
ii) a non-volatile memory storing first and second times as adjustable amounts of time, respectively; and (iv) times for setting these times stored in the non-volatile memory into first and second timers, respectively. a setting means; (v) a first
The blink interface circuit is provided with a response pulse generating means that starts sending out a response pulse in response to the data sending signal when the second timer ends, and sets the pulse width of the response pulse until the second timer ends.

すなわち本発明では、不揮発性メモリに格納する第1お
よび第2の時間に関するデータを調整することによって
、応答パルス作成手段の作成する応答パルスの開始タイ
ミングと、この応答パルスのパルス幅を調整することが
できるようにする。
That is, in the present invention, the start timing of the response pulse created by the response pulse creation means and the pulse width of this response pulse can be adjusted by adjusting the data related to the first and second times stored in the nonvolatile memory. be able to do so.

〔実施例〕〔Example〕

以下、実施例につき本発明を詳細に説明する。 Hereinafter, the present invention will be explained in detail with reference to Examples.

第1図は本発明の一実施例におけるプリンタインタフェ
イス回路の構或を表わしたものである。
FIG. 1 shows the structure of a printer interface circuit in one embodiment of the present invention.

この図に示したように、プリンタインクフェイス回路は
各種プログラムを実行するためのCPU(中央処理装置
〉 11を備えている。CPUIIの第1の入カボー}
I+  には、不揮発性メモリ12が接続されている。
As shown in this figure, the printer ink face circuit includes a CPU (Central Processing Unit) 11 for executing various programs.
A nonvolatile memory 12 is connected to I+.

また第2の入カポー}I2には、図示しない上位装置か
らデータ送出信号13が供給されるようになっている。
Further, a data sending signal 13 is supplied to the second input port I2 from a host device (not shown).

第3の人力ポー}I3 には、同じく上位装置からのデ
ータ信号14が供給されるようになっている。
Similarly, the data signal 14 from the higher-level device is supplied to the third human-powered port I3.

このCPUIIの出力ポート01 には、第1のタイマ
15の入力端子INが接続されている。この第1のタイ
マ15の出力端子OUTは、第2のタイマ16の入力端
子INとオアゲー}17の一方の入力端子に接続されて
いる。第2のタイマ16の出力端子OUTは、オアゲー
ト17の他方の入力端子と接続されている。オアゲート
17の出力端子は、フリップフロップ回路(FF)}8
に供給され、その出力端子からは応答信号l9が出力さ
れるようになっている。
The input terminal IN of the first timer 15 is connected to the output port 01 of this CPU II. The output terminal OUT of the first timer 15 is connected to the input terminal IN of the second timer 16 and one input terminal of the OR game 17. The output terminal OUT of the second timer 16 is connected to the other input terminal of the OR gate 17. The output terminal of the OR gate 17 is a flip-flop circuit (FF)}8
, and a response signal l9 is output from its output terminal.

以上のような構戒のプリンタインタフェイス回路で不揮
発性メモリ12は、図示しない電池によってバックアッ
プされたRAM (,ランダム・アクセス・メモリ〉か
ら構或されており、応答信号l9の送出タイミングとそ
のパルス幅を設定するようになっている。このために、
不揮発性メモリ12には第1ビット目から第3ビット目
のデータ″bitl″〜“bit3″が格納されている
。CPU 11は電源の投入時に、この不揮発性メモリ
12に格納されているこれらのデータ“bitl”〜b
it3″を読み取り、第1ビット目のデータbitl”
を第1のタイマl5にセットする。第1のタイマ15は
、応答信号19の送出開始時間を計測するために用いら
れる。第2ビット目と第3ビット目のデータ“bit2
”、“bit3”は第2のタイマ16にセットされる。
In the printer interface circuit configured as described above, the nonvolatile memory 12 is composed of a RAM (Random Access Memory) backed up by a battery (not shown), and is configured to control the transmission timing of the response signal l9 and its pulse. It is supposed to set the width.For this,
The nonvolatile memory 12 stores first to third bit data "bitl" to "bit3". When the power is turned on, the CPU 11 reads these data "bitl" to "b" stored in the non-volatile memory 12.
Read it3″ and obtain the first bit data bitl”
is set in the first timer l5. The first timer 15 is used to measure the sending start time of the response signal 19. 2nd and 3rd bit data “bit2
”, “bit3” is set in the second timer 16.

第2のタイマl6は、応答信号19の送出緒了時間を計
測するために用いられる。
The second timer l6 is used to measure the time it takes for the response signal 19 to start being sent.

次に第2図を基にして、第1のタイマによる応答信号の
送出開始時間の計測制御についてまず説明する。
Next, based on FIG. 2, the measurement control of the transmission start time of the response signal by the first timer will be explained first.

第2図aは、データ送出信号の変化を表わしたものであ
る。前記したようにCPUIIはデータ“bitビ〜”
bit3”をそれぞれのタイマl5、16にセットし、
上位装置からデータ送出信号l3が送られてくるのを待
機している。データ送出信号13が入カボー}I2 で
受信されこれが時刻tで立ち上がると、CPUIIは第
3の入力ボートI3 の内容を読み込んでデータ信号l
4を受信する。そして、CPUI 1は出力ボート○,
によって第1のタイマl5を起動させる。
FIG. 2a shows changes in the data sending signal. As mentioned above, the CPU II inputs the data “bit bi~”
Set bit 3” to each timer l5 and 16,
It is waiting for the data sending signal l3 to be sent from the host device. When the data sending signal 13 is received by the input port I2 and rises at time t, the CPU II reads the contents of the third input port I3 and outputs the data signal l.
Receive 4. And CPU 1 is the output port ○,
starts the first timer l5.

起動された第1のタイマl5は、第1ビノト目のデータ
“bitl”の内容が“OFF”か“ON”かによって
それぞれ異なった時間を計測する。すなわち、゛○FF
”である場合には第2図b−1に示したように時刻t1
 から時間TI だけ経過した時点で第1のタイマ15
がカウントアップし、その出力端子OUTからパルス2
1−1を出力する。このパルス21−1は第2のタイマ
16に入力され、その設定された時間T2 後にその出
力端子○UTからパルス22−1を出力する(第2図b
−2)。これらのパルス21−1、22−1はオアゲー
ト17を共に通過してフリップフロップ回路18に供給
される。フリップフロツプ回路18は、最初に到来した
バルス2l−1の立ち上がりによってその出力を反転さ
せ、次のパルス221の立ち上がりによってこれを元の
状態に復帰させることによって応答信号1%−1 (第
2図b3)を出力する。
The activated first timer 15 measures different times depending on whether the content of the first bit data "bitl" is "OFF" or "ON". In other words,゛○FF
”, as shown in Figure 2 b-1, time t1
The first timer 15 starts when time TI has elapsed since
counts up, and pulse 2 is output from its output terminal OUT.
Outputs 1-1. This pulse 21-1 is input to the second timer 16, and after the set time T2, the pulse 22-1 is output from its output terminal ○UT (Fig. 2b
-2). These pulses 21-1 and 22-1 pass together through an OR gate 17 and are supplied to a flip-flop circuit 18. The flip-flop circuit 18 inverts its output at the rising edge of the first pulse 2l-1, and returns it to its original state at the rising edge of the next pulse 221, thereby producing a response signal 1%-1 (FIG. 2 b3). ) is output.

一方、第1ビット目のデータ“bitl”の内容が“O
N”の場合には、第1のタイマ15は時刻tから時間T
,だけ経過した時点でカウントアップし、その出力端子
OUTからパルス21−2を出力する(第2図c−1)
。本実施例ではこの時間T3 を時開T1 よりも長く
設定している。このため、第2のタイマl6にはそれだ
け遅延した段階でパルス21−2が供給されることにな
る。第2のタイマ16にセットされているデータが同一
のものと仮定すると、第2のタイマ16はこのバルス2
1−2を入力してから時間T2 後にその出力端子OU
Tからバルス22−2を出力する(第2図C−2)。こ
れらのパルス21−{、22−1はオアゲート17を通
過してフリップフロップ回路18に供給されるので、プ
リップフロップ回路18からは応答信号19−1よりも
時間的に遅延した応答信号19−2(第2図C−3)が
出力されることになる。
On the other hand, the content of the first bit data “bitl” is “O
N'', the first timer 15 starts from time t to time T.
, it counts up and outputs a pulse 21-2 from its output terminal OUT (Fig. 2 c-1).
. In this embodiment, this time T3 is set longer than the time opening T1. Therefore, the pulse 21-2 is supplied to the second timer l6 at a delayed stage. Assuming that the data set in the second timer 16 is the same, the second timer 16
After time T2 after inputting 1-2, its output terminal OU
A pulse 22-2 is output from T (FIG. 2 C-2). These pulses 21-{, 22-1 pass through the OR gate 17 and are supplied to the flip-flop circuit 18, so the flip-flop circuit 18 outputs a response signal 19-2 delayed in time from the response signal 19-1. (C-3 in Figure 2) will be output.

次に第3図を基にして、第2の゜タイマによる応答信号
のパルス幅の変更について説明する。
Next, based on FIG. 3, the change of the pulse width of the response signal by the second degree timer will be explained.

第2図で説明したようにデータ送出信号13が人力ボー
トI2 で受信されこれが第3図aに示したように時刻
t1 で立ち上がると、この時点から第1のタイマ15
が起動される。第1のタイマ15のカウントアップされ
るまでの時間は第2図で示したように2種類に設定する
ことができるが、今これをT4 として一括して表示す
ることにする(第3図b)。この場合、時刻tl から
時間T,が経過した時点で第1のタイマ15がカウント
アップし、その出力端子OUTからパルス213が出力
される。このパルス21−3は第2のタイマ16に人力
され、その設定された時間T5 後にその出力端子OU
Tからパルス22−3が出・力される(第2図b−2〉
As explained in FIG. 2, when the data sending signal 13 is received by the human-powered boat I2 and rises at time t1 as shown in FIG. 3a, from this point on, the first timer 15
is started. The time it takes for the first timer 15 to count up can be set in two ways as shown in Figure 2, but this time will be displayed all at once as T4 (Figure 3 b). ). In this case, the first timer 15 counts up when a time T has elapsed from time tl, and a pulse 213 is output from its output terminal OUT. This pulse 21-3 is input to the second timer 16, and after the set time T5, the output terminal OU
A pulse 22-3 is output from T (Fig. 2 b-2)
.

ところで、この時間Ts は第2のタイマ16に設定さ
れた第2ビット目と第3ビット目のデータ“bit2”
、“bit3″によって変化する。すなわちデータ“b
it2”と“bit3”が共に“OFF”の場合、すな
わちこれらのビットが“00”の場合には、第3図Cで
実線で示したようなパルス223が出力され、その結果
、フリップフロップ回路18からは第3図dに示すよう
に最もパルス幅の長い応答信号19−3が出力されるこ
とになる。
By the way, this time Ts is based on the second and third bit data “bit2” set in the second timer 16.
, changes depending on "bit3". That is, data "b"
When both "it2" and "bit3" are "OFF", that is, when these bits are "00", a pulse 223 as shown by the solid line in FIG. 3C is output, and as a result, the flip-flop circuit 18 outputs a response signal 19-3 having the longest pulse width as shown in FIG. 3d.

これに対して、”bit.”が“OFF”でbit3”
が“ON”の場合、すなわちこれらのビノトが“01”
の場合には、時間T,が第3図Cで破線で示す1単位だ
け短くなるようなパルス223が出力される。この結果
、フリップフロップ回路18からは第3図eに示すよう
に2番目にパルス幅の長い応答信号19−4が出力され
ることになる。
On the other hand, “bit.” is “OFF” and bit3”
is “ON”, that is, these binotos are “01”
In this case, a pulse 223 is output such that the time T is shortened by one unit as indicated by the broken line in FIG. 3C. As a result, the flip-flop circuit 18 outputs a response signal 19-4 having the second longest pulse width, as shown in FIG. 3e.

次に“bit2”が“○N″で“bit3−が“OFF
”の場合、すなわちこれらのビットが“10”の場合に
は、時間T5 が第3図Cで破線で示す2単位だけ短く
なるようなパルス22−3が出力される。この結果、フ
リンブフロップ回路l8からは第3図fに示すように3
番目にパルス幅の長い応答信号l9−5が出力される。
Next, “bit2” is “○N” and “bit3-” is “OFF”.
”, that is, when these bits are “10”, a pulse 22-3 is output such that the time T5 is shortened by two units as indicated by the dashed line in FIG. From the circuit l8, as shown in FIG.
The response signal l9-5 having the longest pulse width is output.

最後に″bit2 ”と″bit3”が共に“○N″の
場合、すなわちこれらのビットが“11”の場合には、
第3図Cで最左端の鎖線で示したようなパルス22−3
が出力される結果、フリップフロップ回路l8からは第
3図gに示すように最もパルス幅の短い応答信号l9−
6が出力されることになる。
Finally, if both "bit2" and "bit3" are "○N", that is, if these bits are "11",
Pulse 22-3 as shown by the leftmost dashed line in Figure 3C
As a result, the flip-flop circuit l8 outputs a response signal l9- with the shortest pulse width as shown in FIG. 3g.
6 will be output.

このように本実施例では、第1のタイマl5にセットさ
れたデータ“bitl”によって応答信号19の送出開
始時間が諷整され、第2のタイマl6にセットされたデ
ータ“bit, ”および“bit3”によって応答信
号19の送出終了時間が4段階に調整されることになる
。また、これらのタイマにセットするデータのビット数
等を変更すれば、これよりも更に細かな調整も可能であ
る。
In this way, in this embodiment, the transmission start time of the response signal 19 is adjusted by the data "bitl" set in the first timer l5, and the data "bit," and " The transmission end time of the response signal 19 is adjusted in four stages by bit3''. Furthermore, by changing the number of bits of data set in these timers, more detailed adjustments can be made.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、第1および第2の
タイマを用いたハードウェアで応答信号の作成を行った
ので、ソフトウエアでこれらを行っていた従来のプリン
タインタフェイス回路に比べてCPUの負担を軽減させ
ることができる。
As explained above, according to the present invention, the response signal is created by hardware using the first and second timers, so compared to the conventional printer interface circuit in which this is done by software. The load on the CPU can be reduced.

これにより、上位装置とプリンタの間のデータ転送スピ
ードが速くなった場合でも、応答信号の出力をプログラ
ムの実行時間に無関係に行うことができ、データ転送ス
ピードを向上させることができる。
As a result, even if the data transfer speed between the host device and the printer increases, the response signal can be output regardless of the program execution time, and the data transfer speed can be improved.

【図面の簡単な説明】 図面は本発明の一実施例を説明するためのもので、この
うち第1図はプリンタインクフエイス回路の構戊を示す
ブロック図、第2図はこの回路の応答信号送出のタイミ
ングの調整原理を示す各種波形図、第3図はこの回路の
応答信号のパルス幅の調整原理を示す各種波形図である
。 l1・・・・・・CPU,12・・・・・・不揮発性メ
モリ、13・・・・・・データ送出信号、 15・・・・・・第1のタイマ、16・・・・・・第2
のタイマ、18・・・・・・フリップフロソプ回路、l
9・・・・・・応答信号。
[BRIEF DESCRIPTION OF THE DRAWINGS] The drawings are for explaining one embodiment of the present invention, of which FIG. 1 is a block diagram showing the structure of the printer ink face circuit, and FIG. 2 is a block diagram showing the response signal of this circuit. Various waveform diagrams showing the principle of adjustment of the sending timing. FIG. 3 is various waveform diagrams showing the principle of adjustment of the pulse width of the response signal of this circuit. l1...CPU, 12...Nonvolatile memory, 13...Data sending signal, 15...First timer, 16... Second
timer, 18... flip-flop circuit, l
9...Response signal.

Claims (1)

【特許請求の範囲】 上位装置からのデータ送出信号の受信によって起動され
第1の時間を計時する第1のタイマと、この第1のタイ
マの計時終了によって起動され第2の時間を計時する第
2のタイマと、 第1および第2の時間をそれぞれ調整可能な時間量とし
て記憶した不揮発性メモリと、 不揮発性メモリに記憶されたこれらの時間をそれぞれ第
1および第2のタイマに設定する時間設定手段と、 第1のタイマの計時終了時に前記データ送出信号に対す
る応答パルスの送出を開始し、第2のタイマの計時終了
までをその応答パルスのパルス幅とする応答パルス作成
手段 とを具備することを特徴とするプリンタインタフエイス
回路。
[Claims] A first timer that is activated by receiving a data transmission signal from a host device and measures a first time; and a second timer that is activated when the first timer ends and measures a second time. 2 timers; non-volatile memory storing first and second times as adjustable amounts of time; and times for setting these times stored in non-volatile memory in the first and second timers, respectively; and a response pulse generating means that starts sending out a response pulse in response to the data sending signal when the first timer finishes counting, and sets the pulse width of the response pulse until the second timer finishes counting. A printer interface circuit characterized by:
JP1187295A 1989-07-21 1989-07-21 Printer interface circuit Pending JPH0353317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1187295A JPH0353317A (en) 1989-07-21 1989-07-21 Printer interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1187295A JPH0353317A (en) 1989-07-21 1989-07-21 Printer interface circuit

Publications (1)

Publication Number Publication Date
JPH0353317A true JPH0353317A (en) 1991-03-07

Family

ID=16203499

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1187295A Pending JPH0353317A (en) 1989-07-21 1989-07-21 Printer interface circuit

Country Status (1)

Country Link
JP (1) JPH0353317A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05313836A (en) * 1992-05-14 1993-11-26 Mita Ind Co Ltd Data transfer system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05313836A (en) * 1992-05-14 1993-11-26 Mita Ind Co Ltd Data transfer system

Similar Documents

Publication Publication Date Title
JPH0353317A (en) Printer interface circuit
SU1755367A1 (en) Device for generating pulse trains
JP3871424B2 (en) Memory control device
JPH045292B2 (en)
JPH01137315A (en) Timer circuit
JP2692469B2 (en) Data controller
JPH04143850A (en) Printer interface circuit
KR940004023Y1 (en) F/f circuit
JP2679471B2 (en) Clock switching circuit
JP2648003B2 (en) Timer counter
JPH05181562A (en) Timer circuit
SU1156006A1 (en) Device for programmed control
JP2754654B2 (en) Microcomputer output control circuit
JPH01126572A (en) Test signal generation circuit for lsi
JPS63287109A (en) Timing generating circuit
JPH054052U (en) Waveform control circuit for IC tester
JPS62211766A (en) Reading circuit
JPS6359017A (en) Pulse generating circuit
JPH05113908A (en) Data processor
JPS6346509A (en) Sequence controller
JPS63201848A (en) Address counter control system for memory
JPS59163621A (en) Output system of digital signal
JPH0555883A (en) Timer circuit
JPH0427730B2 (en)
JPS61253546A (en) Interruption signal generator for multi-job executing device