JPH0550787B2 - - Google Patents

Info

Publication number
JPH0550787B2
JPH0550787B2 JP61044329A JP4432986A JPH0550787B2 JP H0550787 B2 JPH0550787 B2 JP H0550787B2 JP 61044329 A JP61044329 A JP 61044329A JP 4432986 A JP4432986 A JP 4432986A JP H0550787 B2 JPH0550787 B2 JP H0550787B2
Authority
JP
Japan
Prior art keywords
data
area
count
prom
totlcnt
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.)
Expired - Fee Related
Application number
JP61044329A
Other languages
Japanese (ja)
Other versions
JPS62202293A (en
Inventor
Shizuo Tsucha
Toshio Nagasaka
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.)
Casio Computer Co Ltd
Casio Electronics Manufacturing Co Ltd
Original Assignee
Casio Computer Co Ltd
Casio Electronics Manufacturing 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 Casio Computer Co Ltd, Casio Electronics Manufacturing Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP61044329A priority Critical patent/JPS62202293A/en
Publication of JPS62202293A publication Critical patent/JPS62202293A/en
Publication of JPH0550787B2 publication Critical patent/JPH0550787B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、数値を計数するカウンタ装置、特に
電子写真複写機、ページプリンタのプリント枚数
の計数に好適なカウンタ装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a counter device for counting numerical values, and particularly to a counter device suitable for counting the number of prints of an electrophotographic copying machine or a page printer.

〔従来技術〕[Prior art]

従来、この種の装置としては、電磁カウンタと
カムを組合せたメカカウンタが使用されていた
が、最近ではマイクロコンピユータ制御の電子カ
ウンタが普及している。このカウンタは計数値の
記憶手段としてCMOSのRAM(ランダムアクセ
スメモリ)、あるいはCMOSのCPU(中央処理装
置)に内蔵されたRAMを用い、且つこのRAM
は電源遮断時にデータが消失するため、リチウム
電池等によりバツクアツプされる。そして、この
カウンタは発光ダイオードからなる7セグメント
の表示器を使用できるため、表示品質が良く、ま
た他の装置とデータの授受もできる利点を有す
る。
Conventionally, as this type of device, a mechanical counter that is a combination of an electromagnetic counter and a cam has been used, but recently, microcomputer-controlled electronic counters have become popular. This counter uses CMOS RAM (Random Access Memory) or RAM built into CMOS CPU (Central Processing Unit) as a means of storing count values, and this RAM
Data is lost when the power is cut off, so it is backed up using a lithium battery or the like. Since this counter can use a 7-segment display made of light emitting diodes, it has the advantage of good display quality and the ability to exchange data with other devices.

〔従来技術の問題点〕[Problems with conventional technology]

しかしながら、前述のカウンタは次の欠点があ
つた。
However, the above-mentioned counter had the following drawbacks.

(1) 電源の遮断時に、RAMへのアクセスを禁止
したり、RAM内蔵のCPUではCPUを動作可能
なスタンバイ状態からRAMのみがバツクアツ
プされたスリープ状態にするため、電源にシー
ケンスが必要である。即ち、電源遮断時に、バ
ツクアツプ電源に移行する際、RAMのデータ
の退避処理を行う時間を必要とする。具体的に
は主電源の電圧を監視し、主電源が完全に遮断
する前にRAMのデータの退避処理を行うこと
である。そのため、装置の構成が複雑となり、
コストも高価となる。
(1) When the power is turned off, a sequence is required for the power supply to prohibit access to RAM, or for CPUs with built-in RAM to change the CPU from an operational standby state to a sleep state in which only the RAM is backed up. That is, when switching to a backup power source when the power is cut off, time is required to save data in the RAM. Specifically, it monitors the voltage of the main power supply and saves data in RAM before the main power supply is completely shut off. Therefore, the configuration of the device becomes complicated,
The cost is also high.

(2) バツクアツプ用の電池を必要とし、しかも電
池には寿命があるため、定期的に交換しなけれ
ばならない。また電池を交換しなかつたり、あ
るいは主電源の遮断時に電池をシヨートした
り、装置から取外すと、RAMのデータが消失
することになる。
(2) It requires a backup battery, and since the battery has a limited lifespan, it must be replaced periodically. Furthermore, if the battery is not replaced, or if the battery is shunted or removed from the device when the main power is turned off, the data in the RAM will be lost.

(3) RAMを搭載した基板が故障し、その基板を
交換する事態が生じた場合、RAMに記憶され
たデータを読出すことが困難である。そのた
め、RAMに記憶されたデータが不明となり、
例えば電子写真複写機のプリント枚数をRAM
が記憶していたとすれば、基板交換までのプリ
ント枚数が不明となり、装置の寿命管理に支障
をきたす。
(3) If the board on which the RAM is mounted breaks down and the board needs to be replaced, it is difficult to read the data stored in the RAM. Therefore, the data stored in RAM becomes unknown.
For example, the number of prints on an electrophotographic copying machine can be stored in RAM.
If it is remembered, the number of prints until the board is replaced will be unknown, which will hinder the lifespan management of the device.

〔発明の目的〕[Purpose of the invention]

本発明は上記欠点に鑑み、バツクアツプ用の電
池を不要にできると共に、装置の構成も簡単にで
き、更にいかなる事態においてもデータの消失が
ないカウンタ装置を提供することを目的とする。
SUMMARY OF THE INVENTION In view of the above drawbacks, it is an object of the present invention to provide a counter device that can eliminate the need for backup batteries, has a simple device configuration, and does not cause data loss under any circumstances.

〔発明の要点〕[Key points of the invention]

