Electronic equipment operable by a plurality of control programs

Abstract: An electronic equipment comprises a memory for storing information necessary for the execution of control programs and identification information which identify the control programs, first check means for determining whether the identification information of the control program to be executed is equal to the identification information stored in the memory, second check means for determining whether there is a vacant area in the memory when the decision by the first check means indicates non-equality, and a control unit for storing the information necessary for the control program to be executed in the memory together with the identification information thereof when the second check means detects a vacant area.

Description: The present invention relates to a method of operating electronic equipment and to an electronic equipment which is operable by a plurality of control programs even if initial settings required by the respective control programs are different. In electronic equipment whose operation is controlled by a microprocessor, it is not rare to provide a non-volatile RAM (NVRAM) or an electrically erasable programmable ROM (EEPROM) instead of dip switches and retain various initial settings necessary for the initialization upon power-on in the RAM in order to attain quick initialization at the power-on. Since the stored content of the NVRAM is not destroyed by the power-off, the NVRAM may function as the dip switches and it is cheaper than the dip switches. Further, the stored content may be altered by a panel switch or an instruction from a host computer. In a printer which is an example of the electronic equipment, data such as a communication protocol, an architecture of equipment control commands, character font of print characters and an architecture of character codes are stored in the NVRAM as the initial settings and they are used for the initial settings at power-on. However, in the past, the NVRAM has been used for the initial settings at the power-on in only an electronic equipment in which the microprocessor performs only one or a very limited range of control functions. Where a control program is loaded in a program cartridge which is pluggable to the electronic equipment so that the electronic equipment may have multi-functions and multi-applications by a plurality of different control programs, the following problems arise in the initial setting of the control programs at power-on. The initial values required to be stored in the NVRAM in order to permit rapid initialization at the power-on are not always the same for the respective control programs. Rather, it is normal that the control programs differ from each other to some extent. For example, some program may need totally different information items or the initial values may be different even if the items are same. Because of a limited capacity of the NVRAM, it is impossible, as the number of control programs increases, to store all initial values for all control programs which may be used, in the NVRAM. Further, it is more difficult to store the initial values for control programs which will be developed in future, at the time of the development of the electronic equipment. It is an object of the present invention to provide an electronic equipment which is operable by a plurality of control programs and which stores information required by the respective control programs in the equipment for each program and is flexibly compatible to a control program whose required information is not stored. It is another object of the present invention to provide an electronic equipment which stores necessary information in a vacant area when a control program which does not retain the necessary information in the equipment is to be executed. It is a further object of the present invention to provide an electronic equipment which overwrites necessary information for a control program upon instruction when the control program which does not retain the necessary information in the equipment is to be executed and there is no vacant area in a memory of the equipment. It is still another object of the present invention to provide an electronic equipment which can readily cope with modification of necessary initial settings due to future expansion of a function of the control program or a change of specification. A method of operating an electronic equipment capable of executing each one of a plurality of alternative control programs which is in accordance with the present invention is defined in claim 1 of the claim appended. Also, an electronic equipment which is operable using any one of a plurality of alternative control programs which too is in accordance with the present invention is defined in claim 4 of the claims appended. The features recited in the preambles of claims 1 and 4 also are known from Patent Abstracts of Japan Vol. 12 No. 458 (p-794)(3305), Dec 2, 1988 and Japanese Kokai JP-A-63 181056. Therein is described an electronic equipment in which control program instructions, control program identification information and initial data, each for a number of different control programs are pre-loaded into an internal memory. The appropriate control program instructions and initial data are selected and loaded into a main memory of the equipment following comparison of a user defined control program identification information stored on an ID card with control program identification information stored in the internal memory. Other objectives and advantages, besides those discussed above, shall be apparent to those skilled in the art from the description of a preferred embodiment of the invention which follows. In the description, reference is made to accompanying drawings, which form a part thereof, and which illustrate an example of the invention. Such example, however, is not exhaustive of the various embodiments of the invention, and therefore reference is made to the claims which follow the description for determining the scope of the invention. In the accompanying drawings: Fig. 1 shows a block diagram of one embodiment of the electronic equipment of the present invention ; Fig. 2 shows a storage area of a NVRAM in an unused state ; Fig. 3 shows the storage area of the NVRAM in a used state ; and Fig. 4 shows a flow chart of a control sequence at start-up. The preferred embodiments of the present invention are now explained in detail with reference to the drawings. The following description is given by way of example only. Fig. 1 shows one embodiment of the present invention. Numeral 1 denotes an electronic equipment such as a printer. Numeral 2 denotes a control unit mounted on the equipment to control an operation of the equipment. The control unit 2 comprises a central processing unit (CPU) 3, a DRAM 4 used as a work area when the CPU 3 performs a control operation, and a NVRAM for storing initial data necessary for the initialization when the equipment 1 is powered on. Numeral 6 denotes a display unit connected to the CPU 3 for displaying a status of the equipment 1 or indicating an operational instruction to a user of the equipment 1. Numeral 7 denotes a console unit for generating a command signal to the CPU by the manipulation of the user. In the present embodiment, the display unit 6 and the console unit 7 are arranged on the equipment 1 although they may be arranged on a host computer or other monitoring and displaying apparatus electrically connected to the equipment 1. Numeral 8 denotes a program cartridge pluggable to the equipment 1 and it contains a program ROM 9 to control the equipment. Numeral 91 denotes an identification code (ID) of the program ROM 9. Fig. 2 shows a content of a data storage area of the NVRAM 5 in the control unit 2 at the shipment from a plant, that is, in a unused state. In the present embodiment, the NVRAM 5 has four data storage areas 51, 52, 53 and 54 having different program identification code areas. Thus, different initial data of four program cartridges 8 may be stored in the NVRAM 5. The program ID indicates which information of the program cartridge 8 is stored in the storage area having the program ID. When the program ID is 0 as shown in Fig. 2, it indicates that the storage area is unused. Fig. 3 shows that the storage areas 51 and 52 of the four storage areas of the NVRAM 5 shown in Fig. 2 are in a used state. Namely, the storage area 51 which has the program ID "A" contains information items 11 to 1m such as initial data for the control program stored in the program ROM 91 having the program ID 91 "A" contained in the program cartridge 8. Similarly, the storage area 52 having the program ID "B" contains information items 21 to 2n such as initial data for the control program having the program ID 91 "B". The n and m may be equal so that the storage areas for the respective programs are of fixed length, or the n and m may be any values so that the storage areas are of variable length. The program ID's of the storage areas 53 and 54 are "0" indicating that they are unused. Fig. 4 shows an example of an initialization control sequence when the equipment 1 of the present embodiment is powered on. S1 to S11 denote steps in the flow chart. In the equipment 1 of the present embodiment shown in Fig. 1, when the power is turned on, the CPU 3 reads the program ID 91 of the program ROM 9 in the program cartridge 8 (step S1). Program ID other than "0" is assigned to each of the program cartridges 8 which contain the program ROM's 9 which store the control programs therein. Then, the program ID of the first storage area 51 of the NVRAM 5 is read (step S2). As described above, the program ID is "0" when the storage area is unused. At the time of shipment of the equipment 1 from a plant, all storage areas are unused. In a step S3, the program ID of the program cartridge 8 read in the step S1 is compared with the program ID of the storage area of the NVRAM 5 which is currently being read to check the equality thereof. If the decision is affirmative, it means that the initial data necessary for the execution of the control program stored in the program ROM 9 of the program cartridge 8 is already in the NVRAM 5, and the process is terminated and other initialization process is carried out. If the decision is negative, whether the program in the NVRAM 5 is "0" or not is determined (step S4). If the decision is negative and the program ID of the storage area read from the NVRAM 5 is not "0", it means that the information for other program cartridge is stored, and the process proceeds to a step S5. In a step S5, whether the program ID of the next storage area is stored in the NVRAM 5 or not is determined. If the decision is affirmative, the process proceeds to a step S6 to read the program ID of the next storage area. Then, the process returns to the step S3 to check whether the program ID in the program cartridge 8 is equal to the program ID of the storage area in the NVRAM 5 newly read or not. If the decision in the step S4 is affirmative, that is, if the program ID of the storage area read from the NVRAM 5 is "0", it means that there is no storage area corresponding to the control program of the program cartridge 8, in the storage area currently used in the NVRAM 5, and the process proceeds to a step S10. In the step S10, the data for initializing the NVRAM 5 which is stored in the program ROM 9 of the program cartridge 8 is loaded to an unused storage area of the NVRAM 5 which has been determined to have ID = "0". If the decision in the step S5 is negative, that is, if there is no corresponding program ID after searching of the program ID's of all storage areas in the NVRAM 5, the process proceeds to a step S7. In this case, in order to use the control program of the program cartridge 8, it is necessary to erase information in one of the storage areas in the NVRAM 5 and load the information for the control program in the program cartridge 8 into that storage area. In the step S7, which one of the information for the control programs stored in the NVRAM 5 is to be erased, or an inquiry as to whether the erasure is not to be effected and the use of the program cartridge 8 is to be inhibited is displayed on the display unit 6. The user watches the display and manipulates the console unit 7 to instruct to the inquiry. In a step S8, the instruction from the console unit 7 is checked. If the decision is negative to the inquiry, that is, if the instruction is not to erase any data stored in the NVRAM 5, a routine exceptional process is carried out and the process is then terminated (step S11). If the decision in the step S8 is affirmative, the information stored in the storage area instructed in the step S7 is erased (step S9), and the data for the program cartridge 8 is loaded into the erased storage area (step S10). In the present embodiment, it is assumed that the storage areas of the NVRAM 5 are sequentially used from the top one, and if one unused area is detected, it is assumed that all following areas are unused. Accordingly, if the area having ID = "0" is detected in the step S4, no determination is made for the following areas and the information is loaded into this vacant area. However, where there may be discontinuous used areas because the ID of the area having unnecessary information is rendered "0", the ID equality check in the step S3 may be sequentially carried out, and if all are non-equal, the vacant area check in the step S4 may be sequentially carried out. If the NVRAM 5 has the area for only one ID, the decision in the step S5 and the process in the step S6 are not carried out, and whether the overwriting is to be carried out or not is instructed in the step S7. In the present embodiment, the control programs used are all stored in the program ROM 9 in the program cartridge 8. Where a ROM is provided in the control unit 2 of the equipment 1 to store a portion of the control program and the program cartridge 8 is not loaded to the equipment 1, or where the control program stored in the program cartridge 8 is not to be executed, the equipment 1 may be controlled by only the control program stored in the control unit 8. In such a case, the control program stored in the control unit 2 may use the storage area of the NVRAM 5. In the present embodiment, each control program uses one storage area on the NVRAM 5. However, depending on the control program, a plurality of storage areas may be used or the storage area may be shared by other control program. In the electronic equipment of the present invention, the externally read information necessary for the control program is stored in the equipment together with the identification information which identify the control program in order to attain rapid processing, and when it is determined that there is no necessary information in the equipment after the checking of the identification information, the information is externally read and stored into the vacant area of the memory in the equipment. If there is no vacant area, it is informed to the user to request the instruction, and upon instruction, the information is overwritten on one of the currently used information areas. In this manner, a flexible operation is attained for the execution of the control program whose necessary initial data is not previously stored in the equipment.

