JPH0410091A - Device for detecting load/unload of memory cartridge - Google Patents

Device for detecting load/unload of memory cartridge

Info

Publication number
JPH0410091A
JPH0410091A JP2113245A JP11324590A JPH0410091A JP H0410091 A JPH0410091 A JP H0410091A JP 2113245 A JP2113245 A JP 2113245A JP 11324590 A JP11324590 A JP 11324590A JP H0410091 A JPH0410091 A JP H0410091A
Authority
JP
Japan
Prior art keywords
memory cartridge
cartridge
removal
storage means
memory
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
JP2113245A
Other languages
Japanese (ja)
Inventor
Noriyuki Nakayama
則幸 中山
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.)
Olympus Corp
Original Assignee
Olympus Optical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP2113245A priority Critical patent/JPH0410091A/en
Publication of JPH0410091A publication Critical patent/JPH0410091A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To prevent a data stored in a memory cartridge from being destroyed by supplying power to the memory cartridge after detecting that the memory cartridge is securely loaded and the connecting state is stabilized when inserting the memory cartridge to a collector. CONSTITUTION:A load-unload detecting means 11 is provided to detect that a memory cartridge 2 is loaded/unloaded on/from a collector 9, and a control means 4 is provided to read a load/unload detection signal. The insertion of the memory cartridge is detected after the lapse of first filtering time having a prescribed length so that the load/unload detecting means 11 can instantaneously remove noise, and the unload of the memory cartridge is detected after the lapse of second filtering time shorter than the first filtering time. Thus, the power is supplied to the memory cartridge 2 for the first time after detecting that the memory cartridge 2 is securely inserted and that the connecting state with a collector terminal 9 is stabilized, and the destruction or the like of the data can be prevented.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は挿抜検知装置に係り、特に制御情報が格納され
たメモリカートリッジを挿抜するときに所定の電源供給
をする電源供給装置に関する。
[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention relates to an insertion/removal detection device, and particularly to a power supply that supplies a predetermined power when a memory cartridge storing control information is inserted or removed. Regarding equipment.

(従来の技術) 例えば、印字出力に関する情報を格納するメモリカート
リッジをプリンタ・コントローラに装着することによっ
て、印刷条件が設定され印字出力できるプリンタ装置が
ある。
(Prior Art) For example, there is a printer device that can set printing conditions and output printout by installing a memory cartridge that stores information regarding printout into a printer controller.

このプリンタ装置は、メモリカートリッジ内に印字で使
用するフォントを格納しておき、電源供給装置を持つプ
リンタ・コントローラにそのメモリカートリッジを装着
してフォント情報を入力させることによって格納されて
いる前記フォントで印字出力することができる。
This printer device stores fonts to be used for printing in a memory cartridge, and installs the memory cartridge into a printer controller having a power supply device to input font information. Can be printed out.

従って前記プリンタ装置は、異なるフォントを個々に格
納する数種類のメモリカートリッジを交換して装着する
ことによって、前記プリンタ・コントローラに数種類の
印刷条件が即時設定され出力することができる。しかし
、このプリンタ装置は、メモリカートリッジがコネクタ
に挿入されたことが検知されると、すぐに前記メモリカ
ートリッジに電源が供給される。
Therefore, in the printer device, by replacing and installing several types of memory cartridges that individually store different fonts, several types of printing conditions can be immediately set and output in the printer controller. However, in this printer device, as soon as it is detected that the memory cartridge is inserted into the connector, power is supplied to the memory cartridge.

(発明が解決しようとしている課題) 前述したように、前記プリンタ装置は、メモリカートリ
ッジが挿入途中であっても、検知されると電源が供給さ
れる。従って、前記メモリカートリッジとコネクタ端子
の接点が不安定に接続され、チャタリングが発生してい
た。前記メモリカートリッジがバッテリーを内蔵して、
データのバックアップされているRAMメモリを搭載す
るものであれば、チャタリングするTzRが投入された
際に、前記データを破壊された。
(Problems to be Solved by the Invention) As described above, the printer device is supplied with power when a memory cartridge is detected even if it is in the middle of being inserted. Therefore, the contacts between the memory cartridge and the connector terminal are connected unstablely, and chattering occurs. The memory cartridge has a built-in battery,
If the device is equipped with a RAM memory with data backed up, the data will be destroyed when a chattering TzR is introduced.

そこで本発明は、メモリカートリッジが確実に挿入され
て、コネクタ端子との接続状態が安定したことを検知し
て、前記メモリカートリッジに電源が供給できる挿抜検
知装置を提供することを目的とする。
SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide an insertion/removal detection device that can supply power to the memory cartridge by detecting that the memory cartridge is securely inserted and the connection state with the connector terminal is stable.

(課題を解決するための手段) 本発明は上記目的を達成するために、種々の制御情報を
格納したメモリカートリッジと、前記メモリカートリッ
ジがコネクタに挿抜されたことを検知する挿抜検知手段
と、前記挿抜検知手段からの挿抜検知信号を読み込む制
御手段と、前記挿抜検知手段が瞬時的なノイズを除去し
得る所定長の第1フィルタリング時間を持って前記メモ
リカートリッジ挿入を検知し、且つ前記第1フィルタリ
ング時間より短時間の第2フィルタリング時間を持って
前記メモリカートリッジの抜去検知を行うことを特徴と
するメモリカートリッジの挿抜検知装置を提供すること
ができる。
(Means for Solving the Problems) In order to achieve the above object, the present invention includes a memory cartridge storing various control information, an insertion/removal detection means for detecting that the memory cartridge is inserted into or removed from a connector, and a a control means for reading an insertion/extraction detection signal from an insertion/extraction detection means; the insertion/extraction detection means detects the insertion of the memory cartridge with a first filtering time of a predetermined length capable of removing instantaneous noise; It is possible to provide a memory cartridge insertion/removal detection device characterized in that the removal/removal detection of the memory cartridge is performed with a second filtering time shorter than the second filtering time.

(作用) 以上のような構成によると、本発明の挿抜検知装置は、
メモリカートリッジが確実に挿入されて、コネクタ端子
との接続状態が安定したことを検知して、前記メモリカ
ートリッジに電源が供給することができる。
(Function) According to the above configuration, the insertion/removal detection device of the present invention has the following features:
Power can be supplied to the memory cartridge by detecting that the memory cartridge is securely inserted and the connection state with the connector terminal is stable.

(実施例) 第1図は、本発明の電源供給装置の一実施例としてのプ
リンタコントローラの構成を示すブロック図である。
(Embodiment) FIG. 1 is a block diagram showing the configuration of a printer controller as an embodiment of the power supply device of the present invention.

このプリンタコントローラは、ホストコンピュータ(図
示せず)から転送されるコード化データを受信して、用
紙に画像情報を印字するための制御を行うプリンタコン
トローラ主制御部(以下、主制御部と略す)1と、プリ
ンタ本体に対して挿抜することが可能でフォント等の情
報データが格納されたメモリカートリッジ2と、このメ
モリカートリッジ2の情報データの朧み書きを行うメモ
リカートリッジ・ドライバ(以下、MCDと略す)3と
で構成される。
This printer controller is a printer controller main control unit (hereinafter abbreviated as main control unit) that receives encoded data transferred from a host computer (not shown) and performs control to print image information on paper. 1, a memory cartridge 2 that can be inserted into and removed from the printer body and stores information data such as fonts, and a memory cartridge driver (hereinafter referred to as MCD) that writes information data in the memory cartridge 2. (omitted) consists of 3.

前記主制御部1は、前記のホストコンピュータから受信
したコード化データを読み取って、用紙に画像情報を印
字するための処理に加え、前記MCD3からのサービス
要求信号(前記MCD3が前記メモリカートリッジの挿
抜を検出した時に、及び前記MCD3が異常状態になっ
た時に後述するアサートにする信号)を検知したとき、
予め設定された命令を前記MCD3に転送する。前記M
CD3は、その命令に従った処理を実行する。
The main control unit 1 reads coded data received from the host computer and prints image information on paper. and when the MCD 3 is in an abnormal state, a signal to be asserted (which will be described later) is detected.
A preset command is transferred to the MCD 3. Said M
The CD3 executes processing according to the instruction.

次に前記MCD3の構成は、MCD制御部4と前記主制
御部1との間に、Iloを制御したり、データを転送す
るアドレス/データバスラによって、通信制御ポート6
と通信データポート7サービス要求信号出力ポート8と
がそれぞれ接続されている。
Next, the configuration of the MCD 3 is such that a communication control port 6 is provided between the MCD control section 4 and the main control section 1 by an address/data busler that controls Ilo and transfers data.
and communication data port 7 and service request signal output port 8 are connected to each other.

またカートリッジ・コネクタ9と前記MCD制御部4と
の間に前記アドレス/データバス5によって、カートリ
ッジ・データ/アドレスポート10とカートリッジ挿抜
検知ポート11とカートリッジ電源供給ポート12とカ
ートリッジ種類検知ポート13とがそれぞれ接続されて
いる。
Further, a cartridge data/address port 10, a cartridge insertion/removal detection port 11, a cartridge power supply port 12, and a cartridge type detection port 13 are connected between the cartridge connector 9 and the MCD control section 4 by the address/data bus 5. each connected.

前記MCD制御部4は、前記主制御部1との通信制御、
前記主制御部1からの命令解析と命令実行、前記メモリ
カートリッジ2の挿抜検知およびメモリカートリッジ2
への電源のオン/オフ制御を行なっている。
The MCD control unit 4 controls communication with the main control unit 1,
Analysis and execution of commands from the main control unit 1, detection of insertion and removal of the memory cartridge 2, and memory cartridge 2
Controls on/off of power to the

次に通信制御ポート6は、前記主制御部1とのデータ通
信において、データ送受信に伴うハンドシェイクを実行
するための一手段であり、前記MCD制御部4内のCP
U4a (第3図)により制御される。
Next, the communication control port 6 is a means for executing a handshake accompanying data transmission and reception in data communication with the main control unit 1, and is a means for executing handshaking associated with data transmission and reception, and is a
Controlled by U4a (Figure 3).

そして前記通信データポート7は、前記主制御部1との
データ通信におけるデータ送受信手段である。つまり前
記MCD3が前記主制御部1から受信するのは、命令(
コマンド)と、その命令に付加するデータ、そして前記
MCD3が前記主制御部1へ送信するのは、前記メモリ
カートリッジ2内のデータと、前記MCD3の状態を示
すスティタスである。
The communication data port 7 is a data transmitting/receiving means for data communication with the main control section 1. In other words, what the MCD 3 receives from the main control unit 1 is the command (
What the MCD 3 sends to the main control unit 1 are data in the memory cartridge 2 and status indicating the status of the MCD 3.

前記CPU4aは、前記通信制御ポート6と前記通信デ
ータポート7をアクセスすることにより、前記主制御部
1からの前記コマンド/データの入力、または、前記主
制御部1への前記データ/スティタスの出力を実行する
ことができる。
The CPU 4a inputs the command/data from the main control section 1 or outputs the data/status to the main control section 1 by accessing the communication control port 6 and the communication data port 7. can be executed.

またサービス要求信号出力ポート8は、前記主制御部1
へ、前記サービス要求信号を送信する手段である。前記
カートリッジ・データ/アドレスポート10は、挿抜て
きる前記メモリカートリッジ2と、前記CPU4aとの
データ転送のための入出力手段である。そして前記CP
U4aは、前記主制御部1から受信したデータを前記メ
モリカートリッジ2に書き込んだり、前記メモリカート
リッジ2から読みだしたデータを前記主制御部1へ送信
するときに、それぞれこのサービス要求信号出力ポート
8を選択する。
Further, the service request signal output port 8 is connected to the main control unit 1.
means for transmitting the service request signal to. The cartridge data/address port 10 is an input/output means for data transfer between the memory cartridge 2, which can be inserted and removed, and the CPU 4a. and said CP
When U4a writes data received from the main control unit 1 to the memory cartridge 2 or transmits data read from the memory cartridge 2 to the main control unit 1, the service request signal output port 8 is used. Select.

そして前記カートリッジ挿抜検知ポート33は、前記メ
モリカートリッジ2の挿抜を検知する手段である。前記
カートリッジ電源供給ポート12は、メモリカートリッ
ジ2への電源を供給する手段である。前記カートリッジ
種類検知ポート13は、前記メモリカートリッジ2に内
蔵されているメモリ媒体の種類(ROM4b、RAM4
 cなど)を検知するための手段である。
The cartridge insertion/removal detection port 33 is means for detecting insertion/removal of the memory cartridge 2. The cartridge power supply port 12 is means for supplying power to the memory cartridge 2. The cartridge type detection port 13 detects the type of memory medium (ROM4b, RAM4b, etc.) built into the memory cartridge 2.
c, etc.).

また前記カートリッジ・コネクタ9は、前記メモリカー
トリッジ2を挿入するコネクタである。
Further, the cartridge connector 9 is a connector into which the memory cartridge 2 is inserted.

第2図は前記メモリカートリッジ2のデータ記憶構成を
示す。
FIG. 2 shows the data storage structure of the memory cartridge 2. As shown in FIG.

前記メモリカートリッジ2はRAM、またはROMでな
るメモリ2aを内蔵しデータとしてフォント他の情報を
格納した前記MCD3本体1対して、脱芒可能なカート
リッジで、メモリの先頭アドレスADから所定長のID
番号(FONT)が格納されている。すなわち、先頭ア
ドレスADにはコード「46」の“F“が格納され、次
アドレスへ順次にコードr51hJ、r4ehJ、r5
4hJが格納されている。
The memory cartridge 2 is a removable cartridge that has a built-in memory 2a made of RAM or ROM, and stores fonts and other information as data.
A number (FONT) is stored. That is, "F" of code "46" is stored in the first address AD, and codes r51hJ, r4ehJ, r5 are sequentially stored in the next address.
4hJ is stored.

第3図に前記MCD制御部4の構成を示し説明する。FIG. 3 shows the configuration of the MCD control section 4 and will be explained.

前記MCD制御部4の構成は、後述するプログラムRO
M4bに格納されたプログラムにより前記MCD3の制
御を行なうCPU4aと、前記CPU4aが前記MCD
3を制御するためのプログラムを格納するプログラムR
OM4bと、前記プログラムROM4bに格納されたプ
ログラムで使用するエリアを確保するワークRAM4 
Cとで構成され、それぞれが前記アドレス/データバス
5に接続してそれぞれのポートにデータを転送している
The configuration of the MCD control section 4 is based on the program RO described later.
A CPU 4a controls the MCD 3 according to a program stored in the M4b;
Program R that stores a program for controlling 3.
OM4b and a work RAM4 that secures an area used by the program stored in the program ROM4b.
C, each of which is connected to the address/data bus 5 and transfers data to its respective port.

次に第4図は前記ワークRAM4 Cの構成を示し詳細
に説明する。
Next, FIG. 4 shows the structure of the work RAM 4C and will be described in detail.

前記ワークRAM4Cのファイルt+Il’r成は、起
動タイマ(CDT IMER)4 d、電源安定タイマ
(VDT IMER)4 e、挿抜記憶手段(CARD
STTS)4 f、ID確認記憶手段(CARDIDS
TTS)4g、メモリ媒体記憶手段(MEMOSTTS
)4h、電源供給判定記憶手段(VCCREQ)4 i
、読み書き判定記憶手段(VCCRDY)4 j、格納
記憶手段(CNCTFLAG)4k及びID登録記憶手
段(IDNUM)4mによって構成されている。
The file t+Il'r of the work RAM 4C consists of a startup timer (CDT IMER) 4d, a power supply stability timer (VDT IMER) 4e, and an insertion/removal storage means (CARD).
STTS) 4 f, ID confirmation storage means (CARDIDS)
TTS) 4g, memory medium storage means (MEMOSTTS)
) 4h, power supply judgment storage means (VCCREQ) 4i
, read/write determination storage means (VCCRDY) 4j, storage storage means (CNCTFLAG) 4k, and ID registration storage means (IDNUM) 4m.