上記目的は本発明によれば、カウントデータを
記憶する複数の領域を備えた不揮発性記憶手段
と、該不揮発性記憶手段の前記カウントデータが
最後に書込まれた領域から現在のカウントデータ
を読み出す読み出し手段と、カウント要求に応じ
て前記現在のカウントデータに対して演算処理を
行なう演算処理手段と、該演算処理手段の処理に
より新たなカウントデータが生成される毎に該新
たなカウントデータを前記記憶手段の前記現在の
カウントデータが読み出された領域とは異なる領
域へ書込む書込み手段とを備えることを特徴とす
るカウンタ装置を提供することにより達成され
る。
The above object, according to the present invention, includes a non-volatile storage means having a plurality of areas for storing count data, and reading current count data from an area of the non-volatile storage means in which the count data was last written. reading means; arithmetic processing means for performing arithmetic processing on the current count data in response to a count request; and each time new count data is generated by the processing of the arithmetic processing means, the new count data is This is achieved by providing a counter device characterized in that it includes writing means for writing into an area of the storage means different from the area from which the current count data was read.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を図面を参照して詳細に
説明する。第1図は本発明のカウンタ装置の一実
施例を示すブロツク図である。なお、本実施例は
電子写真複写機に使用されるカウンタ装置を例に
とつて説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing one embodiment of the counter device of the present invention. Note that this embodiment will be explained using a counter device used in an electrophotographic copying machine as an example.

第1図において、1はCPU(中央処理装置)で
あり、ROM(リードオンリメモリ)2に格納さ
れた制御プログラムに従つて電子写真複写機の動
作を制御する。3はRAM(ランダムアクセスメ
モリ)、4はEE−PROM(エレクトリカリ−イレ
−サブレ−プログラマブルリードオンリーメモ
リ)であり、電気的にデータの消去、書込みがで
きる機能を有し、後述するようにRAM3、EE−
PROM4とCPU1でデータバス5を通してデー
タの授受を行うことにより、電子写真複写機のプ
リント枚数を計数するカウンタ装置を構成する。
CPU1は、内部にプログラムカウンタPC、スタ
ツクS、レジスタA、レジスタB、レジスタX、
フラグF、演算論理ユニツトALUを有し、前述
の如くプリント枚数の計数等の電子写真複写機の
制御を行う。
In FIG. 1, a CPU (central processing unit) 1 controls the operation of the electrophotographic copying machine according to a control program stored in a ROM (read only memory) 2. In FIG. 3 is a RAM (Random Access Memory), and 4 is an EE-PROM (Electrically Erasable Programmable Read Only Memory), which has the function of electrically erasing and writing data. , EE−
By exchanging data between the PROM 4 and the CPU 1 through the data bus 5, a counter device for counting the number of prints of an electrophotographic copying machine is constructed.
CPU1 has internal program counter PC, stack S, register A, register B, register X,
It has a flag F and an arithmetic logic unit ALU, and controls the electrophotographic copying machine such as counting the number of prints as described above.

また、6はアドレスデコーダであつて、アドレ
スバス7を通して出力ラツチ8,9及び入力バツ
フア10,11に接続される。出力ラツチ8の出
力信号は、発光ダイオードを用いた7セグメント
の表示器12に入力され、後述するようにCPU
1の指令に従つてプリント枚数を表示する。出力
ラツチ9の出力は、負荷12、即ち電子写真プロ
セスを実行する感光体の駆動装置、現像器等の各
部品に出力される。また入力バツフア10,11
には、各種のセンサ14、操作パネル上のキーボ
ードからなる入力部15からセンサ出力及びプリ
ント枚数が入力される。CPU1は、この入力に
基づき設定枚数のプリントを行うように制御する
と共に、センサ出力により動作条件を制御する。
Further, 6 is an address decoder, which is connected to output latches 8 and 9 and input buffers 10 and 11 through an address bus 7. The output signal of the output latch 8 is input to a 7-segment display 12 using light emitting diodes, and is input to the CPU as described below.
Display the number of prints according to command 1. The output of the output latch 9 is outputted to a load 12, that is, each component such as a photoreceptor drive device, a developing device, etc., which performs an electrophotographic process. In addition, input buffers 10 and 11
The sensor output and the number of prints are inputted from an input section 15 consisting of various sensors 14 and a keyboard on an operation panel. The CPU 1 controls the printing of a set number of sheets based on this input, and also controls the operating conditions based on the sensor output.

第2図はCPU1のアドレスマツプを示したも
ので、RAM3はアドレス0000〜0800に、EE−
PROM4はアドレス4000〜4800に位置している。
またI/Oはアドレス8000〜8020に、ROM2は
アドレスC000〜FFFFに位置し、その他のアドレ
スは未使用である。
Figure 2 shows the address map of CPU1, RAM3 is located at addresses 0000-0800, EE-
PROM4 is located at addresses 4000-4800.
Further, I/O is located at addresses 8000 to 8020, ROM2 is located at addresses C000 to FFFF, and other addresses are unused.

