Patent ID: 7164491

Claim:
A printing apparatus for printing an image using a consumable detachably attached to the printing apparatus, wherein the consumable is adapted to output a response code obtained by encoding an identification code with a set logic and wherein a first logic is set in the consumable as the set logic when the consumable is unused, said printing apparatus comprising: a generating section which generates the identification code; an output port which outputs the identification code to the consumable; an input port through which the response code from the consumable is input; an encoding section which encodes the identification code using the first logic to obtain a first normal code; a collating section which collates the first normal code with the response code input through the input port; a change section which changes the set logic in the consumable to a second logic, which is different from the first logic and which is determined in accordance with a predetermined rule, when the response code coincides with the first normal code; a storage section which stores a plurality of said second logics and a plurality of count values which are associated with the second logics, respectively; a storage control section which controls the storage section; an updating section which updates, in accordance with use of the consumable, the count value stored in the storage section in association with the second logic corresponding to the consumable; a determining section which determines whether each count value is equal to or less than a limit value; and an identifying section which identifies whether the consumable is usable; wherein if the response code coincides with the first normal code, the change section changes the set logic to the second logic determined in accordance with a predetermined rule, and the storage control section causes the storage section to store the determined second logic and an initial value as a count value, and the identifying section identifies the consumable as usable; wherein if the response code does not coincide with the first normal code, the encoding section encodes the identification code using each of the second logics stored in the storage section to obtain second normal codes, and the collating section collates the second normal codes with the response code; wherein if the response code coincides with any one of the second normal codes, the determining section determines whether the count value associated with the second logic used by the encoding section to obtain the coinciding second normal code is equal to or less than the limit value, and the identifying section identifies the consumable as usable if the count value is equal to or less than the limit value, and identifies the consumable as unusable if the count value is larger than the limit value; wherein if the response code does not coincide with the first normal code and does not coincide with any said second normal code, the identifying section identifies the consumable as unusable.