前記起動タイマ(CDTIMER)4dは、前記CPU
4aが前記カートリッジ挿抜検知ポート11を読むこと
により、前記メモリカートリッジ2の挿入開始が検知さ
れて接続状態が安定するのを待つための計数手段である
。前記起動タイマ4dは、前記CPU4aが前記メモリ
カートリッジ2の挿入開始を検知してから起動を開始す
る。この計数手段が500111secを計数するまで
の間に接続状態が変化しなかったら安定したと判断して
、前記電源供給判定記憶手段41をアサートして、前記
メモリカートリッジ2に電源を供給する。ここで、前記
アサートとは有効にすることで、無効にすることをネゲ
ートとする。
The startup timer (CDTIMER) 4d is
4a is a counting means for detecting the start of insertion of the memory cartridge 2 by reading the cartridge insertion/removal detection port 11 and waiting for the connection state to become stable. The activation timer 4d starts activation after the CPU 4a detects the start of insertion of the memory cartridge 2. If the connection state does not change until the counting means counts 500111 seconds, it is determined that the connection state is stable, and the power supply determination storage means 41 is asserted to supply power to the memory cartridge 2. Here, the above-mentioned assertion means to enable, and invalidating means to negate.

前記電源安定タイv (VDT IMER)4 eは、
前記CPU4aが、前記メモリカートリッジに電源を供
給してから電圧が安定するのを待つだめの計数手段であ
る。電源安定タイマ4eは、前記CPU4aが前記電源
供給判定記憶手段41のアサートを検知したとき起動を
開始する。この計数手段が1 o o m5ec後に前
記読み書き判定記憶手段4jをアサートして、前記メモ
リカートリッジ2を前記CPU4aが正しく読み書き出
来る状態にする。
The power supply stability tie v (VDT IMER) 4 e is
The CPU 4a is a counting means that waits until the voltage becomes stable after supplying power to the memory cartridge. The power supply stability timer 4e starts activation when the CPU 4a detects the assertion of the power supply determination storage means 41. This counting means asserts the read/write determination storage means 4j after 1 o o m5ec, and puts the memory cartridge 2 in a state where the CPU 4a can correctly read and write.

