Call-unit count device

Abstract: A call-unit count device according to the present invention comprises a memory circuit having a high-order level and a low-order level composed of n (n: integer greater than or equal to 2) bits and wherein all the bits each indicative of the initial value and placed in the low-order level are changed to reversed values bit by bit each time a one call-unit add command is given, all the bits in the low-order level, which have been brought to the reversed values, are returned to the initial value bit by bit each time the one call-unit add command is given, and values stored in the high-order level are changed upon a carry from the low-order level to the high-order level.

Description: BACKGROUND OF THE INVENTION Field of the Invention: This invention relates to a frequency or call-unit count device. Description of the Related Art: This type of call-unit count device has heretofore been configured as a portable module such as an IC card having a memory circuit such as an Electrically Erasable Programmable Read Only Memory (hereinafter called EEPROM) or the like. When a command for adding a frequency or call unit (call-unit add command) is issued or given from a card reader, the call-unit count device adds the call unit given by the call-unit add command to call units (corresponding to the sum of call units which have been given up to now by the input call-unit add commands) stored in the EEPROM at this time, and stores the call units obtained by its addition therein. Described specifically, the EEPROM is divided into a plurality of levels respectively composed of a plurality of bits. In this type of EEPROM, bits in the least significant level are set to "1" bit by bit each time a command for adding one frequency or call unit (hereinafter called "one call-unit add command") is given, for example. When all the bits in the least significant level are brought to "1", a bit in a level higher by one than the above level are brought to "1" and all the bits in the least significant level are set to "0" in response to a one call-unit add command given in the next place. Thus, the conventional call-unit count device performs a carry from a low-order level to a high-order level by inputting one call-unit add command after the transition of all the bits in the least significant level from a "0" state to a "1" state. SUMMARY OF THE INVENTION With the foregoing in view, it is an object of the present invention to provide a call-unit count device capable of storing large call units in a small-scale memory circuit or with the less rewritable able number of times. It is another object of the present invention to provide a call-unit count device capable of properly setting call units to be stored and storing them therein even if it is deactivated during a carry process. According to one aspect of the present invention, for achieving the above objects, there is provided a typical call-unit count device comprising: memory means having a high-order level and a low-order level composed of n (n: integer greater than or equal to 2) bits, said memory means being activated such that all the bits each indicative of the initial value and placed in the low-order level are changed to reversed values bit by bit each time a one call-unit add command is given, all the bits in the low-order level, which have been brought to the reversed values, are returned to the initial value bit by bit each time the one call-unit add command is given, and values stored in the high-order level are changed upon a carry from the low-order level to the high-order level. BRIEF DESCRIPTION OF THE DRAWINGS While the specification concludes with claims particularly pointing out and distinctly claiming the subject matter which is regarded as the invention, it is believed that the invention, the objects, features and advantages thereof will be better understood from the following description taken in connection with the accompanying drawings in which: Fig. 1 is a schematic configurational view showing a first embodiment of the present invention; Fig. 2 is a view for describing a call-unit count storing process employed in the first embodiment; Fig. 3 is a schematic configurational view illustrating a second embodiment of the present invention; Fig. 4 is a view for explaining a call-unit count storing process employed in the second embodiment; Fig. 5 is a schematic configurational view showing a third embodiment of the present invention; Fig. 6 is a view for describing a call-unit count storing process employed in the third embodiment; Fig. 7 is a view for explaining a carry process employed in the third embodiment; and Fig. 8 is a view for describing states of an EEPROM at respective points at the time of the carry process employed in the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Fig. 1 is a schematic configurational view of an IC card showing a first embodiment of a frequency or call-unit count device according to the present invention. An IC card 10 corresponding to a portable module shown in Fig. 1 has an EEPROM 1 and a control circuit 2. When the IC card 10 is inserted into a card reader 20 used as a fixed module, it is started to add a call unit given by a call-unit add command to the call units (corresponding to the sum of previous call units given by the call-unit add commands supplied to the IC card 10), which has been stored till then. The IC card 10 causes the EEPROM 1 to store the call units obtained by its addition therein. When the IC card 10 is disconnected from the card reader 20, the IC card 10 stops operating and stores and holds the resultant call unit therein. The IC card 10 and the card reader 20 are electrically connected to each other by a power line VCC for supplying power to the IC card 10, a ground line GND, a clock line CLK for supplying an operating clock to the IC card 10, a reset line RST for resetting the control circuit 2 of the IC card 10, and a serial data line SIO for transmitting a frequency or call-unit add command issued from the card reader 20 to the control circuit 2 and transferring the call units read from the EEPROM 1 to the card reader 20. The EEPROM 1 has a Y address decoder 3, an X address decoder 4, a control/data interface (I/O) 5 and a unit cell region 6. The EEPROM 1 is able to erase and write data therein in accordance with the designation of bits. The unit cell region 6 has 30 bits (30 unit cells) and is divided into levels 1, 2 and 3 every 10 bits. An electric charge is injected into a floating gate of each unit cell by erasing and is drawn or discharged therefrom by writing. In the following description, the initial value of bit is associated with the written state, which is expressed as "0". Further, inverted value of bit is associated with the erased state, which is represented as "1". incidentally, the initial value may be associated with the erased state and the inverted value may be associated with the written state. The Y address decoder 3 and the X address decoder 4 specify or designate an erasing, writing or reading bit in accordance with address data sent from the control circuit 2. The I/O 5 performs data writing, erasing or reading on the bit designated by the Y address decoder 3 and the X address decoder 4 in response to a write command (W), an erase command (E) or a read command (R) sent from the control circuit 2 and sends the read data (frequency or call unit) to the control circuit 2. When the call-unit add command is inputted to the control circuit 2 from the card reader 20, the control circuit 2 sends address data and an erase/write command to the EEPROM 1 and causes the EEPROM 1 to execute a call-unit count storing process. Thus, the call unit to be stored in the EEPROM 1 is renewed. Incidentally, the control circuit 2 may be realized by hard means or by soft processing of a microprocessor. Fig. 2 is a view for explaining the call-unit count storing process of the IC card shown in Fig. 1. As shown in Fig. 2(a), bits for the level 1 are set to "1" bit by bit from a bits b0 each time a one call-unit add command is given. Thus, 1 to 10 call units are stored. When the one call-unit add command is given after all the bits in the level 1 have been brought to "1" (see 10 call units in Fig. 2(b)), the bit b0 in the level 1 is set to "0" (see 11 call units in Fig. 2(c)). Thereafter, the bits in the level 1, which are represented as "1", are set to "0" bit by bit each time one call-unit add command is given. When a one call-unit add command is given after all the bits in the level 1 exclusive of the bit b9 have been brought to "0" (see 19 call units in Fig. 2(d)), a bit b0 in the level 2 is set to "1" (see Fig. 2(e)) and the bit b9 in the level 1 is set to "0" (see 20 call units in Fig. 2(f)). Thus, a carry from the level 1 to the level 2 is executed. This process is called "carry process". At this time, the bits b0 through b9 in the level 1 are rewritten once when the one call-unit add command is given twenty times (erasing and writing are respectively performed once). Next, a process for setting all the bits in the level 1 represented as "0" to "1" bit by bit each time the one call-unit add command is given and all the bits in the level 1 represented as "1" to "0" bit by bit each time the one call-unit add command is given after all the bits have been brought to "1",is repeated until the storage of 21 through 219 call units. Namely, a process for setting all the bits in the level 1 to "0" each time the one call-unit add command is given twenty times, is repeatedly executed. Bits represented as "0" in the level 2 are set to "1" bit by bit each time a one call-unit add command is given twenty times. Next, all the bits in the level 2 and all the bits except for the bit b9 in the level 1 have been brought to "1" and "0" respectively (see 219 call units in Fig. 2(g)). Next, when the one call-unit add command is given, the bit b0 in the level 2 is set to "0" and the bit b9 in the level 1 is set to "0" (see 220 call units in Fig. 2(h)). Next, the process for setting all the bits in the level 1 represented as "0" to "1" bit by bit each time the one call-unit add command is given and all the bits in the level 1 represented as "1" to "0" bit by bit each time the one call-unit add command is given after all the bits have been brought to "1",is repeated until the storage of 221 through 399 call units. The bits in the level 2, which are represented as "1", are set to "0" bit by bit each time the one call-unit add command is given twenty times. Next, all the bits exclusive of the bit b9 in the levels 1 and 2 have been brought to "0" (399 call units). Next, when the one call-unit add command is issued, a bit b0 in the level 3 is set to "1" and the bits 9 in the levels 1 and 2 are respectively set to "0" (400 call units). Thus, a carry from the level 2 to the level 3 is done. In the level 2, all the bits are set to "0" each time the one call-unit add command is given 400 times. Next, the process for setting all the bits in the level 1 represented as "0" to "1" bit by bit each time the one call-unit add command is given and all the bits in the level 1 represented as "1" to "0" bit by bit each time the one call-unit add command is given after all the bits have been brought to "1",is repeated until the storage of 401 through 7999 call units. In the level 2, a process for setting all the bits represented as "0" to "1" bit by bit each time the one call-unit add command is given twenty times and setting all the bits represented as "1" to "0" bit by bit each time the one call-unit add command is given twenty times after all the bits have been brought to "1", is repeated. In the level 3, bits represented as "0" therein are set to "1' bit by bit each time the one call-unit add command is given 400 times. After all the bits in the level 3 have been brought to "1", bits represented as "1" in the level 3 are set to "0" bit by bit each time the one call-unit add command is given 400 times. Next, all the bits exclusive of the bits b9 in the levels 1 through 3 are set to "0" (see 7999 call units in Fig. 2(i)). Next, when the one call-unit add command is given, all the bits in the levels 1 through 3 are set to "0" (see 8000 call units in Fig. 2(j)). At this time, the bits b0 through b9 in the level 1 correspond to the bits that the number of times that they are renewed, reaches the maximum. The number of times that they are rewritten, becomes 400. According to the first embodiment, the carry from the level 1 to the level 2 is carried out each time the one call-unit is given 2n times (where n is the number of bits in the level 1, and is equal to 10 in the present embodiment). It is thus possible to store large frequencies or call units in a small-scale memory circuit or with the less rewritable number of times. It is also possible to reduce the probability that call-unit misstoring occurs due to the deactivation of the present device during the carry process. Incidentally, the order of effecting erasing and writing on the levels 1 through 3 is not necessarily limited to the transition of the low-order bits to the high-order bits. Further, the configurational number of bits in the levels 1 through 3 are not limited to 10 respectively. The levels 1 through 3 may be set so as to become different in configurational number of bits. The portable module is by no means limited to a card form. Further, the control circuit 2 may be incorporated into the fixed module. The first embodiment has described the case in which the call-unit count storing process is executed when the one call-unit add command is given. However, the above-described process is carried out according to the given call units even if a one or more call-units add command is given. When, for example, a one call-unit is already stored and a command for adding 3 call units to it is issued, the bits b1 through b3 in the level 1 are respectively set to "1". When 19 call units are already stored and a command for adding 2 call units to it is issued, the bit b0 in the level 2 is set to "1", the bit b0 in the level 1 is set to "1" and the bits b1 through b9 in the level 1 are respectively set to "0". Fig. 3 is a schematic configurational view of an IC card showing a second embodiment of a call-unit count device according to the present invention. An IC card 30 shown in Fig. 3 has an EEPROM 31 and a control circuit 32. When the IC card 30 is inserted into a card reader 20, it is started to add a call unit given by a call-unit add command to the call units (corresponding to the sum of previous call units given by the call-unit add commands issued to the IC card 30), which has been stored up to now. Thereafter, the IC card 30 causes the EEPROM 31 to store the call unit obtained by its addition. When the IC card 30 is withdrawn from the card reader 20, the IC card 30 stops operating and holds the resultant call unit therein. The EEPROM 31 is one formed by replacing the unit cell region 6 of the EEPROM 1 shown in Fig. 1 with a unit cell region 33 having 10-bit levels 1 and 2. The control circuit 32 causes the EEPROM 31 to execute a call-unit count storing process according to the call-unit add command. Incidentally, the control circuit 32 may be realized by hard means or soft processing of a microprocessor. Fig. 4 is a view for describing the call-unit count storing process employed in the second embodiment of the present invention. Bits in the level 1 are respectively set to "1" bit by bit from a bit b0 as shown in Fig. 4(a) each time a one call-unit add command is given. Thus, 1 to 10 call units are stored in the EEPROM 31. When the one call-unit add command is given after all the bits in the level 1 have been brought to "1" (10 call units), the bit b0 in the level 1 is set to "0" (see 11 call units in Fig. 4(b)). Next, the bits represented as "1" in the level 1 are respectively set to "0" bit by bit each time the one call-unit command is issued. Next, when the one call-unit add command is provided after all the bits exclusive of the bit b9 in the level 1 have been brought to "0" (see 19 call units in Fig. 4(c)), values stored in the level 2 are rewitten into binary digits ("0000000001") obtained by adding +1 to binary digits ("0000000000") stored in the level 2 up to now from the binary digits ("0000000000") stored in the level 2. Namely, the bit b0 in the level 2 is set to "1" (see Fig. 4(d)) and the bit b9 in the level 1 is set to "0" (see 20 call units in Fig. 2(e)). Subsequently, a process for setting all the bits represented as "0" in the level 1 to "1" bit by bit each time a one call-unit add command is issued and setting all the bits represented as "1" to "0" bit by bit each time the one call-unit add command is issued after all the bits have been brought to "1", is repeated. In the level 1, all the bits are returned or reset to "0" each time the one call-unit add command is given twenty times. In the level 2, the values stored in the level 2 are rewitten to the binary digits obtained by adding +1 to the stored binary digits each time the one call-unit add command is issued twenty times. Namely, the number of times that a carry from the level 1 to the level 2 is done, is written into the level 2 as data represented in the form of a binary number. At 20479 call units shown in Fig. 4(i), all the bits in the level 2 are set to "1" and all the bits other than the bit b9 in the level 1 are set to "0". When the one call-unit add command is thereafter issued, all the bits in the levels 1 and 2 are brought to "0" and the EEPROM 31 is returned to its initial state (see 20480 call units in Fig. 4(j)). At this time, the bits b0 through b9 in the level 1 is rewitten for each time each time the one call-unit add command is given twenty times (writing and erasing respectively are performed once). Even in the case of the level 2, the least significant bit is given as one having the maximum rewittable number of times and is rewritten each time the one call-unit add command is given 40 times. A description will now be made of a call-unit count storing process executed when a command for simultaneously adding two or more call units is issued from the card reader 20. When a command for adding call units more than or equal to one call unit and less than 20 call units is given from the card reader 20, the above-described process is executed according to the given call units. When, for example, a one call unit is already stored and a command for adding three call units thereto is issued, the bits b1 through b3 in the level 1 are respectively set to "1". Further, when 19 call units are already stored and a command for adding 2 call units thereto is issued, the bit b0 in the level 2 becomes "1", the bit b0 in the level 1 becomes "1" and the bits b1 through b9 in the level 1 become "0" respectively. If a command for adding 20 or more call units at a time is issued from the card reader 20, then the control circuit 32 divides a given call unit C into C = 20 x A + B (where B is less than 20). Further, the control circuit 32 changes only the values stored in the level 2 A times with respect to the 20 x A call units without varying the bits in the level 1 and thereafter executes the same call-unit count storing process as when the one call-unit add command is given B times. When the call unit is given as 101 (5 x 20 + 1), for example, the values stored in the level 2 alone are changed five times and thereafter the same process as when the one call-unit add command is given once, is executed. Thus, according to the second embodiment, all the bits in the level 1 are set to "0" each time a command for adding the 20 call units in total is issued. Thus, since the number of times that a carry from the level 1 to the level 2 is carried out, is stored in the level 2 as the value represented in the form of the binary number, the number of times that the bits in the level 1 are renewed, is reduced and large call units can be stored in a small capacity. When a command for simultaneously adding greater call units is issued, a processing time interval can be shortened by forcibly effecting the process of the level 2 alone on call units corresponding to an integral multiple of 20. Incidentally, the order of effecting erasing and writing on the level 1 is not limited to the transition from a low-order bit to a high-order bit. Further, the configurational numbers of bits in the levels 1 and 2 are not necessarily limited to 10 bits respectively. The portable module is not necessarily limited to the card. Further, the control circuit 32 may be provided within a fixed module. Fig. 5 is a schematic configurational view of an IC card showing a third embodiment of a call-unit count device according to the present invention. An IC card 40 has an EEPROM 41 and a control circuit 42. When the IC card 40 is inserted into a card reader 10, it is started to add a call unit given by a call-unit add command to the call units (corresponding to the sum of previous call units given by the call-unit add commands issued to the IC card 40 from the card reader 10), which has been stored up to now. Further, the IC card 40 causes the EEPROM 41 to store the call-unit obtained by its addition therein. When the IC card 40 is withdrawn from the card reader 10, it stops operating and stores and holds the resultant call unit therein. The EEPROM 41 is one formed by replacing the unit cell region 6 of the EEPROM 1 shown in Fig. 1 with a unit cell region 43 having 10-bit levels 1 through 3, a one-bit flag 1 and a one-bit flag 2. Further, the level 1 is erasable/writable in accordance with the designation of each bit. The levels 2 and 3 are erasable/writable in accordance with the designation of each word. The level 1 is of a low-order level. In a manner similar to the first or second embodiment, a process for setting all the bits represented as "0" in the level 1 to "1" bit by bit each time a one call-unit add command is issued and setting all the bits represented as "1" to "0" bit by bit each time the one call-unit add command is issued after all the bits have been brought to "1", is repeated. Further, the levels 2 and 3 are both of high-order levels and are made effective in alternate order. The flag 1 indicates whether or not the level is under carry processing. The flag 1 is brought to "1" during carry processing and is set to "0" except when under carry processing. The flag 2 indicates whether or not either one of the levels 2 and 3 is effective. When the level 2 is valid or effective, for example, the flag 2 is brought to "0". On the other hand, when the level 3 is valid, the flag 2 is set to "1". The control circuit 42 causes the EEPROM 41 to execute a call-unit count storing process according to the call-unit add command. Further, when the control circuit 42 is deactivated during carry processing, the control circuit 42 executes a process for restoring the carry process upon the next startup. Incidentally, the control circuit 42 may be realized by hard means or soft processing of a microprocessor. Fig. 6 is a view for explaining the call-unit count storing process employed in the third embodiment of the present invention. The call-unit count storing process employed in the third embodiment is as follows: Values, which are indicative of the number of times that a carry from the level 1 to the high-order level is executed and which are represented in binary form, are alternately stored in the levels 2 and 3 for each carry process and the flag 2 is reversed for each carry process. Fig. 6(a) indicates that the stored call unit is "1". Further, Fig. 6(a) also shows that the flag 2 is "0" and the level 2 is valid. Upon a carry process in which values stored in the high-order level are varied upon transition from 19 call units to 20 call units, values stored in the level 3 are next renewed to stored values (0000000001) obtained by adding 1 to the values (0000000000) stored in the level 2 defined as valid by the flag 2. Further, the flag 2 is reversed so as to reach "1". In the case of 20 call units shown in Fig. 6(b), a level 3 is made valid. Similarly, upon a carry process in which values stored in the high-order level are varied upon transition from 39 call units to 40 call units, values stored in a level 2 are renewed to values (0000000010) obtained by adding 1 to values (0000000001) stored in the level 3 defined as valid by a flag 2. Further, the flag 2 is reversed again so as to reach "0". A level 2 is made valid in the case of 40 call units shown in Fig. 6(c). In order to read the call units stored in the EEPROM 41, the valid high-order level is selected according to the value of the flag 2 and the call units are read from the high-order level defined as valid by the flag 2 and the level 1. Fig. 7 is a flowchart for describing a procedure for executing the carry process employed in the third embodiment of the present invention. In Step 1, the flag 1 is set to "1". In Step 2, the position or state of the flag 2 is checked. If the flag 2 is represented as "0", then all the bits in the level 3 are respectively set to "0" in Step 3. Further, the values stored in the level 3 are renewed to the values obtained by adding 1 to the values stored in the level 2 in Step 4. If the flag 2 is found to be "1" in Step 2, then all the bits in the level 2 are respectively set to "0" in Step 5. In Step 6, the values stored in the level 2 are renewed to the values obtained by adding 1 to the values stored in the level 3. Next, the routine step proceeds to Step S7 where the bit b9 in the level 1 is set to "0" and all the bits in the level 1 are respectively set to "0". Next, the flag 2 is reversed in Step 8. In Step 9, the flag 1 is set to "0". As a result, the carry process is terminated. A restoring process for storing the proper call units in the IC card 40 when a power failure, a card withdrawal, etc. occur during the carry process and the IC card 40 is deactivated and thereafter started up, will be described. Fig. 8 is a view for describing states of the EEPROM 41 at respective points (P1 through P5) on the carry process shown in Fig. 7 and shows a process for performing a carry from 59 call units to 60 call units. Whether or not the IC card is deactivated due to the occurrence of the card withdrawal during the carry process, is determined upon its startup depending on whether the flag 1 is "1". Namely, since it is judged or determined that the interruption of the carry process has occurred when the flag 1 is "1", the following restoring process is executed. When the flag 1 is "0", the normal call-unit count storing process is executed as it is. A description will first be made of a case in which the flag 1 is "1" and all the bits in the level 1 are not "0" (correspond to P1 through P3 shown in Figs. 7 and 8). In this case, the value of a high-order level undefined by the flag 2 is replaced by a value obtained by adding +1 to the value of the high-order level defined by the flag 2 (level 2 if the flag is "0" or level 3 if the flag is "1"). Further, all the bits in the level 1 are respectively set to "0", the flag 2 is reversed and the flag 1 is set to "0". Thus, the proper call units to be stored are stored in the IC card. Further, a description will be made of a case in which the flag 1 is "1" and all the bits in the level 1 are "0" (correspond to P4 through P5 shown in Figs. 7 and 8). In this case, the value of the flag 2 is set so that either one of the levels 2 and 3, which is large in value, is rendered valid. Further, the flag 1 is set to "0". Thus, the proper call units to be stored are stored in the IC card. According to the third embodiment as described above, large call units can be stored with the less reloadable number of times and in less-bit configurations. Even if the power failure, the card withdrawal, etc. occur during the carry process so that the IC card stops operating, this can be determined by the flag 1 upon the next startup. Further, the restoration of the IC card according to the states of the level 1 and the flag 2 can prevent misstoring of the call units due to the deactivation of the IC card during the carry process. Incidentally, the order of effecting erasing and writing on the level 1 is not necessarily limited to the transition from the low-order bit to the high-order bit. Further, the configurational number of bits in the levels 1, 2 and 3 are not limited to 10 bits respectively. The portable module is by no means limited to a card form. Further, the control circuit 42 may be incorporated into a fixed module, or the control circuit for executing the call-unit count storing process may be incorporated into a portable module. Alternatively, the control circuit for executing the restoring process may be provided within a fixed module. Moreover, the carry from the level 1 to the high-order level is done in base 2n (where n = 10) but may be carried out in base n. Further, the levels 2 and 3 may not be established in binary notation. While the present invention has been described with reference to the illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to those skilled in the art on reference to this description. It is therefore contemplated that the appended claims will cover any such modifications or embodiments as fall within the true scope of the invention.

