A printer that enables required data, such as a remaining quantity of each
ink, to be written securely even when a storage device having a
relatively low allowable frequency of rewriting is applied for a storage
element mounted on an ink cartridge. An ink cartridge that is detachably
attached to the printer. In the printer, a sequential access-type EEPROM
having a relatively low allowable frequency of rewriting is applied for
storage elements incorporated in both a black ink cartridge and a color
ink cartridge. A print controller in the printer has a memory, for which
an EEPROM (or a DRAM) is applicable. Data relating to each ink cartridge,
such as a remaining quantity of each ink in the ink cartridge, are stored
into both the EEPROM of the print controller and a memory cell included
in the storage element of the ink cartridge. The writing operation of
data into the EEPROM of the print controller is carried out at every time
the remaining quantity of each ink is calculated, whereas the writing
operation into the memory cell in the storage element of the ink
cartridge is carried out restrictedly in response to a power down
instruction. This arrangement causes the frequency of writing into the
storage element of the ink cartridge to be lower than the frequency of
writing into the EEPROM of the print controller. This accordingly
fulfills the requirements, that is, the sufficient reliability of data
and the restriction of the allowable frequency of rewriting.