前記挿抜記憶手段(CARDSTTS)4 fは、前記
CP04gが前記メモリカートリッジ2の前記カートリ
ッジ・コネクタ9への挿抜状態を格納するための記憶手
段であり、挿入されているときアサートし、抜かれてい
ればネゲートする。
The insertion/removal storage means (CARDSTTS) 4f is a storage means for the CP04g to store the insertion/removal state of the memory cartridge 2 into the cartridge connector 9, and is asserted when the memory cartridge 2 is inserted and asserted when the memory cartridge is removed. Negate.

前記ID確認記憶手段(CARD I DSTTS)4
gは、前記CP04aが、前記カートリッジ・コネクタ
9に挿入された前記メモリカートリッジ2に格納されて
いるIDが、正しいがどうかを記憶して置くための記憶
手段で、正しいIDであればアサートし、正しくないI
Dであればネゲートする。
The ID confirmation storage means (CARD I DSTTS) 4
g is a storage means for the CP04a to memorize whether the ID stored in the memory cartridge 2 inserted into the cartridge connector 9 is correct, and asserts if the ID is correct; Incorrect I
If D, negate.

前記メモリ媒体記憶手段(MEMOSTTS)4hは、
前記CPU4aが、前記カートリッジ・コネクタ9に挿
入された前記メモリカートリッジ2内のメモリ媒体の種
類(ROM、RAM、等)を記憶しておくための、記憶
手段で、前記カートリッジ種類検知ポート13の値が記
憶される。
The memory medium storage means (MEMOSTTS) 4h is
The CPU 4a is a storage means for storing the type of memory medium (ROM, RAM, etc.) in the memory cartridge 2 inserted into the cartridge connector 9, and the CPU 4a stores the value of the cartridge type detection port 13. is memorized.

前記電源供給判定記憶手段(VCCREQ)41は、前
記CPU4aが、前記メモリカートリッジ2に電源を供
給するか否か判定するために参照する記憶手段である。
The power supply determination storage means (VCCREQ) 41 is a storage means that the CPU 4a refers to in order to determine whether or not to supply power to the memory cartridge 2.

前記起動タイマ4dが、500IIlsecをカウント
したときアサートし、前記メモリカートリッジ2への読
み書きが終了したとき、または、前記メモリカートリッ
ジ2が前記カートリッジ・コネクタ9から抜がれたとき
に、ネゲートする。前記CPU4aは、この記憶手段に
格納されている値を、前記カートリッジ電源供給ポート
12に出力し、この記憶手段がアサートされているとき
は、電源オンにして、ネゲートされているときは、電源
オフにする。
The activation timer 4d asserts when counting 500 IIlsec, and negates when reading and writing to the memory cartridge 2 is completed or when the memory cartridge 2 is removed from the cartridge connector 9. The CPU 4a outputs the value stored in this storage means to the cartridge power supply port 12, and when this storage means is asserted, the power is turned on, and when this storage means is negated, the power is turned off. Make it.

前記読み書き判定記憶手段(VCCRDY)4jは、前
記CPU4aが、前記メモリカートリッジ2への読み書
きを開始を判定するために参照する記憶手段で、前記メ
モリカートリッジ2に電源供給が開始されてから起動す
る前記電源安定タイマ4eが、100 m5ecをカウ
ントしたときこの記憶手段をアサートする。この記憶手
段がアサートされれば供給されている電源電圧が安定し
たとみなして前記メモリカートリッジ2をアクセスする
ことが出来る。この記憶手段は、前記電源供給判定記憶
手段41のネゲートと共にネゲートする。
The read/write determination storage unit (VCCRDY) 4j is a storage unit that the CPU 4a refers to in order to determine whether to start reading or writing to the memory cartridge 2. The power supply stability timer 4e asserts this storage means when it counts 100 m5ec. When this storage means is asserted, it is assumed that the supplied power supply voltage is stabilized, and the memory cartridge 2 can be accessed. This storage means is negated together with the negation of the power supply determination storage means 41.

第5図(a)乃至(d)に前記格納記憶手段(CNCT
FLAG)4にの構成図を示す。
FIGS. 5(a) to 5(d) show the storage means (CNCT).
The configuration diagram of FLAG) 4 is shown.

前記格納記憶手段(CNCTFLAG)4には、前記C
PU4aが、常時、前記カートリッジ挿抜検知ポート1
1(図示せず)を5 m5ec毎にリードして、その値
を格納する記憶手段である。その格納する領域は、3つ
の領域(CNCTFLAGI。
The storage storage means (CNCTFLAG) 4 stores the C
PU4a is always connected to the cartridge insertion/removal detection port 1.
1 (not shown) every 5 m5ec and stores the value. The storage area is three areas (CNCTFLAGI.

CNCTFLAG2.CNCTFLAG3.以下C1,
C2,C3とする)があり、それら領域を前記値が51
11sec毎に移動する。
CNCTFLAG2. CNCTFLAG3. Below C1,
C2 and C3), and the value of these areas is 51.
It moves every 11 seconds.

この移動は、まず領域C2に格納されている値が領域C
3に移動(矢印A)L、次に領域C1に格納された値が
領域C2に移動(矢印B)する。
In this movement, first, the value stored in area C2 is
3 (arrow A) L, then the value stored in area C1 moves to area C2 (arrow B).

さらに前記カートリッジ挿抜検知ポート11から読み込
んだ値を領域C1に格納(矢印C)する。
Further, the value read from the cartridge insertion/removal detection port 11 is stored in the area C1 (arrow C).

そして、3個の領域の内、2個以上の領域がアサートさ
れていれば、挿入されたと検知し、3個の領域の内、2
個以上の領域がネゲートされていれば、抜かれたと検知
する。
If two or more of the three areas are asserted, insertion is detected, and two or more of the three areas are asserted.
If more than 2 areas have been negated, it is detected that the area has been negated.

すなわち、第5図(b)に示すようにn回目に読み込ん
だ値(d a t e)の格納が行われると、領域C1
にdate(n)、領域C2にdate(n−1)、領
域C3にdate(n−2)が格納される。
That is, as shown in FIG. 5(b), when the nth read value (d a t e) is stored, the area C1
date(n) is stored in area C2, date(n-1) is stored in area C3, and date(n-2) is stored in area C3.

この後5 m5ec経過するとそれぞれ値が領域を移動
して、第5図(C)に示すようにn+1回目の格納が行
われると、領域C1にda t e (n+1)領域C
2にdate(n)、領域c3にdate(n−1)が
格納される。
After this, when 5 m5ec has elapsed, the values move from one area to another, and when the n+1th storage is performed as shown in FIG.
date(n) is stored in area c3, and date(n-1) is stored in area c3.

さらに5IIlsec経過するとそれぞれ値が領域を移
動して、第5図(d)に示すようにn+2回目の格納が
行われ、領域C1にda t e (n+2) 。
After a further lapse of 5 II lsec, each value moves through the area, and as shown in FIG. 5(d), the n+2th storage is performed, and data (n+2) is stored in the area C1.

領域C2にda t e (n+1) 、領域c3にd
ate(n゛)が格納されことになる。
da te (n+1) in area C2, d in area c3
ate(n) will be stored.

第6図は前記ID登録記憶手段(IDNUM)4mの構
成を示す。
FIG. 6 shows the configuration of the ID registration storage means (IDNUM) 4m.

前記ID登録記憶手段4mは、前記CPU4aが、前記
ID確認記憶手段4gを設定するときに、参照する記憶
手段で、ここに格納されている値と前記メモリカートリ
ッジ2の先頭アドレスに格納されているIDを比較して
、等しいときに前記ID確認記憶手段4gをアサートす
る。
The ID registration storage means 4m is a storage means that the CPU 4a refers to when setting the ID confirmation storage means 4g, and the values stored here and the first address of the memory cartridge 2 are stored in the ID registration storage means 4m. The IDs are compared, and when they are equal, the ID confirmation storage means 4g is asserted.

また、この記憶手段は、前記主制御部1がらの、ID登
録命令により複数個の登録ができる。
Further, this storage means can register a plurality of IDs by an ID registration command from the main control unit 1.

すなわち前記ID登録記憶手段4mは、例えば4つの領
域(IDNUMI、IDNUM2.IDN0M3及びI
DNUM4.以下11,12.13及びI4とする)を
持っている。そして領域11には“FON”r”、領域
■2には“FORMAT”が前記主制御部1がらのID
登録命令によりそれぞれ格納される。また領域13及び
領域I4は未定義である。
That is, the ID registration storage means 4m has, for example, four areas (IDNUMI, IDNUM2.IDN0M3 and
DNUM4. 11, 12, 13, and I4). Then, in the area 11, “FON”r” and in the area 2, “FORMAT” are the IDs of the main control unit 1.
Each is stored by a registration command. Furthermore, area 13 and area I4 are undefined.

次に第7図にカートリッジ挿抜検知ポート11の構成例
を示す。
Next, FIG. 7 shows an example of the configuration of the cartridge insertion/removal detection port 11.

電気的に一端を接地するメモリカートリッジ2がカート
リッジ・コネクタ9に装着されている。
A memory cartridge 2 whose one end is electrically grounded is attached to a cartridge connector 9.

