PORTABLE CARD UNIT HANDLER

Abstract: A portable-card-unit processing apparatus for processing data in a storage section of a card unit when the card unit is attached to the processing apparatus. The processing apparatus includes a first communicating section (23, 243), a connecting unit (14) for being detachably connected to an external apparatus, a second communicating section (24, 244), a display section (13), and a control section (20) for controlling the first communicating section (23, 243) and the second communicating section (24, 244) so as to transfer data between the card unit and the external apparatus while the external apparatus is connected to the connecting section (14), and controlling the first communicating section (23, 243) and the display section (13) so as to read data from the storage section of the card unit and to display the read-out data on the display section (13) while the external apparatus is disconnected from the connecting section (14). This processing apparatus thereby serves as not only an information displaying apparatus for the card unit but alsoa card-unit reading/writing apparatus.

Description: Technical Field The present invention relates to a portable card unit processing apparatus attached thereto a card unit having a storage unit to process the card unit, in particular, to a portable card unit processing apparatus being able to read/display various information (electronic money and the like) stored in the storage unit of the card unit. Background Art Electronic money systems which enable cashless commercial transactions are developed in recent years. An IC card in which an IC (Integrated Circuit) is integrated is used as a portable medium for electronic money. There is used a portable balance display (balance reader) in order that a possessor of the IC card refers to information (for example, a balance of electronic money) stored in a memory thereof. The balance reader comprises a card inserting opening, a contact and a display unit. The user inserts the IC card from the card inserting opening. Whereby, a contact of the IC card and the contact of the balance reader are electrically connected, and balance information or the like stored in the memory of the IC card is read out and displayed on the display unit. The balance reader is formed in such a size that the user can carry it. There is also known an IC card reader/writer (hereinafter, referred as an IC card R/W) which reads/writes value information (electronic money or the like) stored in the memory of the IC card. The IC card R/W comprises a card inserting opening into which the IC card is inserted, a contact, and an external communication interface for connecting to an external apparatus. The IC card R/W is connected to the external apparatus such as a personal computer or the like through the above external communication interface to read or write data stored in the memory of the IC card under control of the external apparatus. The IC card R/W also comprises a communicating means which performs card controls such as a card activating/deactivating process, data transmission/reception between the card and the external apparatus and the like, and an IC card data transmission protocol controlling means. Incidentally, an application function such as edition or transmission of a command to the IC card is executed under control of the external apparatus. When the data (for example, balance information on electronic money) stored in the memory of the IC card is read/written by such the IC card R/W, the IC card R/W is connected to the external apparatus through the external communication interface and a communication cable. The user then inserts the IC card into the card inserting opening to read/write the information in the IC card under control of the external apparatus. When handling the IC card, the user prepares a balance reader to confirm a balance of electronic money. On the other hand, in order to read/write information in the IC card, the user prepares an IC card R/W. The user uses these devices each as occasion calls. However, preparing both of the balance reader and the IC card R/W is a considerable economical burden on the user. Additionally, a setting space to usually set the IC card R/W is required. EP-A-0 820 043 discloses a portable card unit processing apparatus according to the preamble of claim 1. This apparatus detects the existence of an external device (a modem) connected to a connecting terminal of the apparatus, and sets a direction of transferring electronic money information accordingly. EP-A-0 793 205 discloses a modem unit for use with an electronic wallet (portable card unit processing apparatus), in which the modem unit is removably mounted to card slots of the electronic wallet, and is provided with a through opening to communicate with the card slots. This allows a user to insert an IC card into the electronic wallet with the modem unit already mounted, so the electronic wallet has more flexible use. US-A-5 748 737 discloses an electronic wallet provided with a generic card and/or a generic attachment card for providing the wallet with various data carrier means and media interfaces. In the light of the above problems, an object of the present invention is to provide a portable card unit processing apparatus which can display data in a storage unit of a card unit or transfer data between the card unit and an external apparatus by switching the function according to a mode of the use. Disclosure of Invention According to the present invention, there is provided a portable-card-unit processing apparatus for processing data representing electronic money in a storage section of a card unit when the card unit is attached to said apparatus, comprising: a first communicating section for communicating with the card unit; an external communication interface providing a detachable connection to an external apparatus; a second communicating section for communicating with the external apparatus through said interface; a display section for displaying at least balance information of said electronic money from the storage section of the card unit through said first communicating section; and a control section including a connection determining section for determining, based on a connection information signal from said interface, whether the external apparatus is connected to said interface for controlling said first communicating section and said second communicating section so as to transfer data between the card unit and the external apparatus when the connection determining section determines that the external apparatus is connected to said interface: characterised in that: said control section is operable to control said first communicating section and said display section to read out said balance information from the storage section of the card unit and to display the balance information on said display section only when the connection determining section determines that the external apparatus is disconnected from said interface; and in that said apparatus further comprises a save storage section for holding transaction history information stored in the storage section of the card unit, said control section being further operable, only when the card unit is attached to said apparatus while the external apparatus is disconnected from said interface, to control said first communicating section to read said transaction history information from the storage section of the card unit and to store the transaction history information into said save storage section. Thus, to attain the above object, a portable card unit processing apparatus of this invention is attached to a card unit having a storage unit to process the card unit. The portable card unit processing apparatus comprises a first communicating section for communicating with the card unit, a connecting section (interface) detachably connected to an external apparatus, a second communicating section for communicating with the external apparatus through the connecting section, a display section for displaying at least data read out from the storage section of the card unit through the first communicating section for card unit, and a control section for such controlling the first communicating section and the second communicating section so as to transfer data between the card unit and the external apparatus while the external apparatus is connected to the connecting section, and controlling the first communicating section and the display section as to read out data from the storage section of the card unit and display the read-out data on the display section while the external apparatus is disconnected from the connecting section. Accordingly, in this portable card unit processing apparatus, data transfer between the card unit and the external apparatus, and readout of data from the storage section of the card unit for display on the display section can be switched according to conditions of connection of the external apparatus to the connecting section of the portable card unit processing apparatus. The user thus does not need to separately prepare the devices having these functions, which is economical. Additionally, it is possible to decrease a space to install the apparatus. The control section comprises a connection determining section for determining on the basis of a connection information signal from the connecting section whether the external apparatus is connected to the connecting section. It is thereby possible to readily determine conditions of connection of the external apparatus to the connecting section so that the operator does not need to determine a state of connection of the connecting section, which leads to improvement of the operability. When the card unit storing electronic money defined as an electronic symbol of currency in the storage section is attached while the external apparatus is disconnected from the connecting section, the control section controls the first communicating section and the display section so as to read out balance information on the electronic money from the storage section of the card unit and to display the balance information on the display section. In a status where the external apparatus is disconnected from the connecting section, this apparatus is thus used to display balance information on electronic money. The portable card unit processing apparatus also comprises a save storage section being able to hold transaction history information stored in the storage section of the card unit, and the control section may such control the first communicating section as to read out the transaction history information from the storage section of the card unit and store the same in to the save storage section when the card unit is attached with the apparatus while the external apparatus is disconnected from the connecting section, thereby saving the transaction history information in the storage section of the card unit in the save storage section. It is therefore possible to hold the transaction history information even when the storage capacity of the storage section of the card unit is small. When the card unit is attached to the apparatus while the external apparatus connected to the connecting section, the control section may such control the second communicating section to transfer the transaction history information stored in the save storage section to the external apparatus. When a request to transfer the transaction history information is received from the external apparatus, the control section controls the second communicating section to transfer the transaction history information stored in the save storage section to the external apparatus. It is thereby possible to usethe transaction history information in the storage section of the save unit saved in the save storage section in the external apparatus. Thus, when the card is attached to the apparatus, transaction information on the electronic money may be read out from the storage section and stored in the save storage section, whereby the transaction information on the electronic money is saved in the save storage section. It is thereby possible -to hold the transaction information on electronic money even when the storage capacity of the storage section of the card unit is small. The save storage section may be a non-volatile memory. Even when power supply to the portable card unit processing apparatus is shut down, it is possible to protect the at least part of information held in the save storage section. Brief Description of Drawings Fig. 1 is a block diagram showing a structure of a portable card unit processing apparatus useful for understanding this invention; Fig. 2 is a schematic diagram for illustrating the structure of the portable card unit processing apparatus of Fig. 1 ; Fig. 3 is a flowchart for illustrating operations of the portable card unit processing apparatus of Fig. 1 ; Fig. 4 is a sequence diagram for illustrating commands and responses transmitted/received between the portable card unit processing apparatus of Fig. 1 and a card unit; Fig. 5 is a block diagram showing a structure of a portable card unit processing apparatus according to an embodiment of this invention; and Fig. 6 is a flowchart for illustrating operations of the portable card unit processing apparatus according to the embodiment of this invention. Before describing an embodiment of the invention, an apparatus useful for understanding the invention will first be described. Fig. 1 is a block diagram showing a structure of an IC card processing apparatus (portable card unit processing apparatus) 10. Fig. 2 is a schematic diagram illustrating its structure. Incidentally, this apparatus will be described in which a card unit is an IC card used as a portable medium for electronic money defined as an electronic symbol of currency, and the apparatus is an IC card processing apparatus which processes data in the IC card. Here, a memory (storage section) 17a is packaged in an IC card (card unit) 17 as shown in Fig. 2. In the memory 17a, there are stored a kind of electronic money, user information, use history and the like. The IC card 17 comprises a microprocessor not shown, which can control data transmission or process a cipher. On the surface of the IC card 17 formed is a contact 17b to transmit/receive data between this apparatus 10 and an ATM of a bank, a POS terminal of a retail shop or an electronic money using device such as an automatic vending machine or the like. Meanwhile, various processes in the IC card 17 are performed by programs formed into hardware called firmware on a chip. The IC card processing apparatus 10 of Fig. 1 is attached to the IC card 17 to process the IC card 17. As shown in Fig. 2, the IC card processing apparatus 10 comprises an IC card inserting unit 11 into which the IC card 17 is inserted. The IC card processing apparatus 10 has a display unit (display section) 13 on its surface to display display data including data read out from the memory 17a of the IC card 17 (at least data read out from the memory 17a of the IC card 17). A contact terminal 12 is formed inside the IC card inserting unit 11 at a position to contact with the contact 17b of the IC card 17. When the IC card 17 is inserted into the IC card inserting unit 11, the contact 17b of the IC card 17 is electrically connected to the contact terminal 12. This apparatus 10 also comprises an MPU (Microprocessor Unit : control section) 20, an RAM (Random Access Memory) 22, a contact terminal control unit (first communicating section) 23, an ROM (Read Only Memory : second communicating section) 24, a communication control LSI (Large Scale Integrated Circuit) 26 and an external communication interface (connecting section) 14 other than the above display unit (display section) 13. The MPU 20 executes various firmware and an application 246 stored in the ROM 24, which functions as a control section, as will be described later. The RAM 22 develops data or the like when the MPU 20 processes it. Various programs formed into hardware, called firmware, used to operate this apparatus 10 are beforehand stored in the ROM 24. By reading out the firmware from the ROM 24 and executing it, the MPU 20 functions as an IC card charge/discharge control unit 241, a basic processing unit 242, an IC card communication control unit 243, a communication control unit (connection determining section) 244 and a data transmission/reception protocol processing unit 245, as will be described later. In Fig. 1, the IC card charge/discharge control unit 241, the basic processing unit 242, the IC card communication control unit 243, the communication control unit 244 and the data transmission/reception protocol processing unit 245 formed into hardware by firmware are arranged in the ROM 24 for the sake of convenience. The IC card charge/discharge control unit 241 controls charge and discharge of the IC card 17. The basic processing unit 242 controls basic operations of this apparatus 10, particularly, controls an operation at the time of off-line and operations relating to the display unit 13 and the like excepting the IC card 17. The IC card communication control unit 243 controls the contact terminal control unit 23 to be described later to control communications with the IC card 17 through the contact terminal 12. The communication control unit 244 controls the communication control LSI 26 to be described later. The communication control unit 244 controls transmission/reception of commands, data and the like between the personal computer 15 and this apparatus 10 when this apparatus 10 is connected to the personal computer (external apparatus) through the external communication interface 14 to be described later. The communication control unit 244 gets confirmation of whether the external apparatus (the personal computer 15 in this embodiment) is connected or not from the external communication interface 14 through the communication control LSI 26. When the external apparatus is connected, the external communication interface 14 transmits a CD (Connection Detective) signal (connection information signal) to the communication control unit 244. The communication control unit 244 determines according to the CD signal whether the personal computer 15 is connected to the external communication interface 14 or not. In concrete, when the CD signal is transmitted (at the time of ON), the communication control unit 244 determines that the personal computer 15 is connected. When the CD signal is not transmitted (at the time of OFF), the communication control unit 244 determines that the personal computer 15 is not connected (disconnected). The communication control section 244 thus functions as a connection determining section. The data transmission/reception protocol processing unit 245 controls a protocol for data transmission when data is transmitted/received to/from the IC card 17. For example, when this apparatus copes with protocols of plural kinds of the IC card ("T=0", "T=1" and the like), the data transmission/reception protocol processing unit 245 can absorb a difference between these protocols. The external communication interface 14 is a connector provided according to a standard of RS 232C or the like. The external communication interface 14 is detachably connected to the personal computer 15 using a communication cable 16 or the like to transmit/receive data through the communication control LSI 26. The external communication interface 14 thus functions as a connecting section detachably connected to the personal computer 15. This apparatus 10 is portably formed. When this apparatus 10 is disconnected from the personal computer 15 or the like by the communication cable 16 or the like, this apparatus 10 can be freely carried. The communication control LSI 26 controls the external communication interface 14, operations of which is controlled by the communication control unit 244. Here, the communication control LSI 26 and the communication control unit 244 function as a second communicating section which communicates with the personal computer 15 through the external communication interface 14. The contact terminal control unit 23 activates the IC card 17, reads information such as balance information on electronic money, transaction history information, customer information and the like stored in the memory 17a of the IC card 17, and rewrites specific information (at least part of information stored in the memory 17a) such as the transaction history information, customer information or the like through the contact terminal 12. The contact terminal control unit 23 is controlled by the IC card communication control unit 243. In the apparatus of Fig. 1, the contact terminal control unit 23 and the above-described IC card communication control unit 243 function as a first communicating section which communicates with the IC card 17. In the ROM 24 stored in the application 246 for such controlling the contact terminal control unit 23 and the IC card communication control unit 243 as to read data, that is, balance information on electronic money or the like, stored in the memory 17a of the IC card 17 and display the balance information or the like on the display unit 13. The MPU 20 reads the application 246 from the ROM 24 and executes it, whereby this apparatus 10 functions as a balance reader. When the communication control unit 244 determines that this apparatus 10 is disconnected from the personal computer 15 (when the CD signal is OFF), the MPU 20 executes the application 246 to make this apparatus 10 function as a balance reader. When this apparatus 10 functions as a balance reader, the MPU 20 reads information, that is, balance information on electronic money or the like, stored in the memory 17b of the IC card 17 through the contact terminal 12 and the contact 17b of the IC card 12 by means of the contact terminal control unit 23 according to the application 246, and displays the read balance information or the like on the display unit 13 by means of the basic processing unit 242. When the communication control unit 244 determines that this apparatus 10 is connected to the personal computer 15 (when the CD signal is ON), the MPU 20 does not execute the application 246, but such controls the contact terminal control unit 23 and the IC card communication control unit 243 as to transfer data between the IC card 17 and the personal computer 15, thus this apparatus 10 functions as an IC card R/W under control of the personal computer 15. When this apparatus 10 functions as an IC card R/W, the contact terminal control unit 23 reads information such as balance information on electronic money, transaction history information or the like stored in the memory 17a of the IC card 12, or writes user information, cipher information or the like in the memory 17a of the IC card 17 through the contact terminal 12 and the contact 17b of the IC card 17. Next description will be made of operations of the IC card processing apparatus (portable card unit processing apparatus) 10 according to a flowchart (steps A1 to A19) shown in Fig. 3 with reference to Fig. 4. Incidentally, Fig. 4 is a sequence diagram for illustrating commands and responses transmitted/received between the IC card processing apparatus 10 and the IC card 17. When the operator inserts the IC card 17 into the IC card inserting unit 11 (step A1), the contact 17b of the IC card 17 is electrically connected to the contact terminal 12, and the MPU 20 activates the IC card 17 by means of the contact terminal control unit 23 (step A2). The MPU 20 determines whether the activating process on the IC card 17 has been normally performed or not (step A3). When the activation has not been normally performed (refer to NO route at step A3), the MPU 20 makes the basic processing unit 242 display an error message that the activation of the IC card 17 has not been normally performed on the display unit 13. When the activation has been normally performed and a normal ATR (Answer To Reset) has been received from the IC card 17 (refer to YES route at step A3), the MPU 20 examines the CD signal through the communication control LSI 26 by means of the communication control unit 244 (step A4). When the CD signal is ON (refer to YES route at step A4), the MPU 20 determines that the personal computer 15 is connected to this apparatus 10, and brings the communication control LSI 26 into a receivable status by the control communication unit 244 in order to function as an IC card R/W under control of the personal computer 15 (receive enabling process ) (step A5). The MPU 20 then notifies of a status (command input wait status) where the MPU 20 waits for an input of a command the application of the personal computer 15 through the external communication interface 14 and the communication cable 16 by means of the communication control unit 244 (step A6). The MPU 20 determines by means of the communication control unit 244 whether any data is transmitted from the personal computer 15 (step A7). When any data is not transmitted from the personal computer 15 (refer to NO route at step A7), the MPU 20 again performs step A7, then is brought into the command wait status. When the MPU 20 receives data from the personal computer 15 by means of the communication control unit 244 (refer to YES route at step A7), the MPU 20 determines by means of the communication control unit 244 whether the received data is a command to the IC card 17 or not (step A8). When the received data is not a command to the IC card 17 (refer to NO route at step A8), the MPU 20 determines by means of the communication control unit 244 whether the received data is a process terminate notification or not (step A12). When the received data is a process terminate notification (refer to YES route at step A12), the MPU 20 waits that the user pulls out the IC card 17 from the IC card inserting unit 11 by means of the IC card charge/discharge control unit 241 (step A13). When the received data is not a process terminate notification (refer to NO route at step A12), the MPU 20 determines that any error has occurred and data not expected has been transmitted from the personal computer 15, and makes the basic processing unit 242 display an error message of it on the display unit 13. When the received data is a command to the IC card 17 (refer to YES route at step A8), the MPU 20 transmits the received command to the IC card communication control unit 243 through the data transmission/reception protocol 245, and the IC card communication control unit 243 transmits the command to the IC card 17 through the contact terminal control unit 23, as shown by an arrow C1 in Fig. 4 (step A9). The MPU 20 receives a response to the personal computer 15 from the IC card 17 through the data transmission/reception protocol processing unit 245 by means of the IC card communication control unit 243, as shown by an arrow C2 in Fig. 4 (step A10). The MPU 20 then transmits the response to the personal computer 15 to the communication control unit 244 through the data transmission/reception protocol processing unit 245. The MPU 20 brings the communication control LSI 26 into a transmittable status by means of the communication control unit 244 (transmit enabling process). After that, the MPU 20 transmits response data from the IC card 17 to the personal computer 15 (step A11). The MPU 20 returns to step A7, then repeats transmission of commands (refer to arrows C3, C5 and C8 in Fig. 4) and reception of response data (refer to arrows C4, C6, C7, and C9 to C11 in Fig. 4) with the IC card 17 under control of the personal computer 15, as shown by the arrows C3 to C11 in Fig. 4. Namely, in a status where the external apparatus (personal computer 15) is connected to the external communication interface 14, this apparatus 10 fulfils a driver function for transmission and reception of commands and responses between the application of the personal computer 15 and the IC card 17. When the CD signal is OFF (refer to NO route at step A4), the MPU 20 determines that this apparatus 10 is disconnected from the external apparatus, and activates the application 246 by means of the basic processing unit 242 (step A14). Then, the MPU 20 creates a command to be transmitted to the IC card 17 according to the application 246 (step A15), and transmits this command to the IC card communication control unit 243 through the data transmission/reception protocol processing unit 245. The MPU 20 transmits the command to the IC card 17 through the contact terminal control unit 23 by means of the IC card communication control unit 243 (step A16). The MPU 20 receives data transmitted from the IC card 17 through the data transmission/reception protocol processing unit 245 by means of the IC card communication control unit 243 (step A17). After that, the MPU 20 determines whether there is an input or the like signifying that the process is terminated (step A18). When the process is not terminated (refer to NO route at step A18), the MPU 20 returns to step A15. At the above steps A14 to A17, commands (arrows C1, C3, C5 and C8) are transmitted from this apparatus 10 to the IC card 17, and responses (arrows C2, C4, C6, C7, and C9 to C11) to these command are transmitted from the IC card 17 to this apparatus 10, as shown in Fig. 4. Whereby, a specific application in the application 246 is activated in the apparatus 10, or balance information, a transaction history (deposit log, credit log) or the like stored in the memory 17a of the IC card 17 is displayed on the display unit 13, for example. Namely, in a status where the external apparatus (personal computer 15) is disconnected from the external communication interface 14, from the driver function for functioning as a balance reader to the application are completed in the ROM 24 of this apparatus 10, and this apparatus 10 functions as a balance reader to read data such as balance information or the like from the memory 17a of the IC card 17 and display it on the display unit 13. When there is an input signifying that the process is terminated (refer to YES route at step A18), the IC card charge/discharge control unit 241 waits that the operator pulls out the IC card 17 from the IC card inserting unit 11 (step A19). According to the portable card unit processing apparatus of Fig. 1, the communication control unit 244 (MPU 20) determines according to the CD signal whether the personal computer 15 is connected to the external communication interface 14 or not. In a status where the personal computer 15 is disconnected from the external communication interface 14, this apparatus functions as a balance reader to read data such as balance information or the like from the IC memory 17a of the IC card 17 and display it on the display unit 13. In a status where the personal computer 15 is connected to the external communication interface 14, this apparatus functions as an IC card R/W to transfer data between the IC card 17 and the personal computer 15. Thus, the operator does not need to prepare both devices, that is, the balance reader and the IC card R/W, which is economical. When this apparatus is used as an IC card R/W, this apparatus requires only a small space to be disposed, and it is unnecessary to secure the space usually. This apparatus functions as either a balance reader or an IC card R/W according to whether the personal computer (external apparatus) 15 is connected to the external communication interface 14 or not, whereby the operator does not need to separately use the balance reader and the IC card W/R, which leads to good operability. An embodiment of the invention will now be described. Fig. 5 is a block diagram showing a hardware structure of an IC card processing apparatus (portable card unit processing apparatus) 10' according to an embodiment of this invention. The IC card processing apparatus 10' shown in Fig. 5 is an IC card processing apparatus which processes an IC card (card unit) used as a portable medium for electronic money that is defined as an electronic symbol of currency, like the IC card processing apparatus 10 according to Fig. 1. The IC card processing apparatus 10' is attached to the IC card 17 to process it. The portable card unit processing apparatus 10' according to the embodiment of this invention comprises a non-volatile memory (save storage section) 30 in the portable card unit processing apparatus 10 shown in Fig. 1, and an ROM 24' instead of the ROM 24. Incidentally, like reference characters designate like or corresponding parts having been described above, detailed descriptions of which are thus omitted. The non-volatile memory 30 functions as a save storage section which can hold specific information in the memory 17a of the IC card 17, which is configured with a non-volatile RAM, for example. Information stored in the non-volatile memory 30 is not lost even when the power source of this apparatus 10' is turned off. In the ROM 24' stored is an application 246' instead of the application 246 shown in Fig. 1. The MPU 20 reads out the application 246' from the ROM 24', whereby this apparatus 10' functions as a balance reader. The MPU 20 executes the application 246', whereby the application 246' realizes a function similar to that of the application 246 according to the Fig. 1 apparatus. When the IC card 17 is attached with the personal computer 15 disconnected from the external communication interface 14, the MPU 20 controls the contact terminal control unit 23 and the IC card communication control unit 243 to read out transaction information (transaction history information) on electronic money stored in the memory 17a of the IC card 17, and store it in the non-volatile memory 30. When the IC card 17 is attached with the personal computer 15 connected to the external communication interface 14, the application 246' makes the MPU 20 control the communication control LSI 26 and the communication control unit 244 to transfer transaction history information stored in the non-volatile memory 30 to the personal computer 15. In particular, when a demand to transfer transaction history information stored in the non-volatile memory 30 is received from the personal computer 15, the transaction history information is transferred to the personal computer 15. According to the present invention, when the IC card 17 is inserted into the IC card inserting unit 11 while the personal computer 15 is disconnected from the external communication interface 14, the MPU 20 reads out transaction information (namely, transaction history information) on electronic money stored in the memory 17a of the IC card 17 from the memory 17a, and stores it in the non-volatile memory 30 by means of the basic processing unit 242 according to the application 246. When the IC card 17 is inserted into the IC card inserting unit 11 while the personal computer 15 is connected to the external communication interface 14, the MPU 20 controls the communication control LSI 26 and the communication control unit 244 to transfer transaction history information stored in the non-volatile memory 30 to the personal computer 15 by means of the basic processing unit 242 according to the application 246. Next, operations of the portable card unit processing apparatus 10' in the above structure according to the embodiment of this invention will be described with reference to a flowchart (steps B1 to B22) shown in Fig. 6. When the operator inserts the IC card 17 into the IC card inserting unit 11 of this apparatus 10' (step B1), the contact 17b of the IC card 17 is electrically connected to the contact terminal 12, and the MPU 20 activates the IC card 17 by means of the contract terminal control unit 23 (step B2). The MPU 20 determines whether the activating process on the IC card 17 has been normally performed or not (step B3). When the activation has not been normally performed (refer to NO route at step B3), the basic processing unit 242 displays an error message that the activation of the IC card 17 has not been normally performed on the display unit 13. When the activation has been normally performed and a normal ATR (Answer To Reset) has been received from the IC card 17 (refer to YES route at Step B3), the MPU 20 examines a CD signal through the communication control LSI 26 by means of the communication control unit 244 (step B4). When the CD signal is ON (refer to YES route at step B4), the MPU 20 determines that the personal computer 15 is connected to the external communication interface 14, and brings the communication LSI 26 into a receivable status by means of the communication control unit 244 in order that this apparatus 10' functions as an IC card R/W under control of the personal computer 15 (receive enabling process) (step B5). The MPU 20 notifies the application of the personal computer 15 through the external communication interface 14 and the communication cable 16 by means of the communication control unit 244 that the MPU 20 is in a command input wait status (command input wait status) (step B6). The MPU 20 determines by means of the communication control unit 244 whether any data is transmitted from the personal computer 15 (step B7). When any data is not transmitted from the personal computer 15 (refer to NO route at step B7), the MPU 20 again carries out step B7, and is brought into the command wait status. When the communication control unit 244 receives any data from the personal computer 15 (refer to YES route at step B7), the MPU 20 determines by means of the communication control unit 244 whether the received data is a command to the IC card 17 or not (step B8). When the received data is not a command to the IC card 17 (refer to NO route at step B8), the MPU 20 determines whether the received data is a request to transfer transaction history information stored in the non-volatile memory 30 to the personal computer 15 or not (step B12). When the received data is a request to transfer transaction history information to the personal computer 15 (refer to YES route at step B12), the MPU 20 controls the basic processing unit 242 to transfer the transaction history information stored in the non-volatile memory 30 to the personal computer 15 through the external communication interface 14 by means of the communication control unit 244 and the communication control LSI 26 according to the application 246' (step B13), and returns to step B7. When the received data is not a request to transfer the transaction history information to the personal computer 15 (refer to NO route at step B12), the MPU 20 further determines by means of the communication control unit 244 whether the received data is a process terminate notification or not (step B14). When the received data is a process terminate notification (refer to YES route at step B14), the MPU 20 waits by means of the IC card charge/discharge control unit 241 that the user pulls out the IC card 17 from the IC card inserting unit 11 (step B15). When the received data is not a process terminate notification (refer to NO route at step B14), the MPU 20 determines that an error has occurred and data not expected has been transferred from the personal computer 15, and makes the basic processing unit 242 display a message of it on the display unit 13. When the received data is a command to the IC card 17 (refer to YES route at step B8), the MPU 20 transmits the received command to the IC card communication control unit 243 through the data transmission/reception protocol 245, and the IC card communication control unit 243 transmits the command to the IC card 17 through the contract terminal control unit 23, as shown by an arrow C1 in Fig. 4 (step B9). The MPU 20 then receives a response to the personal computer 15 from the IC card 17 through the data transmission/reception protocol processing unit 245 by means of the IC card communication control unit 243 (step B10). Further, the MPU 20 transmits the response to be transmitted to the personal computer 15 to the communication control unit 244 through the data transmission/reception protocol processing unit 245. The MPU 20 brings the communication control LSI 26 into a transmittable status by means of the communication control unit 244 (transmit enabling process ) , after that, transmits response data received from the IC card 17 to the personal computer 15 (step B11). The MPU 20 returns to step B7, and repeats transmission of commands and reception of response data with the IC card 17 under control of the personal computer 15. Namely, in a status where the external apparatus (personal computer 15) is connected to the external communication interface 14, this apparatus 10' fulfils a driver function to transmit and receive commands and responses between the application of the personal computer 15 and the IC card 17. On the other hand, when the CD signal is OFF (refer to NO route at step B4), the MPU 20 determines that the external apparatus is disconnected, and activates the application 246 by means of the basic processing unit 242 (step B16). The MPU 20 then creates a command to be transmitted to the IC card 17 according to the application 246 (step B17), and transmits this command to the IC card communication control unit 243 through the data transmission/reception protocol processing unit 245. The MPU 20 transmits the command to the IC card 17 through the contract terminal control unit 23 by means of the IC card communication control unit 243 (step B18), and receives data transmitted from the IC card 17 through the data transmission/reception protocol processing unit 245 by means of the IC card communication control unit 243 (step B19). The MPU 20 reads out transaction history information stored in the memory 17a of the IC card 17 by means of the basic processing unit 242 according to the application 246', and stores it in the non-volatile memory 30 (step B20). After that, the MPU 20 determines whether there is an input or the like signifying that the process is terminated (step B21). When the process is not terminated (refer to NO route at step B21), the MPU 20 returns to step B17. At steps B17 to B21, this apparatus 10' activates a specific application in the application 246, displays balance information, a transaction history (credit log, debit log) or the like stored in the memory 17a of the IC card 17 on the display 13, or saves transaction history information stored in the memory 17a of the IC card 17 into the non-volatile memory 30, for example. According to the present invention, in a status where the external apparatus (personal computer 15) is disconnected from the external communication interface 14, from the driver function by which this apparatus 10' functions as a balance reader to the application are completed in the ROM 24 of this apparatus 10, and this apparatus 10' functions as a balance reader to read out data such as balance information or the like from the memory 17a of the IC card 17 and display it on the display unit 13, similarly to the Fig. 1 apparatus. When an input signifying that the process is terminated is received (refer to YES route at step B21), the MPU 20 waits by means of the IC card charge/discharge control unit 241 until the operator pulls out the IC card 17 from the IC card inserting unit 11 (step B22). The portable card unit processing apparatus 10' according to the embodiment of this invention can provide similar functions and effects to those provided in the Fig. 1 apparatus. Additionally, when the IC card 17 is attached with the personal computer 15 disconnected from the external communication interface 14, the MPU 20 such controls the contact terminal control unit 23 and the IC card communication control unit 243 as to read out transaction information (transaction history information) on electronic money stored in the memory 17a of the IC card 17, and store it in the non-volatile memory 30, thereby saving the transaction history information on electronic money stored in the storage unit 17a of the IC card 17 into the non-volatile memory 30. It is therefore possible to securely hold the transaction history information on electronic money even when a storage capacity of the storage unit of the memory 17a of the IC card 17 is small. When the IC card 17 is attached with the personal computer 15 connected to the external communication interface 14, the MPU 20 such controls the communication control LSI 26 and the communication control unit 244 to transfer transaction history information stored in the non-volatile memory 30 to the personal computer 15. In particular, when receiving a request to transfer transaction history information stored in the non-volatile memory 30 from the personal computer 15, the MPU 20 transfers the transaction history information to the personal computer 15. Thus, it is possible to transfer transaction history information on electronic money saved in the non-volatile memory 30 to the personal computer 15, which allows effective use of the transaction history information on electronic money in an application (for example, software for a housekeeping account-book or the like) of the personal computer 15. Since the transaction history information on electronic money stored in the memory 17a of the IC card 17 is saved in the non-volatile memory 30, it is possible to protect the transaction history information saved in the non-volatile memory 30 even when electric power supply to the portable card unit processing apparatus 10' is shut down. (c) Others Note that this invention is not limited to the above examples, but may be modified in various ways without departing from the scope of the invention. For example, the MPU 20 determines whether the personal computer (external apparatus) 15 is connected to the external communication interface 14 by examining the CD signal through the communication control LSI 26 in the first and second embodiments. However, this invention is not limited to this, but a signal for confirming the connection may be transmitted from the external apparatus, for example. In the above first and second embodiments, the MPU 20 determines whether the personal computer (external apparatus) 15 is connected to the external communication interface 14 by examining the CD signal through the communication control LSI 26, and functions as either a balance reader or an IC card R/W according to the CD signal (ON/OFF). This invention is not limited to this, but these functions may be switched by turning a switch or the like by the user, for example. In the above embodiment, when the external apparatus such as the personal computer 15 or the like makes a transfer request, the transaction history information stored in the non-volatile memory 30 is transferred to the personal computer 15. However, this invention is not limited to this, but the transaction history information stored in the non-volatile memory 30 may be forcedly transferred to the personal computer 15 when predetermined conditions are satisfied. Further, in the above embodiment , the card unit is an IC card. However, this invention is not limited to this , but may be applied to another card such as an optical memory card, a radio card or the like so long as it contains a storage unit, and provide the similar functions and effects to those provided in the above embodiment. Industrial Applicability As above, the portable card unit processing apparatus according to this invention is attached to a card unit having a storage unit, and is useful to process the card unit. Particularly, this portable card unit processing apparatus is suitable to process a card unit storing electronic money defined as an electronic symbol of currency in the storage unit.