第3図はEE−PROM4のアドレスマツプを示
したものである。図示の如くEE−PROM4は、
エリア1〜エリア256に区分され、その1単位の
エリアにはTOTLCNT,DRMCNT,LIFCNT,
DRALCNT,CNTCTWとして示すデータ記憶
エリアを有する。TOTLCNT(トータルカウン
タ)は、電子写真複写機の全体のプリント枚数を
記憶するもので、3バイトからなる。DRMCNT
(ドラムカウンタ)は1つの感光体でのプリント
枚数を記憶するもので、2バイトからなる。電子
写真複写機は、感光体が寿命があるため、ドラム
セツトとして複写機本体に着脱自在に構成され、
感光体が寿命に達すると交換される。従つて、
DRMCNTにドラムセツトのプリント枚数を記憶
させて寿命管理を行う。LIFCNT(ライフカウン
タ)はメンテナンス時期を管理する為のフラグを
格納するために用い、1バイトである。
DRALCNT(ドラムアラームカウンタ)は、前述
のドラムセツトが寿命に達する前に予告を行うの
に用いるもので、1バイトである。CNTCTW
は、詳しくは後述するが、用紙の大きさによつて
カウント方法を変えるために用いるものである
(1バイト)。このようにEE−PROM4は、8バ
イト容量からなる1単位エリアにTOTLCNT等
の5種のデータの記憶エリアを有するが、EE−
PROM4の書き替え回数は現在のところ1万回
程度が限度である。これに対して、本実施例の電
子写真複写機の耐用プリント枚数は30万枚である
が1プリント動作毎にカウントデータをEE−
PROMに書き替えていつた場合30万回の書き替
え回数が必要である。そこで、EE−PROM4の
全記憶エリアを256エリアに区分し、1回のプリ
ント動作毎に順次この記憶エリアをシフトするこ
とで、全体で256万回の書き替え、即ち256万枚ま
で計数可能とした。
FIG. 3 shows the address map of the EE-PROM 4. As shown in the figure, EE-PROM4 is
It is divided into Area 1 to Area 256, and each area includes TOTLCNT, DRMCNT, LIFCNT,
It has data storage areas shown as DRALCNT and CNTCTW. TOTLCNT (total counter) stores the total number of copies printed by the electrophotographic copying machine and consists of 3 bytes. DRMCNT
(Drum counter) stores the number of prints on one photoreceptor and consists of 2 bytes. Since the photoreceptor in an electrophotographic copying machine has a limited lifespan, it is configured as a drum set that can be attached to and detached from the copying machine body.
When the photoreceptor reaches the end of its life, it is replaced. Therefore,
The number of prints of a drum set is stored in DRMCNT to manage its lifespan. LIFCNT (life counter) is used to store a flag for managing maintenance timing, and is 1 byte.
DRALCNT (drum alarm counter) is used to give advance notice before the aforementioned drum set reaches the end of its life, and is 1 byte. CNTCTW
will be described in detail later, but is used to change the counting method depending on the paper size (1 byte). In this way, the EE-PROM4 has a storage area for five types of data such as TOTLCNT in one unit area of 8-byte capacity.
Currently, the number of times PROM4 can be rewritten is limited to about 10,000 times. On the other hand, although the electrophotographic copying machine of this embodiment has a lifespan of 300,000 prints, the count data is
If it is rewritten to PROM, it will need to be rewritten 300,000 times. Therefore, by dividing the entire storage area of EE-PROM4 into 256 areas and shifting this storage area sequentially for each printing operation, it is possible to rewrite the entire 2.56 million times, that is, to count up to 2.56 million sheets. did.

第4図はRAM3のアドレスマツプを示したも
のである。RAM3は、同図の如く、
ADDRMEM(アドレスメモリ)、AREACNT(エ
リアカウンタ)、EEPCTW(EE−PROMのカウ
ントライト)として示すエリアを有し、これらは
後述するように、電子写真複写機のプリント枚数
を計数する際に、一時的な記憶手段として補助的
に使用される。またTMPREG(テンポラリーレ
ジスタ)1〜5も同様であり、更にTOTLCNT,
DRMCNT,LIFCNT,DRALCNT,
CNTCTWは、前述のEE−PROM4の同一記号
を付したデータに対応し、実際のカウンタ動作は
このカウンタエリアを用いて行われる。
FIG. 4 shows the address map of RAM3. RAM3 is as shown in the figure.
It has areas shown as ADDRMEM (address memory), AREACNT (area counter), and EEPCTW (EE-PROM count write). It is used as an auxiliary storage means. The same applies to TMPREG (temporary registers) 1 to 5, and TOTLCNT,
DRMCNT, LIFCNT, DRALCNT,
CNTCTW corresponds to data with the same symbol in the EE-PROM 4 described above, and the actual counter operation is performed using this counter area.

次に電源投入時のEE−PROM4内に格納され
た前回までのカウントデータをRAM3のカウン
タエリアに読み出す為のCPU1の動作を第5図
に示すフローチヤートを参照しながら説明する。
なお、第5図はカウンタの初期設定動作を示した
ものでEE−PROM4に記憶された現在カウント
値を検索する作業(ST1〜ST3)、検索したEE
−PROM4のエリアの各データをRAM3に転送
する作業(ST10〜ST12)、カウントアツプ
した次の新データを書込むEE−PROM4のアド
レスをセツトする作業(ST8〜ST9)からな
る。
Next, the operation of the CPU 1 for reading out the previous count data stored in the EE-PROM 4 to the counter area of the RAM 3 when the power is turned on will be explained with reference to the flowchart shown in FIG.
In addition, Figure 5 shows the initial setting operation of the counter, including the work of searching for the current count value stored in the EE-PROM4 (ST1 to ST3), and the operation of searching the retrieved EE
- It consists of the work of transferring each data in the area of the PROM 4 to the RAM 3 (ST10-ST12), and the work of setting the address of the EE-PROM4 to write the next new data that has been counted up (ST8-ST9).

詳述すると、まずAREACHKで初期設定を行
い、ST1でEE−PROM4のトツプアドレスを
RAM3のADDRMEM及びCPU1のレジスタX
に書込み、次いでEE−PROM4の全エリア数か
ら1引いた値(すなわち255)をRAM3の
AREACNTに書込む。次にST2のCNTREAD
でEE−PROM4のトツプアドレスの
TOTLCNTデータ(エリア1)を読込む。この
後、ST3で次のエリア2のTOTLCNTのデータ
をCPU1のAレジスタに読出し、このデータと、
前記ST2のデータ(エリア1のTOTLCNTデー
タ)とを比較する。このときエリア1の
TOTLCNTデータが大きければ、エリア1のデ
ータを現在のカウント値と判断し、FOUND(ST
9)に進む。一方、エリア2のTOTLCNTデー
タが大きければ、そのエリア2のTOTLCNTデ
ータと次のエリア3のTOTLCNTデータを比較
する作業を行う。ST2〜ST7はループとなつて
おり、エリア2と3のデータを比較し、エリア3
のデータが大きければ、更にエリア3と4のデー
タを比較する。このようにエリアnとエリアn+
1のTOTLCNTデータの比較をエリアnの
TOTLCNTデータが大きくなるまで繰り返し行
い、EE−PROM4に記憶されたプリントデータ
枚数の現在値(最大値)を検索する。具体的に
は、ST5でAREACNTの値ら1を減算し、ST
6でその値が0か否かを判定し、AREACNTの
値が0でなければ、ST7でアドレス用レジスタ
Xの内容をADDRMEMに書込み、ST2に戻る
という手法を用いている。この処理をくり返した
結果AREACNT値が0となつた時は、ST8で
EE−PROM4のトツプアドレスをADDRMEM
に書込み、且つ全エリア数から1を減算した値を
AREACNTに書込む。この場合は次に書込むべ
きエリアはエリア1となりST10に進む。
To explain in detail, first make the initial settings with AREAHK, and set the top address of EE-PROM4 with ST1.
ADDRMEM of RAM3 and register X of CPU1
Then write the value of EE-PROM4 minus 1 from the total number of areas (i.e. 255) to RAM3.
Write to AREACNT. Next, ST2's CNTREAD
The top address of EE-PROM4 is
Read TOTLCNT data (area 1). After this, in ST3, the data of TOTLCNT in the next area 2 is read to the A register of CPU1, and this data and
The ST2 data (TOTLCNT data of area 1) is compared. At this time, area 1
If the TOTLCNT data is large, the data in area 1 is determined to be the current count value, and FOUND (ST
Proceed to 9). On the other hand, if the TOTLCNT data in area 2 is large, the TOTLCNT data in area 2 is compared with the TOTLCNT data in the next area 3. ST2 to ST7 are a loop, comparing the data of areas 2 and 3, and
If the data in areas 3 and 4 are larger, the data in areas 3 and 4 are further compared. In this way, area n and area n+
Comparison of TOTLCNT data in area n
This process is repeated until the TOTLCNT data becomes large, and the current value (maximum value) of the number of print data sheets stored in the EE-PROM 4 is retrieved. Specifically, in ST5, 1 is subtracted from the value of AREACNT, and ST
6, it is determined whether the value of AREACNT is 0, and if the value of AREACNT is not 0, the contents of the address register X are written to ADDRMEM in ST7, and the process returns to ST2. If the AREACNT value becomes 0 as a result of repeating this process, in ST8
ADDRMEM the top address of EE-PROM4
and subtract 1 from the total number of areas.
Write to AREACNT. In this case, the next area to be written is area 1, and the process advances to ST10.