前記カートリッジ・コネクタ9はインバータ11aの入
力端及び、一端に5Vの電圧が印加される抵抗11bの
他端に接続している。前記インバータ11aの出力端1
1cは、MCD制御部4に接続して、前記メモリカート
リッジ2がカートリッジ・コネクタ9に装着されている
が否が検知信号を出力している。
The cartridge connector 9 is connected to the input end of an inverter 11a and the other end of a resistor 11b to which a voltage of 5V is applied to one end. Output end 1 of the inverter 11a
1c is connected to the MCD control section 4 and outputs a detection signal whether the memory cartridge 2 is attached to the cartridge connector 9 or not.

また第8図にはカートリッジ電源供給ポート12の構成
例を示す。
Further, FIG. 8 shows an example of the configuration of the cartridge power supply port 12.

一端が電源VCCに接続されたメモリカートリッジ2が
カートリッジ・コネクタ9に装着されている。前記カー
トリッジ・コネクタ9は、他端子が5■に印加されたス
イッチS1の一端子に接続されている。前記スイッチS
1は、接点端子がMCD制御部4に接続し、接点を閉じ
ることによって前記メモリカートリッジ2に電源が供給
される。
A memory cartridge 2 having one end connected to a power supply VCC is attached to a cartridge connector 9. The cartridge connector 9 is connected to one terminal of a switch S1, the other terminal of which is applied to 5. Said switch S
1, a contact terminal connects to the MCD control unit 4, and power is supplied to the memory cartridge 2 by closing the contact.

次に以上のように構成された本実施例のプリンタ・コン
トローラの動作について説明する。このプリンタ・コン
トローラの動作は、大きく分けて4つの処理の動作に分
けることができる。その4つの処理は、挿抜検知処理、
電源供給処理、ID登録・チエツク処理及び通信処理に
なる。まず全体の動作(カートリッジ・リードの動作)
を説明した後、各処理の動作について説明する。
Next, the operation of the printer controller of this embodiment configured as above will be explained. The operations of this printer controller can be roughly divided into four processing operations. The four processes are insertion/removal detection processing,
These include power supply processing, ID registration/check processing, and communication processing. First, the overall operation (cartridge read operation)
After explaining this, the operation of each process will be explained.

第9図は前記メモリカートリッジ2をカートリッジ・コ
ネクタ9に装着した時のカートリッジ・リードの動作を
示すフローチャートである。
FIG. 9 is a flowchart showing the cartridge read operation when the memory cartridge 2 is attached to the cartridge connector 9.

さらに第10図は前記カートリッジ・リードの動作に対
応するタイミングチャートであり、前記フローチャート
のステップに対応する箇所をSl。
Furthermore, FIG. 10 is a timing chart corresponding to the operation of the cartridge read, and the portions corresponding to the steps of the flowchart are indicated by Sl.

S2・・・とじて示す。S2... is shown together.

前記メモリカートリッジ2が装着されたか否か判定する
(ステップSl)。装着された時(Y)は、挿抜記憶手
段4fに検出信号が検出される。
It is determined whether the memory cartridge 2 is installed (step Sl). When installed (Y), a detection signal is detected in the insertion/removal storage means 4f.

未装着の時(N)は、待機状態を維持する。When not attached (N), the standby state is maintained.

次に前記検出信号が検出されてから、起動タイマ4dが
500 m5ecをカウントして装着が確定したか判定
する(ステップS2)。装着が確定しなかった場合(N
)は、前記起動タイマ4dがリセットされ、再度前記検
出信号が入力されるまで待機する。装着が確定した場合
(Y)は、電源(VCC)が前記メモリカートリッジ2
に供給される(ステップS3)。次に電源が供給されて
から電源安定タイマ4eが100 m5ecカウントし
て、電源が安定したか判定する(ステップS4)。前記
電源が安定しなかった時(N)は、前記電源安定タイマ
4eがリセットされ、再度安定が確定されるまで待機す
る。電源が安定した時(Y)は、前記メモリカートリッ
ジ2からID読み出す(ステップS5)。そして前記メ
モリカートリッジ2からID番号を読み出した後、前記
電源からの供給をオフする(ステップS6)。
Next, after the detection signal is detected, the activation timer 4d counts 500 m5ec and determines whether the attachment is confirmed (step S2). If the installation is not confirmed (N
) waits until the activation timer 4d is reset and the detection signal is input again. If the installation is confirmed (Y), the power supply (VCC) is connected to the memory cartridge 2.
(step S3). Next, after power is supplied, the power stabilization timer 4e counts 100 m5ec and determines whether the power has been stabilized (step S4). When the power supply is not stabilized (N), the power supply stability timer 4e is reset and waits until stability is determined again. When the power supply is stable (Y), the ID is read from the memory cartridge 2 (step S5). After reading the ID number from the memory cartridge 2, the power supply is turned off (step S6).

次に読出した前記ID番号が正しいものか判定をする(
ステップS7)。前記ID番号が正しくなかった時(N
)は、ステップS1に戻り、再度正しい前記ID番号の
メモリカートリッジが装着されるまで待機する。正しい
前記ID番号であった時(Y、)はID確認記憶手段(
CARDIDSTTS)4gをアサートする(ステップ
S8)。
Next, determine whether the read ID number is correct (
Step S7). When the above ID number is incorrect (N
) returns to step S1 and waits until the memory cartridge with the correct ID number is installed again. When the ID number is correct (Y,), the ID confirmation storage means (
CARDIDSTTS)4g is asserted (step S8).

次にMCD制御部4からプリンタ・コントローラ主制御
部(以下、主制御部とする)1にサービス要求信号が送
信される(ステップS9)。そして前記主制御部1から
のカートリッジ・センス・コマンドを通信データポート
7に送信して、受信したか否かMCD制御部4が判定す
る(ステップ510)。そのカートリッジ・センス・コ
マンドを受信しなかった時(N)は、受信がされるまで
待機する。またそのカートリッジ・センス・コマンドを
受信した時(Y) 、MCD制御部4は前記主制御部1
にID確認信号を送信する(ステップ511)。前記主
制御部1は正しいID番号か確認した後、リード・コマ
ンドを通信データボート7に送信して、受信したか否か
MCD制御部4が判定する(ステップ512)。その受
信がされなかった時(N)は、受信が確認されるまで待
機している。その受信がなされた時(Y)は、前記電源
(V CC)が前記メモリカートリッジ2に供給される
(ステップ813)。次に電源が供給されてから電源安
定タイマ4eが100 m5ecカウントして電源が安
定したか判定する(ステップ514)。前記電源が安定
しなかった時(N)は、前記電源安定タイマ4eがリセ
ットされ、再度安定が確定されるまで待機する。前記電
源が安定した時(Y)は、前記メモリカートリッジ2か
らデータを読み出しくステップ515)、前記主制御部
1に送信する(ステップ516)。前記データを受信し
た前記主制御部1は、キャンセル・コマンドを前記MC
D制御部4に送信する(ステップ517)。前記キャン
セル・コマンドを前記通信データポータ7に受信したか
否か判定をする(ステップ518)。前記キャンセル・
コマンドが受信されていなかった時(N)は、ステップ
S15に戻り、再度前記メモリカートリッジ2からデー
タを読み出す。その前記キャンセル・コマンドが受信さ
れていた時(Y)は、前記メモリカートリッジ2への電
源の供給を止める(ステップ519)。
Next, a service request signal is transmitted from the MCD control section 4 to the printer controller main control section (hereinafter referred to as main control section) 1 (step S9). Then, the cartridge sense command from the main control section 1 is transmitted to the communication data port 7, and the MCD control section 4 determines whether or not it has been received (step 510). If the cartridge sense command is not received (N), it waits until it is received. When the cartridge sense command is received (Y), the MCD control section 4
An ID confirmation signal is transmitted to (step 511). After confirming whether the ID number is correct, the main control unit 1 transmits a read command to the communication data boat 7, and the MCD control unit 4 determines whether or not it has been received (step 512). If it is not received (N), it waits until the reception is confirmed. When the reception is made (Y), the power (V CC) is supplied to the memory cartridge 2 (step 813). Next, after the power is supplied, the power stability timer 4e counts 100 m5ec and determines whether the power has been stabilized (step 514). When the power supply is not stabilized (N), the power supply stability timer 4e is reset and waits until stability is determined again. When the power supply is stable (Y), data is read from the memory cartridge 2 (step 515) and transmitted to the main controller 1 (step 516). The main control unit 1 that has received the data sends a cancel command to the MC.
It is transmitted to the D control unit 4 (step 517). It is determined whether the cancel command has been received by the communication data porter 7 (step 518). The above cancellation/
If no command has been received (N), the process returns to step S15 and data is read from the memory cartridge 2 again. If the cancel command has been received (Y), the power supply to the memory cartridge 2 is stopped (step 519).

以上のように本実施例のプリンタ・コントローラのメモ
リカートリッジ2への電源供給は、メモリカートリッジ
2にID番号やデータの読み書きする時以外は電源を供
給しない。
As described above, power is not supplied to the memory cartridge 2 of the printer controller of this embodiment except when reading and writing ID numbers and data to the memory cartridge 2.

また、さらにプリンタ・コントローラの全体の動作に関
して説明したが、前述した挿抜検知処理、電源供給処理
、ID登録・チエツク処理及び通信処理の各動作につい
て説明する。
Furthermore, although the overall operation of the printer controller has been described, the operations of the aforementioned insertion/removal detection processing, power supply processing, ID registration/check processing, and communication processing will be explained.