Claims: A method of operating an electronic equipment capable of executing each one of a plurality of alternative control programs, which method comprises the following steps: (a) reading (S1) control program identification information from an external memory (8); (b) reading (S2) control program identification information (ID) from an internal memory (5); and (c) comparing (S3) the control program identification information read in steps (a) and (b); which method is characterised by the following steps: (d) determining (S4), in the event that it is found in step (c) that the control program identification information (ID) read in step (a) differs from the control program identification information (ID) read in step (b), whether or not there is a vacant storage area in said internal memory (5) for storing initial data necessary to execute a control program corresponding to the control program identification information read in step (a); and (e) loading (S10) control program identification information and initial data for that control program, into said internal memory (5), in the event that it is determined (S4) in step (d) that there is such a vacant storage area therein. A method as claimed in claim 1 wherein said internal memory (5) has capacity to store respective control program identification information and respective initial data for a plurality of alternative control programs, and said method includes repeating steps (b), (c) and (d) until either it is found in step (d) that there is such a vacant storage area whereupon step (e) is performed, or all control program identification information has been read and compared and it is found that there is no such vacant storage area available in said internal memory (5). A method as claimed in claim 2 wherein following a finding, after repeating all steps (b), (c) and (d), that there is no such vacant storage area available in said internal memory (5), the following steps are performed: (f) displaying information to enable a user to decide whether or not any control program identification information and corresponding initial data held in said internal memory (5) is to be overwritten with control program identification information and initial data for the identified control program; and (g) overwriting selected control program identification information and the corresponding initial data with the control program identification information and the initial data for the identified control program, in the event that the decision of the user in step (f) is affirmative. An electronic equipment (1) which is operable using any one of a plurality of alternative control programs, which electronic equipment (1) comprises: memory means (5) for storing control program identification information and initial data, to identify and execute a control program; and a first checking means (2) for reading and comparing control program identification information stored in said memory means (5) and stored in an external memory means (8); which electronic equipment (1) is characterised by a second checking means (2) for determining whether or not there is a vacant storage area in said memory means (5) for storing initial data necessary to execute a chosen control program; and loading control means (2) which is co-operative with said memory means (5), and is responsive to said first checking means (2) and said second checking means (2,4), to load said memory means (5) with control program identification information and corresponding initial data for the chosen control program in the event that the chosen control program does not correspond to a control program for which control program identification information and initial data is stored in said memory means (5), and there is a vacant storage area therefor in said memory means (5). An electronic equipment (1) as claimed in claim 4 wherein said internal memory (5) has capacity to store respective control program identification information and respective initial data for a plurality of alternative control programs. An electronic equipment as claimed in claim 5 comprising: display means (6) for displaying instructions and enquiry information to a user; display control means (6) responsive to said second checking means (2) to control said display means (6) to display information thereon to enquire, in the event that said second checking means (2) determines that there is no vacant storage area for storing initial data for the chosen control program, whether or not, and which, control program identification information and corresponding initial data is to be overwritten by control program identification information and initial data for the chosen control program; information input means (7) by which the user instructs whether or not, and which, control program identification information and corresponding initial data is to be overwritten; and wherein said loading control means (2) is responsive to said information input means (7) to control operation of said memory means (5) to overwrite control program identification information and corresponding initial data as instructed by the user using said information input means (7). An electronic equipment as claimed in any preceding claim 4 to 6 and having attached thereto a detachable external memory means storing both control program identification information for and control program instructions of, a chosen control program. An electronic equipment as claimed in any of claims 4 to 7, wherein said equipment is a printer.

Inventors: FUJITA HARUO, KAWAMURA YOSHIAKI, MURAKAMI YUTAKA, OKADA KUNIO, FUJITA, HARUO, KAWAMURA, YOSHIAKI, MURAKAMI, YUTAKA, OKADA, KUNIO
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1990
Main classification: G06F9
IPC codes: G06F9, G06F12