つまり、エリアnとn+1のTOTLCNTデー
タを順次比較して行つて、最終的にエリア255と
最終エリア256を比較してエリア256の
TOTLCNTデータの方が大きいときは、エリア
256の値が現在値となる。
In other words, the TOTLCNT data of areas n and n+1 are compared sequentially, and finally area 255 and the final area 256 are compared and area 256 is
If the TOTLCNT data is larger, the area
The value of 256 is the current value.

一方、ST4でYの場合、ST9に進むが、ここ
ではADDRMEMの内容をCPU1のSTACKへセ
ーブ、現在のアドレス用レジスタXの値を
ADDRMEMに書込む、STACKの内容をアドレ
ス用レジスタXに復帰させる等の処理を行い、次
に書込むべきEE−PROM4のアドレスの用意を
する。アドレスnが現在値であつた場合には、エ
リアn+1がこのアドレスとなる。このようにし
て検索されたプリント枚数の現在値は、ST10
〜12でRAM3のカウンタエリアに転送され
る。即ち、ST10でアドレス用レジスタXの値
(すなわち現在プリント枚数が納められたEE−
PROM4のアドレス)をTMPREG1,2へスト
ア、RAM3のTOTLCNTの番地をTMPREG
3,4にストア、移動バイト数“8”をBレジス
タにセツトして転送の為の準備を行い、次のST
11に進む。ST11では、TMPREG1,2の
内容でアドレスされるEE−PROM4の内容をA
レジスタにロード、このAレジスタの内容を
RAM3のTMPREG3,4でアドレスされる番
地にストア、TMPREG1,2の内容及び
TMPREG3,4の内容にそれぞれ1を加算、B
レジスタの内容から1を減算する処理を行う。こ
の後ST12でBレジスタが0か否かを判定し、
0であれば終了、0でなければST11に戻り、
0になるまで繰り返す。このようにして、EE−
PROM4の現在値記憶エリアにある
TOTLCNT,DRMCNT,LIFCNT,
DRALCNT,CNTCTWのデータはそれぞれ
RAM3の同一記号が付されたカウンタエリアに
転送され、電子写真複写機の電源投入時のプリン
ト枚数の計数待機状態となる。
On the other hand, if the answer is Y in ST4, proceed to ST9. Here, the contents of ADDRMEM are saved to the STACK of CPU1, and the value of the current address register X is saved.
It performs processing such as writing to ADDRMEM and restoring the contents of STACK to address register X, and prepares the address of the EE-PROM 4 to be written next. If address n is the current value, area n+1 becomes this address. The current value of the number of prints retrieved in this way is ST10
~12, it is transferred to the counter area of RAM3. That is, in ST10, the value of address register
Store PROM4 address) to TMPREG1, 2, store TOTLCNT address of RAM3 to TMPREG
Store in 3 and 4, set the number of bytes to be moved to “8” in the B register, prepare for transfer, and start the next ST.
Proceed to step 11. In ST11, the contents of EE-PROM4 addressed by the contents of TMPREG1 and 2 are
Load register, contents of this A register
Store the contents of TMPREG1, 2 and the address addressed by TMPREG3 and 4 of RAM3.
Add 1 to the contents of TMPREG3 and 4, B
Performs processing to subtract 1 from the contents of the register. After this, in ST12, it is determined whether the B register is 0 or not,
If it is 0, end, if it is not 0, return to ST11,
Repeat until it reaches 0. In this way, EE−
in the current value storage area of PROM4.
TOTLCNT, DRMCNT, LIFCNT,
The data of DRALCNT and CNTCTW are respectively
It is transferred to the counter area with the same symbol in RAM 3, and enters a standby state for counting the number of prints when the electrophotographic copying machine is powered on.

第6図はRAM3のカウンタエリアに格納され
たデータをプリント動作に応じて書き替えるカウ
ントアツプ動作を示すフローチヤートである。以
下、同図を参照しながら動作を説明する。
FIG. 6 is a flowchart showing a count-up operation for rewriting data stored in the counter area of the RAM 3 in accordance with a print operation. The operation will be described below with reference to the same figure.