まず、メモリカートリッジのための挿抜検知処理につい
て説明する。、 MCD制御部4内のCPU4aは、5 m5ec毎に、
格納記憶手段CNCTFLAGI (以下、領域C1と
する)の値をCNCTFLAG2 (以下、領域C2と
する)に移動して、CNCTFLAG2の値をCNCT
FLAG3 (以下、領域C3とする)に移動する。さ
らにカートリッジ挿抜検知ポート11の値を領域C1に
格納する。そして、領域C1、領域C2、領域C3を参
照して、その組合せが、 (領域CI、領域C2,領域C3) −(0,1,1)OR(1,0,1)OR(1,1,0
)OR(1,1,1) のとき、前記メモリカートリッジ2の挿入が開始された
と判定して、前記メモリカートリッジ2の実装状態を示
す挿抜記憶手段(CARDSTTS)4fをアサートす
る。また (領域CI、領域C2,領域C3) 四(0,0,0)OR(0,0,1)OR(0,1,0
)OR(1,0,0) のとき、前記メモリカートリッジ2が抜かれたと判定し
て、前記挿抜記憶手段4fをネゲートする。
First, the insertion/removal detection process for the memory cartridge will be explained. , the CPU 4a in the MCD control unit 4, every 5 m5ec,
The value of storage storage means CNCTFLAGI (hereinafter referred to as area C1) is moved to CNCTFLAG2 (hereinafter referred to as area C2), and the value of CNCTFLAG2 is transferred to CNCT
Move to FLAG3 (hereinafter referred to as area C3). Further, the value of the cartridge insertion/removal detection port 11 is stored in the area C1. Then, referring to area C1, area C2, and area C3, the combination is (area CI, area C2, area C3) - (0, 1, 1) OR (1, 0, 1) OR (1, 1 ,0
)OR(1,1,1), it is determined that the insertion of the memory cartridge 2 has started, and the insertion/removal storage means (CARDSTTS) 4f indicating the mounting state of the memory cartridge 2 is asserted. Also (area CI, area C2, area C3) 4 (0, 0, 0) OR (0, 0, 1) OR (0, 1, 0
)OR(1,0,0), it is determined that the memory cartridge 2 has been removed, and the insertion/removal storage means 4f is negated.

ただし、5 m5ec毎に3回読み込んだうち1回が他
と異なるとき、その1回は、メモリカートリッジ2の挿
抜動作とは関係の無いノイズとみなす。
However, if one reading out of three readings every 5 m5ec is different from the others, that one reading is considered to be noise unrelated to the insertion/removal operation of the memory cartridge 2.

第11図は挿抜検知処理の一実施例であり、カートリッ
ジ挿抜検知ポート11と、5IIISeC毎の格納記憶
手段(CNCTFLAG)4k、前記挿抜記憶手段4f
との読み込むタイミングの関係を示す。
FIG. 11 shows an embodiment of the insertion/extraction detection process, showing the cartridge insertion/extraction detection port 11, the storage storage means (CNCTFLAG) 4k for each 5IIISeC, and the insertion/extraction storage means 4f.
This shows the relationship between the loading timing and the loading timing.

カートリッジ挿抜検知ポート11の変化を示す部分Aは
、前記メモリカートリッジ2の挿抜とは関係の無いノイ
ズであり、前記挿抜記憶手段4fが、ネゲートされてい
る。
Part A indicating a change in the cartridge insertion/extraction detection port 11 is noise unrelated to the insertion/extraction of the memory cartridge 2, and the insertion/extraction storage means 4f is negated.

同様に部分Bで、前記メモリカートリッジ2が挿入され
、前記メモリカートリッジ2と、カートリッジ・コネク
タ9の接触点が乱れている状態である。従って、まだ前
記挿抜記憶手段4fは、ネゲートされている。
Similarly, in part B, the memory cartridge 2 is inserted and the contact points between the memory cartridge 2 and the cartridge connector 9 are disturbed. Therefore, the insertion/extraction storage means 4f is still negated.

同様に部分Cでは、前記メモリカートリッジ2の接触点
が移動中ではあるが接触状態が安定しているので、格納
記憶手段4kが(1,1,0)(0,1,1)となり、
前記挿抜記憶手段4fはアサートする。
Similarly, in part C, although the contact point of the memory cartridge 2 is moving, the contact state is stable, so the storage storage means 4k becomes (1, 1, 0) (0, 1, 1),
The insertion/extraction storage means 4f asserts.

部分りては、まだ前記接触点が移動しているため、再び
接触状態が不安定になる。これによって前記格納記憶手
段4kが(0,0,1)(1,0゜1)となり、前記挿
抜記憶手段4fがネゲートされる。
However, since the contact point is still moving, the contact state becomes unstable again. As a result, the storage storage means 4k becomes (0, 0, 1) (1, 0° 1), and the insertion/extraction storage means 4f is negated.

そして部分Eでは、前記接触点の移動が終了して接触状
態が確定したので、前記格納記憶手段4kが(1,1,
0)(1,1,,1)となり、前記挿抜記憶手段4には
、アサートする。
In the portion E, the movement of the contact point has been completed and the contact state has been established, so the storage storage means 4k is (1, 1,
0) (1, 1,, 1), and is asserted in the insertion/extraction storage means 4.

部分Fは、前記メモリカートリッジ2が、前記カートリ
ッジ・コネクタ9から抜かれ、前記挿抜記憶手段4fは
、ネゲートする。
In part F, the memory cartridge 2 is removed from the cartridge connector 9, and the insertion/extraction storage means 4f is negated.

このようにカートリッジ挿抜検知ポート11の値が乱れ
ていても、上記のような規則で前記挿抜記憶手段4fを
確定し、これを前記メモリカートリッジ2の実装状態を
示すフラグとして参照することにより、5 m5ec前
後の単発的なノイズを除去して、より確実なメモリカー
トリッジ2の挿抜検知をすることができる。
Even if the value of the cartridge insertion/removal detection port 11 is irregular in this way, the insertion/removal storage means 4f is determined according to the above-mentioned rules, and this is referred to as a flag indicating the mounting state of the memory cartridge 2. By removing the one-off noise around m5ec, insertion and removal of the memory cartridge 2 can be detected more reliably.

次に電源供給処理について説明する。Next, the power supply process will be explained.

メモリカートリッジ2が、カートリッジ・コネクタ9に
挿入が開始されても、上記の挿抜検知処理で示したよう
に、接触点が移動している間は接続状態が不安定になる
。そのため、挿入開始されてすぐに電源を供給するとメ
モリカートリッジ2を破壊したり、誤ったデータをリー
ド/ライトすることがある。つまり、前記挿抜記憶手段
4fでメモリカートリッジ2が挿入状態になっても、す
ぐにメモリカートリッジ2に電源を供給することができ
ない。
Even when the memory cartridge 2 starts to be inserted into the cartridge connector 9, the connection state becomes unstable while the contact point is moving, as shown in the above-mentioned insertion/removal detection process. Therefore, if power is supplied immediately after insertion has started, the memory cartridge 2 may be destroyed or incorrect data may be read/written. That is, even if the memory cartridge 2 is inserted into the insertion/removal storage means 4f, power cannot be immediately supplied to the memory cartridge 2.

そこで、上記の挿抜検知処理で説明した前記挿抜記憶手
段4fのアサートが一定時間以上継続してから電源を供
給するようにした。
Therefore, the power is supplied after the insertion/extraction storage means 4f continues to be asserted for a certain period of time as described in the above-mentioned insertion/extraction detection process.

第12図に前記電源供給処理の一実施例のタイムチャー
トを示し詳細に説明する。
FIG. 12 shows a time chart of one embodiment of the power supply processing and will be described in detail.

前記メモリカートリッジ2の挿入が開始されたとき、つ
まり挿抜記憶手段(CARDSTTS)4fがアサート
された時(T1)に、起動タイマ(CDT IMER)
4 dを起動させる。前記起動タイマ4dが、500m
5ecをカウントするまでの間(T2)に、前記挿抜記
憶手段4fに変化がなかった時、前記メモリカートリッ
ジ2の挿入が確定したと判定する。
When the insertion of the memory cartridge 2 is started, that is, when the insertion/removal storage means (CARDSTTS) 4f is asserted (T1), the activation timer (CDT IMER) is activated.
4 Start up d. The activation timer 4d is 500m
When there is no change in the insertion/removal storage means 4f until 5ec is counted (T2), it is determined that the insertion of the memory cartridge 2 is confirmed.

つまり前記挿抜記憶手段4fのアサートされた時(T1
)に、前記起動タイマ4dが起動する。
That is, when the insertion/removal storage means 4f is asserted (T1
), the activation timer 4d is activated.

しかし前記起動タイマ4dが5001sec以上をカウ
ントするまでの間(T2)に、前記挿抜記憶手段4fが
ネゲートされる場合がある。。
However, the insertion/removal storage means 4f may be negated until the activation timer 4d counts 5001 seconds or more (T2). .