Claims: A portable-card-unit processing apparatus for processing data representing electronic money in a storage section (17a) of a card unit (17) when the card unit (17) is attached to said apparatus, comprising: a first communicating section (23 , 243) for communicating with the card unit (17); an external communication interface (14) providing a detachable connection to an external apparatus (15); a second communicating section (24, 244) for communicating with the external apparatus (15) through said interface (14); a display section (13) for displaying at least balance information of said electronic money from the storage section (17a) of the card unit (17 ) through said first communicating section (23, 243); and a control section (20) including a connection determining section (244) for determining, based on a connection information signal from said interface (14), whether the external apparatus (15) is connected to said interface (14) for controlling said first communicating section (23, 243) and said second communicating section (24, 244) so as to transfer data between the card unit (17) and the external apparatus (15) when the connection determining section (244) determines that the external apparatus (15) is connected to said interface (14): characterised in that : said control section (20) is operable to control said first communicating section (23, 243) and said display section (13) to read out said balance information from the storage section (17a) of the card unit (17) and to display the balance information on said display section (13) only when the connection determining section (244) determines that the external apparatus (15) is disconnected from said interface (14) ; and in that said apparatus further comprises a save storage section (30) for holding transaction history information stored in the storage section (17a) of the card unit (17), said control section (20) being further operable, only when the card unit (17) is attached to said apparatus while the external apparatus (15) is disconnected from said interface (14) , to control said first communicating section (23, 243) to read said transaction history information from the storage section (17a) of the card unit (17) and to store the transaction history information into said save storage section (30). The portable-card-unit processing apparatus according to claim 1, wherein, when the card unit (17) is attached to said apparatus while the external apparatus (15) is connected to said interface (14), said control section (20) controls said second communicating section (24, 244) as to transfer said transaction history information, which is stored in said save storage section (30), to the external apparatus (15) . The portable-card-unit processing apparatus according to claim 2, wherein, upon receipt of a request from the external apparatus (15) for transfer of said transaction history information, said control section (20 ) controls said second communicating section (24, 244) as to transfer said transaction history information, which is stored in said save storage section (30), to the external apparatus (15). The portable-card-unit processing apparatus according to any one of claims 1 to 3, wherein when said card unit (17) is attached, transaction information on said electronic money is read out from said storage section (17a) and stored with said transaction history information in said save storage section (30). The portable-card-unit processing apparatus according to any one of claims 1 to 3, wherein said save storage section (30) is a non-volatile memory.

Inventors: HASHIMOTO SHIGERU, ONO AKIKO, HASHIMOTO, SHIGERU, ONO, AKIKO, Hashimoto, Shigeru, c/o Fujitsu Limited, ONO, Akiko, c/o Fujitsu Ltd
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1999
Main classification: G06K17
IPC codes: G06K19, G06K17, G07F7