1枚のプリント動作が終了すると、不図示の制
御ルーチンにより、RAM3内にカウント要求フ
ラグFcがセツトされる。この後第6図に示すデ
ータカウントルーチンDTCNTが実行される。ま
ずST1でカウント要求フラグFcがセツトされて
いるか否かを確認し、セツトされていればST2
でそのフラグFcをもとに戻すために0クリアす
る。次にST3でRAM3内のDRMCNTデータを
+1インクリメントし、またST4でTOTLCNT
データを+1インクリメントし、更にST5で
DRALCNTデータが0か否かを確認する。
DRALCNTは、前述の如くドラムセツトが交換
時期に達したときに警告するためのものであつ
て、例えばドラムセツトの寿命が8000枚枚であつ
た場合、DRMCNTデータが7900枚を越えると、
DRALCNTがカウントを開始し、そのカウント
値が100枚に達すると警告アラームを発生するよ
うになつている。DRALCNTは初期状態では0
であるため、ST5がYとなりST7に進む。ST
7では前述の如くDRMCNTのカウント値が7900
枚を越えているか否かを確認し、越えていなけれ
ばST9に進む。また7900枚を越えていれば、
DRALCNTに初期値(アラームフラグビツト−
100の値)をセツトし、これによつて以後ST5を
処理するときにST5がNとなり、ST6で
DRALCNTのデータが+1づつインクリメント
されることになる。DRALCNTがカウントアツ
プして100カウントすると、DRALCNTのアラー
ムフラグビツトに1がセツトされ、このフラグを
別ルーチンで確認することにより、ドラムセツト
交換の警告を発生することができる。また
DRALCNTの内容が0でない場合は、
DRMCNTが7900カウントを越えたことになるた
め、DRALCNTを確認することにより、ドラム
セツトの寿命に近づいたことを予告することがで
きる。
When one print operation is completed, a count request flag Fc is set in the RAM 3 by a control routine (not shown). Thereafter, a data count routine DTCNT shown in FIG. 6 is executed. First, it is checked in ST1 whether the count request flag Fc is set, and if it is set, it is checked in ST1.
Clear the flag Fc to 0 to return it to its original value. Next, in ST3, DRMCNT data in RAM3 is incremented by +1, and in ST4, TOTLCNT
Increment the data by +1 and then in ST5
Check whether DRALCNT data is 0.
As mentioned above, DRALCNT is used to warn when the drum set is due for replacement. For example, if the lifespan of the drum set is 8000 sheets, if the DRMCNT data exceeds 7900 sheets,
DRALCNT starts counting, and when the count reaches 100 sheets, a warning alarm is generated. DRALCNT is initially 0
Therefore, ST5 becomes Y and the process proceeds to ST7. ST
7, the count value of DRMCNT is 7900 as mentioned above.
Check whether the total number of cards has been exceeded, and if not, proceed to ST9. Also, if it exceeds 7900 sheets,
Initial value (alarm flag bit) is set to DRALCNT.
100), so that when ST5 is processed from now on, ST5 becomes N, and ST6 becomes N.
The data of DRALCNT will be incremented by +1. When DRALCNT counts up to 100, the alarm flag bit of DRALCNT is set to 1, and by checking this flag in a separate routine, a warning to replace the drum set can be issued. Also
If the contents of DRALCNT are not 0,
Since DRMCNT has exceeded 7900 counts, by checking DRALCNT, you can predict that the drum set is nearing the end of its life.

ST9では、TOTLCNTデータが所定のメンテ
ナンス時期枚数を越えたか否かを確認する(例え
ば6万カウント)。所定枚数を越えていれば、
RAM3内のCNTCTWデータ内にある
MAINTRQフラグ(メンテナンスリクエストフ
ラグ)をセツトし、このフラグを確認することで
保守点検が必要であることを示す表示を行うこと
ができる。次にST11では、CNTCTW内の
CNTMOREフラグにフラグがセツトされている
か否かを確認する。
In ST9, it is checked whether the TOTLCNT data exceeds a predetermined maintenance period number of sheets (for example, 60,000 counts). If the number exceeds the specified number,
Located in CNTCTW data in RAM3
By setting the MAINTRQ flag (maintenance request flag) and checking this flag, it is possible to display that maintenance inspection is required. Next, in ST11, in CNTCTW
Check whether the flag is set in the CNTMORE flag.

CNTCTW内には、前述のMAINTRQフラグ、
B4サイズ等の大サイズの用紙をカウントする場
合に1,2,1,2カウントさせて全体的には1
枚当り1.5カウントさせるためのCNTMOREフラ
グ、そのB4サイズのプリント動作が奇数番目か
偶数番目かを区別するためのB4WCTFフラグの
3つのフラグを備えている。B4サイズ等の大サ
イズの用紙にプリントを行う場合、他のB5,A4
等の小サイズの用紙にプリントするときに比較し
て、感光体の使用範囲も変わることになる。感光
体の使用範囲が変わると、ドラムセツトの寿命が
変わるため、用紙の大きさに応じてカウントも増
す構成である。具体的にはB4サイズの用紙をプ
リントする場合にカウントを50%増して1.5カウ
ントとし、他の小サイズは1カウントとするもの
である。この場合、用紙長さあるいは用紙面積の
比率から1プリント動作毎に1.5カウントしても
よいが、演算処理が複雑となるので、B4サイズ
だけ1プリントおきに2カウントする構成であ
る。従つて、1,2,1,2というように交互に
1カウントと2カウントを繰り返し行い、全体的
には1プリント当り1.5カウントするものである。
また、CNTCTW内のB4WCTFフラグは、前述
のごとくB4プリントの場合の奇数枚目と偶数枚
目を区別するためのフラグであるが、このフラグ
は1プリント毎に0,1,0,1と変化し、0の
ときはTOTLCNT及びDRMCNTは1インクリ
メント、1のとき2インクリメントすることで、
前述の1カウントと2カウントを交互に行わせる
ものである。なお、このB4WCTFフラグはB4サ
イズのプリントのときだけ変化し、他の小サイズ
の用紙のプリント時はは変化せず、あくまでB4
プリント時のみ変則カウントが行われる。
Within CNTCTW, the MAINTRQ flag mentioned above,
When counting large size paper such as B4 size, count 1, 2, 1, 2, and the overall count is 1.
It is equipped with three flags: the CNTMORE flag for counting 1.5 per sheet, and the B4WCTF flag for distinguishing whether the B4 size printing operation is an odd number or an even number. When printing on large size paper such as B4 size, use other B5, A4
The usage range of the photoreceptor will also change compared to when printing on small size paper such as . Since the lifespan of the drum set changes as the usage range of the photoreceptor changes, the count increases according to the size of the paper. Specifically, when printing on B4 size paper, the count is increased by 50% to 1.5 counts, and for other small sizes it is 1 count. In this case, it is possible to count 1.5 for each print operation based on the paper length or paper area ratio, but since the calculation process becomes complicated, the configuration is such that only B4 size is counted by 2 for every other print. Therefore, 1 count and 2 count are repeated alternately like 1, 2, 1, 2, and the total is 1.5 counts per print.
Also, as mentioned above, the B4WCTF flag in CNTCTW is a flag to distinguish between odd and even sheets in the case of B4 print, but this flag changes from 0, 1, 0, 1 for each print. When it is 0, TOTLCNT and DRMCNT are incremented by 1, and when it is 1, they are incremented by 2.
The above-mentioned one count and two counts are performed alternately. Note that this B4WCTF flag changes only when printing on B4 size paper, and does not change when printing on other small size paper.
Irregular counting is performed only when printing.