つまり前記メモリカートリッジ2を挿入中は、カートリ
ッジ・コネクタ9との接触点が移動して接触状態が不安
定である。前記接触点が離れた時に前記起動タイマ4d
はリセットするが、再度前記挿抜記憶手段4fがアサー
トされたときに、前記起動タイマ4dは再起動する。
That is, while the memory cartridge 2 is being inserted, the contact point with the cartridge connector 9 moves and the contact state is unstable. When the contact point is separated, the activation timer 4d
is reset, but when the insertion/removal storage means 4f is asserted again, the activation timer 4d is restarted.

そして前記起動タイマ4dが50011ISeCをカウ
ントした時(T3)は、電源供給判定記憶手段(VCC
REQ)4 iをアサート(T4)して、カートリッジ
電源供給ポート12に、電源供給信号を出力(T5)し
て、前記メモリカートリッジ2に電源の供給(T6)を
開始する。
When the startup timer 4d counts 50011ISeC (T3), the power supply determination storage means (VCC
REQ)4i is asserted (T4), a power supply signal is outputted to the cartridge power supply port 12 (T5), and power supply to the memory cartridge 2 is started (T6).

また前記メモリカートリッジ2に電源供給を開始しても
電圧が安定する(T7)まで、読み書きするのを待たな
ければならない。つまり前記電源供給判定記憶手段41
がアサ−) (T5)されると、電源安定タイ7 (V
DT IMER)4 eが起動して、100 m5ec
カウント(T7)したら、読み書き判定記憶手段(VC
CRDY)4 jをアサート(T8)して、前記メモリ
カートリッジ2を読み書き可能な状態にする。
Further, even if power is started to be supplied to the memory cartridge 2, it is necessary to wait until the voltage becomes stable (T7) before reading or writing. In other words, the power supply determination storage means 41
(asserted) (T5), power supply stability tie 7 (V
DT IMER) 4 e started and 100 m5ec
After counting (T7), read/write judgment storage means (VC
CRDY)4j is asserted (T8) to make the memory cartridge 2 readable and writable.

このように、前記メモリカートリッジ2の接続状態の安
定と、電源供給後に電圧の安定を待つことにより、前記
メモリカートリッジ2の保護と、誤ったデータの読み書
きを防ぐことができる。
In this way, by stabilizing the connection state of the memory cartridge 2 and waiting for the voltage to stabilize after power is supplied, the memory cartridge 2 can be protected and erroneous data reading and writing can be prevented.

次にID登録・チエツク処理について説明する。Next, ID registration/check processing will be explained.

読み書き判定記憶手段(vCCRDY)4 jがアサー
トされると正しい識別(以下、IDとする)番号が登録
されたメモリカートリッジ2か否かを調べなければなら
ない。
When read/write determination storage means (vCCRDY) 4j is asserted, it is necessary to check whether or not the memory cartridge 2 has a correct identification (hereinafter referred to as ID) number registered.

その方法として、例えばプリンタ・コントローラで使用
する文字データが格納されていなければならないメモリ
カートリッジ2を使用する場合に、第6図のID登録記
憶手段4mにID番号として、F ON T ’  (
asciiコードで、46h、51h、4ch、54h
)を格納しておき、またメモリカートリッジ2をフォー
マットメモリとして使用する場合のために、 FORM
AT” (ascii :7−ドで、48h、4f’h
、52h、4dh、41h、54h )をID番号とし
て、ID登録記憶手段4mの第2領域I2に格納してお
く。
For example, when using a memory cartridge 2 that must store character data used in a printer controller, the ID number is stored in the ID registration storage means 4m shown in FIG.
ASCII code: 46h, 51h, 4ch, 54h
), and in case you use memory cartridge 2 as a format memory, use the FORM
AT” (ASCII: 7-do, 48h, 4f'h
, 52h, 4dh, 41h, 54h) are stored as ID numbers in the second area I2 of the ID registration storage means 4m.

これにより、このプリンタ・コントローラでは、上記の
2種類のID番号が登録されたメモリカートリッジ2が
使用できる。なお前記ID登録は、プリンタ本体の電源
をオンしたときのプリンタ・コントローラの初期設定時
に、主制御部1からの、ID登録命令によりおこなう。
As a result, this printer controller can use the memory cartridge 2 in which the above two types of ID numbers are registered. Note that the ID registration is performed by an ID registration command from the main control section 1 at the time of initial setting of the printer controller when the printer main body is turned on.

第13図にID登録・チエツク処理の処理動作を示すフ
ローチャートを参照して説明する。
An explanation will be given with reference to a flowchart shown in FIG. 13 showing the processing operation of ID registration/check processing.

メモリカートリッジ2がカートリッジ・コネクタ9に装
着されている場合1、まずワークRAM4cのID登録
記憶手段4mの第1領域11に第1のID番号が登録さ
れているか判定される(ステップ520)。第1のID
番号が未登録で定義されていない時(N)は、ID確認
記憶手段(CARDIDSTTS)4gがネゲートされ
る(ステップ521)。
When the memory cartridge 2 is attached to the cartridge connector 9, it is first determined whether the first ID number is registered in the first area 11 of the ID registration storage means 4m of the work RAM 4c (step 520). 1st ID
When the number is unregistered and undefined (N), the ID confirmation storage means (CARDIDSTTS) 4g is negated (step 521).

また第11D番号が定義されている時(Y)は前記メモ
リカートリッジ2のメモリ7aの先頭アドレスADに同
じID番号が定義されているか判定する(ステップ52
2)。
Further, when the 11th D number is defined (Y), it is determined whether the same ID number is defined in the start address AD of the memory 7a of the memory cartridge 2 (step 52).
2).

ステップS22で、前記メモリカートリッジ2にID登
録記憶手段4mの第1の領域11と同じID番号が定義
されている時(Y)は、前記ID確認記憶手段(CAR
D I DSTTS)4 gがアサートされる(ステッ
プ823)。
In step S22, when the same ID number as the first area 11 of the ID registration storage means 4m is defined in the memory cartridge 2 (Y), the ID confirmation storage means (CAR
D I DSTTS)4 g is asserted (step 823).

しかし同じID番号が定義されていないとき(N)には
、次にID登録記憶手段4mの第2領域I2にID番号
が登録されているか判定される(ステップ524)。第
2領域I2にID番号が未登録で定義されていない時(
N)は、前記ID確認記憶手段4gがネゲートされる(
ステップ823)。
However, if the same ID number is not defined (N), then it is determined whether the ID number is registered in the second area I2 of the ID registration storage means 4m (step 524). When the ID number is not registered and defined in the second area I2 (
N) means that the ID confirmation storage means 4g is negated (
step 823).

また第2領域■2にID番号が定義されている時(Y)
は、前記メモリカートリッジ2に同じ第2領域I2のI
D番号が定義されているか判定する(ステップ525)
。このステップS25で、前記メモリカートリッジ2に
同じID番号が定義されていると利手された時(Y)は
、前記ID確認記憶手段(CARDIDSTTS)4g
がアサートされる(ステップ823)。
Also, when the ID number is defined in the second area ■2 (Y)
I in the same second area I2 in the memory cartridge 2
Determine whether the D number is defined (step 525)
. In this step S25, when it is determined that the same ID number is defined in the memory cartridge 2 (Y), the ID confirmation storage means (CARDIDSTTS) 4g
is asserted (step 823).

以下同様にして、第3及び第4のID番号も判定される
(ステップS26乃至ステップ529)。
Thereafter, the third and fourth ID numbers are also determined in the same manner (steps S26 to 529).

以上のようなID登録・チエツク処理は、装着したメモ
リカートリッジ2のID番号がID登録記憶手段4mに
予め登録された複数のID番号中の1つに等しければ、
正しいID番号とみなし、前記メモリカートリッジから
リードできるものとしてID確認記憶手段4gをアサー
トする。
The above ID registration/check process is performed if the ID number of the installed memory cartridge 2 is equal to one of the plurality of ID numbers registered in advance in the ID registration storage means 4m.
The ID confirmation storage means 4g assumes that the ID number is correct and that it can be read from the memory cartridge.

この時、正しいID番号であると判定されるためには、
前記メモリカートリッジ2には、先頭アドレスに、ID
登録記憶手段4mに格納しているID@号と同じID番
号の’ FONT’  (asciiコードで、46h
、511+、4eh、54h ) 、又は、 FORM
AT’  (ascii:I−ドで、46h、4rh、
52h、4 dh、41h、54h)を格納していなけ
ればならない。
At this time, in order to determine that the ID number is correct,
The memory cartridge 2 has an ID at the top address.
'FONT' with the same ID number as the ID@ number stored in the registration storage means 4m (46h in ASCII code)
, 511+, 4eh, 54h) or FORM
AT' (ascii: I-do, 46h, 4rh,
52h, 4dh, 41h, 54h) must be stored.

そして、前記メモリカートリッジ2の先頭アドレスに格
納されているID番号が、ID登録記憶手段4mに登録
された複数のID番号中の全ての番号と異なるとき、正
しくないID番号とみなされ、そのメモリカートリッジ
2からリードすることができないものとして扱い、ID
確認記憶手段4gをネゲートする。
When the ID number stored in the first address of the memory cartridge 2 is different from all of the ID numbers among the plurality of ID numbers registered in the ID registration storage means 4m, it is regarded as an incorrect ID number, and the memory It is treated as something that cannot be read from cartridge 2, and the ID
The confirmation storage means 4g is negated.