Claims: A call-unit count device comprising: memory means having a high-order level ("level 3" ; "level 2") and a low-order level ("level 1") composed of n (n: integer greater than or equal to 2) bits (b 0 ...b 9 ), said memory means being activated such that all the bits each indicative of the initial value and placed in the low-order level ("level 1") are changed to reversed values bit by bit each time a one call-unit add command is given, all the bits in the low-order level ("level 1"), which have been brought to the reversed values, are returned to the initial value bit by bit each time the one call-unit add command is given, and values stored in the high-order level (" level 2 ", " level 3 ") are changed upon a carry from the low-order level to the high-order level. A call-unit count device according to claim 1, wherein said high-order level is composed of m (m: positive integer) bits and the stored values are values represented in binary number. A call-unit count device according to claim 1, comprising: said memory means having a first level corresponding to the low-order level ("level 1") and second through N (N: integer greater than or equal to 2) levels each corresponding to the high-order level and each composed of a plurality of bits, said memory means being activated such that all the bits each indicative of the initial value and placed in the kth (k: integer of any one of 2 through N) level are changed to reversed values bit by bit each time a carry from a (k-1)th level to the kth level is carried out, and all the bits in the kth level, which have been brought to the reversed values, are returned to the initial value bit by bit each time the carry from the (k-1)th level to the kth level is carried out. A call-unit count device comprising: memory means (1), having a low-order level ("level 1") a high-order level including a first high-order level ("level 2") and a second high-order level ("level 3"), said high-order level being provided such that values stored in either one of the first ("level 2") and second ("level 3") high-order levels are changed in response to a carry from the low-order level to the high-order level, a first flag indicative of whether a carry process is under execution, and a second flag for specifying a valid one of the first and second high-order levels, said memory means being activated such that when the carry from the low-order level ("level 1") to the high-order level occurs, the first flag is set to a first value indicative of the carry process being under execution, values stored in the first ("level 2") or second ("level 3") high-order level, which have been unspecified by said second flag, are thereafter changed according to the values stored in the first or second high-order level, which have been specified by said second flag, bits in the low-order level ("level 1") are respectively returned to the initial value and said second flag is reversed, and thereafter, said first flag is set to a second value indicative of a non-carry process being under execution. A call-unit count device according to claim 4, characterized in that when said first flag is of the first value and all the bits in the low-order level ("level 1") are not of the initial value upon startup of said call-unit count device, the values stored in the first or second high-order level ("level 2", "level 3"), which have been unspecified by said second flag, are changed according to the values stored in the first or second high-order level, ("level 2"; "level 3") which have been specified by said second flag, all the bits in the low-order level are respectively returned to the initial value and said second flag is reversed and said first flag is set to the second value, and when said first flag is of the first value and all the bits in the low-order level ("level 1") are respectively of the initial value upon the startup, said second flag is set so as to specify either one of the first and second levels, having larger ones of the values stored in the first and second levels, and said first flag is set to the second value. A call-unit count device according to claim 1 or 3, wherein when a command for adding call units expressed in an equation of p x (2n) + q (where p: positive integer, and q: 0 or positive integer and integer smaller than 2n) is given, only the values stored in the high-order level ("level 2") are changed without changes in the bits in the low-order level upon addition of call units of p x (2n), and the bits in the low-order level ("level 1") or the bits in the high-order level and the low-order level are changed upon addition of call units of q. A call-unit count device according to any of claims 1 through 6, wherein said memory means is a nonvolatile device provided within a portable module (10), and when the portable module (10) is inserted into a fixed module (20), said memory means is started and when the portable module is disconnected from the fixed module, said memory means is deactivated. A call-unit count device according to claims 1 to 6, wherein said memory means is composed of a plurality of unit cells provided with an EEPROM. (1) A call unit count device, according to any preceding claim for counting call units in a telecommunication system, being an IC card (10) for insertion into an IC card reader coupled to a telecommunications system. A call unit count device according claim 9 wherein the memory means comprises an EEPROM (1) on the IC card (10).

Inventors: SHONA YOSHIHIRO, SHONA, YOSHIHIRO
Applicants: OKI ELECTRIC IND CO LTD, OKI ELECTRIC INDUSTRY COMPANY, LIMITED
Application year: 1997
Main classification: H03K23
IPC codes: G11C17, G11C16, G06F12, H03K23, H03K21