以下、その変則カウントについて第6図を参照
しながら詳述する。
The irregular count will be explained in detail below with reference to FIG.

ST11でCNTMOREフラグがあるか否かを
確認するが、初期状態ではフラグがセツトされて
いないため、ST11はNとなりST13に進む。
ここで図示しない用紙サイズ検知装置からの用紙
サイズ信号により用紙がB4サイズであるか否か
を確認する。B4サイズでなかつた場合はST17
に進むが、B4サイズであつた場合はST14で
CNTCTW内のB4WCTFフラグを前述のごとく
0,1,0,1と交互に反転する。このとき0で
あつた場合はST15がNとなり、ST17に進む
が、1であつた場合はST15がYとなり、ST1
6でCNTCTW内のCNTMOREフラグがセツト
され、再びST3に戻つてDRMCNTを+1イン
クリメントし、ST4でTOTLCNTを+1インク
リメントする。これによりB4サイズの場合、1
プリント毎に1,2,1,2カウントを行い、全
体的には1プリント当り1.5カウントする。
In ST11, it is checked whether or not the CNTMORE flag is present, but since the flag is not set in the initial state, ST11 becomes N and the process proceeds to ST13.
Here, it is confirmed whether the paper is B4 size or not based on a paper size signal from a paper size detection device (not shown). If it is not B4 size, ST17
Proceed to ST14 if it is B4 size.
The B4WCTF flag in CNTCTW is alternately inverted to 0, 1, 0, 1 as described above. At this time, if it is 0, ST15 becomes N and the process proceeds to ST17, but if it is 1, ST15 becomes Y and ST1
At step 6, the CNTMORE flag in CNTCTW is set, and the process returns to ST3, where DRMCNT is incremented by +1, and TOTLCNT is incremented by +1 at ST4. As a result, in the case of B4 size, 1
Perform 1, 2, 1, 2 counts for each print, totaling 1.5 counts per print.

この後、同様にST5〜10を経てST11に再
び進み、このとき前述のようにST16で
CNTMOREフラグをセツトしたので、(B4の変
則カウントを実行した)、ST11はYとなりST
12に進む。ここでCNTMOREフラグをクリア
してST17に進む。ST17ではRAM内の
EEPCTWに数値8をセツトし、EE−PROM4
への書込要求を示す。
After this, proceed to ST11 again through ST5 to ST10, and at this time, proceed to ST16 as mentioned above.
Since the CNTMORE flag was set (executed the irregular count of B4), ST11 becomes Y and ST
Proceed to step 12. Here, clear the CNTMORE flag and proceed to ST17. In ST17, in RAM
Set the value 8 to EEPCTW and EE-PROM4
Indicates a write request to.

なお、前述の用紙サイズ検知装置としては、例
えば用紙カセツトに用紙サイズに対応して磁石を
設け、電子写真複写機本体内に磁石の磁気を検出
するセンサを設けて、各用紙サイズを検知するも
のが使用される。
The above-mentioned paper size detection device is, for example, one in which a paper cassette is provided with a magnet corresponding to the paper size, and a sensor is provided in the main body of the electrophotographic copying machine to detect the magnetism of the magnet, thereby detecting each paper size. is used.

第7図は前述のRAM3のデータをEE−
PROM4に書込むときのフローチヤートを示し
たものである。
Figure 7 shows the data of RAM3 mentioned above.
This is a flowchart for writing to PROM4.

RAM3のEEPCTWには、前述のごとく1プ
リント動作が終わるとEE−PROM4への書込要
求を示す数値8がセツトされる。従つて
EEPCTWの内容をチエツクし(ST1)、8が書
き込まれた場合は、書込要求有りと判定し、ST
2に進む。他方、0であつた場合は書込要求はな
いものと判定する。ST2では、EE−PROM4の
性能上、1バイトのデータ書込みにつき約10〜
20msの時間を要するため、1バイトのデータを
書込んだ後の書込動作を遅らせるためのタイマが
動作中であるか否かを判定する。従つて、タイマ
が動作中でないときに、ST3でEE−PROM4に
プリント枚数の書込みを行う。この書込みとして
は、1バイトのデータ書込みであつて、
EEPCTWの内容から1を減算した値をBレジス
タにセツト、ADDRMEMの内容をXレジスタに
ロード、XレジスタとBレジスタを加算してEE
−PROMのストア先アドレスを求めスタツクに
セーブ、RAMのTOTLCNTアドレスとBレジ
スタの値を加算してRAMのロード側アドレスを
求め、このアドレス内のデータをAレジスタにロ
ード、Aレジスタの内容をスタツク内のデータで
指示されるEE−PROMのアドレスにライトする
ことにより書込まれる。ST4,5は前述のごと
く1バイト毎のデータを順次書込むためのもので
ある。
The value 8 indicating a write request to the EE-PROM 4 is set in the EEPCTW of the RAM 3 when one print operation is completed as described above. accordingly
Checks the contents of EEPCTW (ST1), and if 8 is written, it is determined that there is a write request, and ST
Proceed to step 2. On the other hand, if it is 0, it is determined that there is no write request. In ST2, due to the performance of EE-PROM4, it is approximately 10 to 10 times per 1 byte data write.
Since it takes 20ms, it is determined whether or not a timer is operating to delay the write operation after writing 1 byte of data. Therefore, when the timer is not operating, the number of prints is written in the EE-PROM 4 in ST3. This write is a 1-byte data write,
Set the value obtained by subtracting 1 from the contents of EEPCTW to the B register, load the contents of ADDRMEM to the X register, add the X register and B register, and set the value to the B register.
- Find the PROM store address and save it to the stack, add the TOTLCNT address in RAM and the value in the B register to find the load side address in RAM, load the data in this address to the A register, and stack the contents of the A register. It is written by writing to the EE-PROM address indicated by the data in the EE-PROM. ST4 and ST5 are for sequentially writing data of each byte as described above.