またID登録・チエツク処理は、前記メモリカートリッ
ジ2のID番号をリードしている時に該メモリカートリ
ッジ2がカートリッジ・コネクタ9から抜かれて挿抜記
憶手段4fがネゲートされた場合、並びに、前記ID確
認記憶手段4gが確定した場合に電源供給判定記憶手段
41をネゲートして前記メモリカートリッジ2への電源
供給を中止する。
Further, the ID registration/check process is performed when the memory cartridge 2 is removed from the cartridge connector 9 while the ID number of the memory cartridge 2 is being read and the insertion/removal storage means 4f is negated, and when the ID confirmation storage means 4g is determined, the power supply determination storage means 41 is negated to stop the power supply to the memory cartridge 2.

このように挿入されたメモリカートリッジ2のID番号
を確認することによって、このプリンタ・コントローラ
に関係の無いメモリカートリッジ2の挿入による誤動作
を防ぐことができ、さらに、複数のID番号を有効にす
ることにより、複数の決められたメモリカートリッジ2
を使用することもできる。
By checking the ID number of the inserted memory cartridge 2 in this way, it is possible to prevent malfunctions due to the insertion of a memory cartridge 2 unrelated to this printer/controller, and furthermore, it is possible to enable multiple ID numbers. A plurality of predetermined memory cartridges 2
You can also use

次にカートリッジ・リード通信処理について、IDM認
記憶手段4gが確定してからの処理を説明する。各部材
に付した参照番号は第1図のものと同様である。この処
理は第9図および第10図を説明したときにすでに概要
を説明しているがもう一度、詳細に説明する。
Next, regarding the cartridge read communication process, the process after the IDM recognition storage means 4g is confirmed will be explained. The reference numbers assigned to each member are the same as those in FIG. This process has already been outlined in the description of FIGS. 9 and 10, but will be explained in detail once again.

MCD制御部4は、カートリッジ・コネクタ9に装着さ
れたメモリカートリッジ2が正しいID番号を持つこと
が確認できたら、主制御部1ヘコマンドを送信するよう
要求するためサービス要求信号出力ポート8をアサート
する。
When the MCD control unit 4 confirms that the memory cartridge 2 attached to the cartridge connector 9 has the correct ID number, it asserts the service request signal output port 8 to request the main control unit 1 to send a command. .

しかし反対に、前記カートリッジ・コネクタ9に装着さ
れたメモリカートリッジ2が正しくないID番号である
ことが確認されたら、他の正しいID番号のメモリカー
トリッジ2に交換されるまで、前記サービス要求信号出
力ポート8は、アサートしない。
However, on the contrary, if it is confirmed that the memory cartridge 2 installed in the cartridge connector 9 has an incorrect ID number, the service request signal output port 8 is not asserted.

そして前記サービス要求信号出力ポート8のアサートを
検知した前記主制御部1は、正しいID番号のメモリカ
ートリッジ2が挿入されたことを確認するためカートリ
ッジ・センス・コマンドを、MCD3に送信する。
The main control unit 1 detecting the assertion of the service request signal output port 8 sends a cartridge sense command to the MCD 3 to confirm that the memory cartridge 2 with the correct ID number has been inserted.

そのカートリッジ・センス・コマンドを受信した前記M
CD3は、前記主制御部1へID確認記憶手段4gの内
容を返送する。
The M that received the cartridge sense command
The CD 3 returns the contents of the ID confirmation storage means 4g to the main control section 1.

前記ID確認記憶手段4gの内容を受信した前記主制御
部1は、前記MCD3に挿入されたメモリカートリッジ
2が正しいID番号であることが確認できたら、前記M
 CD 3にカートリッジ・リード・コマンドを送信す
る。
When the main control unit 1 receives the contents of the ID confirmation storage means 4g, if it is confirmed that the memory cartridge 2 inserted into the MCD 3 has the correct ID number, the main control unit 1
Send cartridge read command to CD 3.

前記カートリッジ・リード・コマンドを受信した前記M
CD3は、電源供給判定記憶手段41をアサートして、
前記メモリカートリッジ2に電源をO(給し、100 
m5ec後に読み書き判定記憶手段4jをアサートして
から、前記メモリカートリッジ2のデータを読みだして
、前記主制御部1へ、送信する。
said M that received said cartridge read command;
The CD3 asserts the power supply determination storage means 41,
Power is supplied to the memory cartridge 2 for 100 seconds.
After m5ec, the read/write determination storage means 4j is asserted, and the data in the memory cartridge 2 is read out and transmitted to the main control section 1.

そして前記主制御部1は、前記メモリカートリッジ2の
データ受信を終了すると前記MCD3にキャンセル・コ
マンドを送信する。
When the main control unit 1 finishes receiving data from the memory cartridge 2, it sends a cancel command to the MCD 3.

前記キャンセル・コマンドを受信した前記MCD3は、
前記メモリカートリッジ2からのデータの読み出しを中
よして、電源供給遠足記憶手段411読み書き判定記憶
手段4jが順次ネゲートされ、メモリカートリッジ2へ
の電源供給が中止される。
The MCD 3 that received the cancel command:
While reading data from the memory cartridge 2, the power supply excursion storage means 411 and read/write determination storage means 4j are sequentially negated, and the power supply to the memory cartridge 2 is stopped.

またメモリカートリッジ2をアクセス中に、前記メモリ
カートリッジ2を抜いた場合には、つまり挿抜記憶手段
4fがネゲートされた時は、電源供給判定記憶手段41
、読み書き判定記憶手段4jが順次ネゲートされメモリ
カートリッジ2への電源供給が即中止される。
Further, when the memory cartridge 2 is removed while the memory cartridge 2 is being accessed, that is, when the insertion/extraction storage means 4f is negated, the power supply determination storage means 41
, the read/write determination storage means 4j are sequentially negated and power supply to the memory cartridge 2 is immediately stopped.

このように、メモリカートリッジ2に対して読み書きす
るときだけ、メモリカートリッジ2に電源を供給するよ
うにしている。
In this way, power is supplied to the memory cartridge 2 only when reading from or writing to the memory cartridge 2.

以上のような構成によると、本発明の電源供給装置は、
コントローラ内部に、メモリカートリッジの挿抜を検知
する手段とその検知に基づいて前記メモリカートリッジ
への電源供給を制御する手段とによって、前記メモリカ
ートリッジの挿抜の完了を検知し、そのメモリカートリ
ッジから情報データを読み書きするときのみに電源を供
給することができる。
According to the above configuration, the power supply device of the present invention includes:
The controller includes means for detecting insertion and removal of a memory cartridge, and means for controlling power supply to the memory cartridge based on the detection, to detect completion of insertion and removal of the memory cartridge, and to read information data from the memory cartridge. Power can be supplied only when reading and writing.

尚、前述の第1の実施例では、タイマを設けて挿抜検知
信号を5 m5ec毎に3個読み込んで記憶していた。
In the first embodiment described above, a timer was provided to read and store three insertion/removal detection signals every 5 m5ec.

しかし前記タイマの代わりに、例えば、挿抜検知信号を
数10個読み込ませて、これにかかる時間をタイマ時間
の代わりとすることも可能である。すなわち、挿抜検知
信号を数10個読み込む間、前記挿抜検知信号が同じ状
態に維持されていなければ、メモリカートリッジが挿入
されたと判定しないように読み込みの計数回数を増やす
However, instead of the timer, for example, it is also possible to read several tens of insertion/removal detection signals and use the time required for this as the timer time. That is, while reading several tens of insertion/extraction detection signals, if the insertion/extraction detection signals are not maintained in the same state, the number of readings is increased so as not to determine that a memory cartridge has been inserted.

そして抜去検知時には3個読み込んで2個が同じ状態な
らメモリカートリッジが抜去されたと判定するようにす
る。従って実質的に検知から判定までの時間を挿入時に
長く、抜去時に短くとることができ、前述の第1の実施
例のようなタイマを用いたのと同様の効果が得られる。
When removal is detected, three values are read and if two are in the same state, it is determined that the memory cartridge has been removed. Therefore, the time from detection to determination can be substantially longer at the time of insertion and shorter at the time of removal, and the same effect as that obtained by using the timer as in the first embodiment described above can be obtained.

また、前述の第1の実施例にはサンプリング時間を5 
m5ecにして挿抜検知信号を取り込んでいたが、挿入
時と抜去時のサンプリング時間の周期を変更して、挿入
時は長く、抜去時は短くして、挿入時の判定を遅延させ
ることからメモリカートリッジの挿抜を検知することも
可能である。
Furthermore, in the first embodiment described above, the sampling time is 5
m5ec was used to capture the insertion/removal detection signal, but by changing the sampling time period at insertion and removal, making it longer at insertion and shorter at removal, the memory cartridge It is also possible to detect the insertion and removal of the

また本発明は、前述した挿抜検知装置の実施例に限定さ
れるものではなく、他にも発明の要旨を逸脱しない範囲
で種々の変形や応用が可能であることは勿論である。
Further, the present invention is not limited to the embodiment of the insertion/removal detection device described above, and it goes without saying that various modifications and applications can be made without departing from the gist of the invention.

[発明の効果] 以上詳述したように本発明によれば、メモリカートリッ
ジをコネクタに挿入させる際、確実に装着されて接続状
態が安定したことを検知して、前記メモリカートリッジ
に電源供給が行われる。
[Effects of the Invention] As detailed above, according to the present invention, when a memory cartridge is inserted into a connector, it is detected that the memory cartridge is securely inserted and the connection state is stable, and power is supplied to the memory cartridge. be exposed.

よって前記メモリカートリッジが格納するデータが破壊
されることを防ぐことができる。
Therefore, data stored in the memory cartridge can be prevented from being destroyed.

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

第1図は本発明の一実施例に係るプリンタ・コントロー
ラの構成を示すブロック図、第2図はメモリカートリッ
ジの構成を示すブロック図、第3図はMCD制御部の構
成を示すブロック図、第4図はワークRAMの構成を示
すブロック図、第5図(a)乃至(d)は格納記憶手段
(CNCTFLAG)の構成を示すブロック図、第6図
はID登録記憶手段(IDNUM)の構成を示すブロッ
ク図、第7図はカートリッジ挿抜検知ポートの構成例を
示すブロック図、第8図はカートリッジ電源供給ポート
12の構成例を示すブロック図、第9図はメモリカート
リッジのリードの動作を示すフローチャート、第10図
は第9図のリード動作に対応するタイミングチャート、
第11図は挿抜検知処理の動作のタイミングチャート、
第12図は電源供給処理の動作のタイムチャート、第1
3図はID登録・チエツク処理の動作を示すフローチャ
ート。 1・・・プリンタコントローラ主制御部、2・・・メモ
リカートリッジ、3・・・メモリカートリッジ・ドライ
バ、4・・・MCD制御部、5・・・アドレス/データ
バス、6・・・前記通信制御ポート、7・・・前記通信
データボート、8・・・サービス要求信号出力ボート、
9・・・カートリッジ・コネクタ、10・・・カートリ
ッジ・データ/アドレスポート、11・・カートリッジ
挿抜検知ボート、12・・・カートリッジ電源供給ポー
ト。 出願人代理人 弁理士 坪井 淳 第 図 第 図 第 図 第 図(a) 第 5図(b) 第5図<c> 第 図(d) 第 7図 第 図 手続ネ山正書く方式) 平成2年8月17日
FIG. 1 is a block diagram showing the configuration of a printer controller according to an embodiment of the present invention, FIG. 2 is a block diagram showing the configuration of a memory cartridge, FIG. 3 is a block diagram showing the configuration of an MCD control section, and FIG. FIG. 4 is a block diagram showing the configuration of the work RAM, FIGS. 5(a) to (d) are block diagrams showing the configuration of the storage storage means (CNCTFLAG), and FIG. 6 is a block diagram showing the configuration of the ID registration storage means (IDNUM). 7 is a block diagram showing an example of the configuration of the cartridge insertion/removal detection port, FIG. 8 is a block diagram showing an example of the configuration of the cartridge power supply port 12, and FIG. 9 is a flowchart showing the operation of reading the memory cartridge. , FIG. 10 is a timing chart corresponding to the read operation in FIG. 9,
FIG. 11 is a timing chart of the operation of insertion/removal detection processing;
Figure 12 is a time chart of the operation of power supply processing,
FIG. 3 is a flowchart showing the operation of ID registration/check processing. DESCRIPTION OF SYMBOLS 1...Printer controller main control unit, 2...Memory cartridge, 3...Memory cartridge driver, 4...MCD control unit, 5...Address/data bus, 6...Said communication control Port, 7... Said communication data boat, 8... Service request signal output port,
9...Cartridge connector, 10...Cartridge data/address port, 11...Cartridge insertion/removal detection board, 12...Cartridge power supply port. Applicant's representative Patent attorney Atsushi Tsuboi Figure (a) Figure 5 (b) Figure 5 <c> Figure (d) Figure 7 (Procedure Neyama correct writing method) Figure 7 (1990) August 17th

Claims (2)

【特許請求の範囲】[Claims] (1)種々の制御情報を格納したメモリカートリッジと
、 前記メモリカートリッジがコネクタに挿抜されたことを
検知する挿抜検知手段と、 前記挿抜検知手段からの挿抜検知信号を読み込む制御手
段と、 前記挿抜検知手段が瞬時的なノイズを除去し得る所定長
の第1フィルタリング時間を持って前記メモリカートリ
ッジ挿入を検知し、且つ前記第1フィルタリング時間よ
り短時間の第2フィルタリング時間を持って前記メモリ
カートリッジの抜去検知を行うことを特徴とするメモリ
カートリッジの挿抜検知装置。
(1) a memory cartridge storing various control information; an insertion/removal detection means for detecting whether the memory cartridge is inserted into or removed from a connector; a control means for reading an insertion/removal detection signal from the insertion/removal detection means; and an insertion/removal detection means. means detects the insertion of the memory cartridge with a first filtering time of a predetermined length capable of removing instantaneous noise, and removes the memory cartridge with a second filtering time shorter than the first filtering time. A memory cartridge insertion/removal detection device characterized by detecting the insertion/removal of a memory cartridge.
(2)メモリカートリッジとコネクタとの接触状態に応
じて接触検知信号を発生する接触検知手段と、 前記接触検知手段からの接触検知信号を所定周期でサン
プリングし、2値化情報として順次記憶するサンプリン
グ手段と、 前記2値化情報を複数個参照して前記メモリカートリッ
ジの挿抜を判定する挿抜判定手段と、前記挿抜判定手段
によりが前記メモリカートリッジの挿入判定が成された
ときに起動し、且つ抜去判定が成されたときにリセット
される計数手段と、 前記計数手段により所定計数のカウントが成されたとき
に前記メモリカートリッジに電源を供給し、且つ前記挿
抜判定手段により前記メモリカートリッジの抜去判定が
成されたときに前記電源の供給を停止する電源供給制御
手段とを具備することを特徴とするメモリカートリッジ
の挿抜検知装置。
(2) Contact detection means that generates a contact detection signal according to the contact state between the memory cartridge and the connector, and sampling that samples the contact detection signal from the contact detection means at a predetermined period and sequentially stores it as binary information. means, an insertion/removal determining means for determining insertion/removal of the memory cartridge by referring to a plurality of pieces of the binary information, and the insertion/removal determining means is activated when the insertion/removal determination of the memory cartridge is made; a counting means that is reset when the determination is made; power is supplied to the memory cartridge when the counting means counts a predetermined number; and the insertion/removal determining means determines whether or not the memory cartridge is removed. 1. A memory cartridge insertion/removal detection device, comprising: power supply control means for stopping the supply of power when the insertion/removal of the memory cartridge is completed.
JP2113245A 1990-04-27 1990-04-27 Device for detecting load/unload of memory cartridge Pending JPH0410091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2113245A JPH0410091A (en) 1990-04-27 1990-04-27 Device for detecting load/unload of memory cartridge

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2113245A JPH0410091A (en) 1990-04-27 1990-04-27 Device for detecting load/unload of memory cartridge

Publications (1)

Publication Number Publication Date
JPH0410091A true JPH0410091A (en) 1992-01-14

Family

ID=14607253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2113245A Pending JPH0410091A (en) 1990-04-27 1990-04-27 Device for detecting load/unload of memory cartridge

Country Status (1)

Country Link
JP (1) JPH0410091A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318836A (en) * 2003-03-31 2004-11-11 Ricoh Co Ltd Device and method for controlling pc card
JP2007164515A (en) * 2005-12-14 2007-06-28 Seiko Epson Corp Electric power supply method to memory card, and printing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318836A (en) * 2003-03-31 2004-11-11 Ricoh Co Ltd Device and method for controlling pc card
JP4526837B2 (en) * 2003-03-31 2010-08-18 株式会社リコー Card recognition system
JP2007164515A (en) * 2005-12-14 2007-06-28 Seiko Epson Corp Electric power supply method to memory card, and printing device

Similar Documents

Publication Publication Date Title
JP5621496B2 (en) Storage device, circuit board, liquid container and system
JP2006209643A (en) Interface circuit and system device using the same
WO2001091046A1 (en) Ic card
EP1615164B1 (en) IC card with self-diagnostic function
JP2745669B2 (en) Printer
JPH0410091A (en) Device for detecting load/unload of memory cartridge
US5979759A (en) IC card reader/writer and its control method
JPH0410016A (en) Power supply device
JPS6227841A (en) Method and apparatus for preventing errors caused by insertion or removal of cartridge
JP2000276258A (en) Device and method for inserting/ejecting ide device
EP1524595B1 (en) Removable media device, host device, program and recording medium thereof
US6957289B2 (en) Bus system having improved control process
JP2001117779A (en) Electronic instrument and program rewriting method
JP2005284805A (en) Small memory card adapter and information apparatus
JP4681096B2 (en) Storage device
JP2738435B2 (en) Print data processing device
JPS63136385A (en) Recorder
JP2000123126A (en) Handy terminal with ic card reader/writer
JP3634417B2 (en) IC card
JP3667815B2 (en) Combustor control device
JPS63279344A (en) Detecting device for connection of memory unit
JP2000168200A (en) Printer, method for giving information of operation history thereof and recording medium
JPS635767B2 (en)
JP2878293B2 (en) Printer extended font supply device
JPS61123555A (en) Printer-controlling system