ST6では、1バイトのデータ書込み毎に
EEPCTWの内容から1が減算され、次いでST7
でEEPCTWの内容が0か否かを判定する。この
とき0であれば(ST7がY)、AREACNTの内
容から1を減算し(ST8)、この後その
AREACNTの内容が0か否かを判定する(ST
9)。そして、AREACNTの内容が0でなけれ
ば、(ST9がN)、ST10で次の書込アドレスを
指示するようADDRMEMの内容を書き替える。
一方、AREACNTの内容が0であれば(ST9が
Y)、エリア256に書込んだことになるので、ST
11でEE−PROMのトツプアドレスを
ADDRMEMにストア、全エリア数から1を減算
した値をAREACNTにストアし、再度エリア1
から書込むように、ADDRMEM,AREACNT
をセツトする。
In ST6, each byte of data is written.
1 is subtracted from the contents of EEPCTW, then ST7
Determine whether the contents of EEPCTW are 0 or not. If it is 0 at this time (ST7 is Y), subtract 1 from the contents of AREACNT (ST8), and then
Determine whether the contents of AREACNT are 0 or not (ST
9). If the contents of AREACNT are not 0 (ST9 is N), the contents of ADDRMEM are rewritten in ST10 to indicate the next write address.
On the other hand, if the contents of AREACNT are 0 (ST9 is Y), it means that it has been written to area 256, so ST
11, enter the top address of the EE-PROM.
Store to ADDRMEM, store the value obtained by subtracting 1 from the total number of areas to AREACNT, and re-enter area 1.
ADDRMEM, AREACNT to write from
Set.

以上により、カウントされたデータは操作パネ
ル上の表示器12に表示される。また実施例で
は、TOTLCNT,DRMCNT,LIFCNT,
DRALCNT,CNTCTWの5つの内容を示して
いるが、EE−PROM4のエリアの検索について
は、TOTLCNTの比較のみを行つている。即ち、
他の4つのデータはTOTLCNTの補助的データ
であるため、TOTLCNTの値を現在値として代
表して管理している。更に、EE−PROM4への
書込みの際には、TOTLCNTデータを最後に書
込み、しかもTOTLCNTのデータは3バイトか
らなるが、この最下位バイトから書込むようにな
つている。このことは、データ書込中の電源遮断
に備えたもので、例えば8バイト全てのカウント
データをEE−PROMに書込まないうちに電源が
遮断した場合、次の電源投入時にEE−PROM4
の最後に書込処理を行つたエリアの1つ前のエリ
アに記憶されたカウントデータが現在値となり、
いかなる場合であつても誤差を1枚とし、誤差を
最小なものとしている。この場合、前述のごとく
1枚のプリントで2カウントされるときは誤差は
2枚である。
As described above, the counted data is displayed on the display 12 on the operation panel. In addition, in the embodiment, TOTLCNT, DRMCNT, LIFCNT,
Although the five contents of DRALCNT and CNTCTW are shown, when searching the area of EE-PROM4, only TOTLCNT is compared. That is,
Since the other four data are auxiliary data for TOTLCNT, they are managed by representing the TOTLCNT value as the current value. Furthermore, when writing to the EE-PROM 4, the TOTLCNT data is written last, and the TOTLCNT data consists of 3 bytes, and the data is written starting from the least significant byte. This is in case the power is cut off during data writing. For example, if the power is cut off before all 8 bytes of count data are written to the EE-PROM, the next time the power is turned on, the EE-PROM4
The count data stored in the area immediately before the last writing process becomes the current value.
In any case, the error is set to one sheet, and the error is minimized. In this case, as described above, when one print is counted as two, the error is two.

更に、EE−PROMは新品のときは16進でFFの
値が入つた状態であるが、この状態を00が書込ま
れた状態と等価にする必要があるが、これはデー
タ検索、データの読み出し、データの書込み時に
ビツト反転することによつて行われる。
Furthermore, when the EE-PROM is new, it contains the FF value in hexadecimal, but it is necessary to make this state equivalent to the state in which 00 is written. This is done by inverting the bits when reading and writing data.

また、EE−PROMにプリント枚数データを書
込むために、バツクアツプ用の電池や、電源シー
ケンスが不要となり、構成を簡単とすることがで
き、且ついかなる事態においてもデータの消失が
ない。更に、EE−PROMをソケツト等を用いて
基板に搭載しておけば、その基板が故障するとい
う事態が生じた場合、基板を交換しEE−PROM
を新しい基板につけかえるだけで良いので、それ
までカウントされたデータを消失することがな
い。
Further, in order to write print number data to the EE-PROM, a backup battery and a power supply sequence are not required, the configuration can be simplified, and data will not be lost under any circumstances. Furthermore, if the EE-PROM is mounted on a board using a socket etc., if the board breaks down, the board can be replaced and the EE-PROM installed.
All you have to do is replace it with a new board, so the data counted up to that point will not be lost.

更に、B4サイズの用紙にプリントする場合、
そのカウントを1,2,1,2カウントと交互に
異なるカウントを行い、全体的には1.5カウント
としたので、ドラムセツトの寿命管理を感光体の
使用範囲に応じて管理することができる。また、
カウントを異ならせた変則カウントにより計数す
るために、複雑な演算処理等が不要であり、簡単
な構成で計数が可能となる。
Furthermore, when printing on B4 size paper,
Since the count is alternately 1, 2, 1, 2 counts, and the total is 1.5 counts, the life of the drum set can be managed according to the usage range of the photoreceptor. Also,
Since counting is performed using irregular counts with different counts, complicated arithmetic processing and the like are not required, and counting can be performed with a simple configuration.

また、EE−PROMの記憶エリアを256に区分
し、1プリント動作実行毎に順次そのエリアをシ
フトする構成であるため、EE−PROMに書込回
数の寿命があるにもかかわらず、有効にEE−
PROMを使用でき、しかも電子写真複写機に使
用しても充分寿命枚数まで書き替えすることがで
きる。
In addition, the storage area of the EE-PROM is divided into 256 areas, and the area is shifted sequentially each time one print operation is executed, so even though the EE-PROM has a lifespan of the number of writes, the EE-PROM is effectively −
PROM can be used, and even when used in an electrophotographic copying machine, it can be rewritten to a sufficient number of copies over its lifetime.

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

以上説明したように本発明によれば、計数値を
記憶する記憶手段として、データの消去及びプロ
グラム可能な記憶手段を用いたので、バツクアツ
プ用の電池や電源シーケンスを不要にでき、構成
を極めて簡単にすることができる。また、バツク
アツプ用の電池が不要でありながら、いかなる事
態においてもデータの消失がなく、確実にデータ
を保護できる効果がある。
As explained above, according to the present invention, since a data erasable and programmable storage means is used as a storage means for storing count values, backup batteries and power supply sequences are not required, and the configuration is extremely simple. It can be done. Further, although no backup battery is required, data will not be lost under any circumstances, and data can be reliably protected.

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

第1図は本発明の一実施例のブロツク図、第2
図はCPUのアドレスマツプを示す説明図、第3
図はEE−PROMのアドレスマツプを示す説明
図、第4図はRAMのアドレスマツプを示す説明
図、第5図はCPUの電源投入時の動作を示すフ
ローチヤート、第6図はRAMにデータを書込む
時の動作を示すフローチヤート、第7図はEE−
PROMにデータを書込むときの動作を示すフロ
ーチヤートである。 1……CPU、2……ROM、3……RAM、4
……EE−PROM、6……アドレスデコーダ、1
2……表示器。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
The figure is an explanatory diagram showing the address map of the CPU.
Figure 4 is an explanatory diagram showing the EE-PROM address map, Figure 4 is an explanatory diagram showing the RAM address map, Figure 5 is a flowchart showing the operation when the CPU is powered on, and Figure 6 is an explanatory diagram showing the address map of the RAM. A flowchart showing the operation when writing, Figure 7 is EE-
This is a flowchart showing the operation when writing data to PROM. 1...CPU, 2...ROM, 3...RAM, 4
...EE-PROM, 6...Address decoder, 1
2...Indicator.

Claims (1)

【特許請求の範囲】[Claims] 1 カウントデータを記憶する複数の領域を備え
た不揮発性記憶手段と、該不揮発性記憶手段の前
記カウントデータが最後に書込まれた領域から現
在のカウントデータを読み出す読み出し手段と、
カウント要求に応じて前記現在のカウントデータ
に対して演算処理を行なう演算処理手段と、該演
算処理手段の処理により新たなカウントデータが
生成される毎に該新たなカウントデータを前記記
憶手段の前記現在のカウントデータが読み出され
た領域とは異なる領域へ書込む書込み手段とを備
えることを特徴とするカウンタ装置。
1. A non-volatile storage means having a plurality of areas for storing count data, and a read-out means for reading out the current count data from the area where the count data was last written in the non-volatile storage means;
arithmetic processing means for performing arithmetic processing on the current count data in response to a count request; and each time new count data is generated by the processing of the arithmetic processing means, the new count data is stored in the storage means. A counter device comprising: writing means for writing into an area different from the area from which current count data was read.
JP61044329A 1986-02-28 1986-02-28 Counter device Granted JPS62202293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61044329A JPS62202293A (en) 1986-02-28 1986-02-28 Counter device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61044329A JPS62202293A (en) 1986-02-28 1986-02-28 Counter device

Publications (2)

Publication Number Publication Date
JPS62202293A JPS62202293A (en) 1987-09-05
JPH0550787B2 true JPH0550787B2 (en) 1993-07-29

Family

ID=12688465

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61044329A Granted JPS62202293A (en) 1986-02-28 1986-02-28 Counter device

Country Status (1)

Country Link
JP (1) JPS62202293A (en)

Also Published As

Publication number Publication date
JPS62202293A (en) 1987-09-05

Similar Documents

Publication Publication Date Title
JPH0550788B2 (en)
TW446950B (en) Use of erasable non-volatile memory for storage of changing information
CA2021274C (en) Non-volatile memory usage
JPS58136473A (en) Printer
KR920018537A (en) Maintenance apparatus for electrophotographic apparatus including photosensitive member
CN102112959A (en) Replaceable printer component including a memory updated atomically
US5455925A (en) Data processing device for maintaining coherency of data stored in main memory, external cache memory and internal cache memory
JPH0325798A (en) Storage device using eeprom
JPH10161938A (en) Disk controller
JPH0550787B2 (en)
US20050066112A1 (en) Data read/write control system and data read/write control method
JPH1040176A (en) System and method for memory management of electronic equipment, and storage medium stored with memory management program that computer can read
CN103009817B (en) Consumable chip and data means to save the situation, consumable container, imaging device
JPH04336351A (en) Information processor with memory restoring function
JP2828719B2 (en) Page counting device for electrophotographic printer
JPS6330867A (en) Counter device
JPH01138569A (en) Copying device
JPS63128379A (en) Image forming device
JPH0717079Y2 (en) Remaining developer detection device
JP4049286B2 (en) Method and apparatus for protecting vehicle-mounted electronic device stored data file
JP3050971B2 (en) History storage method of image processing apparatus
JP2520678Y2 (en) Image forming device
JP2000020401A (en) Cpu device, information processor and control method therefor
JPH0527502A (en) Electrophotographic copying device
JP2000112836A (en) Information processor, information storing method, and storage medium

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees