Abstract:
An electronic instrument having a resettable security code as a way of preventing the burglary of the electronic instrument mounted to a movable device such as a car. When the electronic instrument is mounted to the movable device or a battery is exchanged, the entry of the security code is required by the user. If the user does not know or remember the security code, a random number is automatically generated inside of the electronic instrument and converted into an initializing code according to the predetermined rules. The user reports the generated random number to a service company or the manufacturer. The service company or the manufacturer checks if the user is registered. When the user is certified, the service company or the manufacturer gives the initializing code corresponding to the random number to the user. Then, the user enters the given initializing code for resetting the security code.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to an electronic instrument which provides a resettable security code for preventing burglary and a method for rewriting the security code. 
     2. Background of the Invention 
     Of the electronic instruments powered by a battery, such as a car stereo unit, some have conventionally provided a security code set therefor. For example, consider that a thief mounts his stolen instrument in his own car. In this case, the stolen device requires him to input the same security code. Hence, if no match takes place between the security code pre-set in the instrument itself and the inputted security code, the thief cannot use the stolen device. 
     These kinds of electronic instruments are not operated until the preset security code is entered. This serves to prevent burglary. 
     The security code is thus required to be strictly protected. Actually, a correspondence table between the serial number of each instrument and the relevant security code is safekept in the manufacturer company or the service center of the company located closer to the user. The security code is distributed to the user as a label. 
     When the user mounts the electronic instrument to a car, for example, the user is required to enter the distributed security code for starting the instrument. 
     By the way, the correspondence table on which the security code is described is safekept in the manufacturer company or its branch office or distributed to the user as a lable. This is unfavorable to the security of the code. That is, if the user pastes the distributed label on the electronic instrument, another person can easily get the security code. 
     Even if another person gets the security code of the user, conventionally, the user cannot change the security code preset when manufacturing the electronic instrument. To avoid this disadvantage, for example, if the electronic instrument is arranged so that the user himself can reset the security code, then the initializing method for resetting the security code has to be made public, which leads to lowering the security level. 
     Under these circumstances, the present invention is made for overcoming the foregoing shortcomings. It is an object of the present invention to provide an electronic instrument which provides simplified means for managing the security code and a capability of setting the security code and a method for rewriting the security code. 
     SUMMARY OF THE INVENTION 
     The foregoing object is achieved by an electronic instrument arranged to enable the operation only if a match takes place between a security code pre-stored in the instrument itself and a security code entered by a user, which includes: a random number generator for generating a random number; an initializing code generator for generating a first initializing code corresponding to the random number generated by the random number generator; a display for displaying the random number generated by the random number generator; initializing code keys used by a user for entering a second initializing code based on the random number displayed on the display; a comparator for comparing the initializing code generated by the initializing code generator with the second initializing code entered through the initializing code keys; and a controller for enabling the reset of the security code pre-stored in the electronic instrument only if a match between the first initializing code and the second initializing code is determined by the comparator. 
     The foregoing object is achieved by a method for resetting the security code in the electronic instrument for enabling the operation only if a match takes place between the security code pre-stored in the electronic instrument and the security code entered by the user, which includes the steps of: generating a random number; entering a first initializing code corresponding to the generated random number; enabling a user to enter a second initializing code based on the generated random number; comparing the generated first initializing code with the second initializing code; and enabling reset of the security code pre-stored in the electronic instrument only if a match between the first initializing code and the second initializing code is determined by the comparator. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing an electronic instrument applied to the present invention; 
     FIG. 2 is a view showing a memory map of a memory EEPROM  11 ; 
     FIG. 3 is a flowchart showing a method for processing a security code when exchanging a battery of a movable device or mounting an electronic instrument to the movable device; 
     FIG. 4 is a flowchart showing a process for setting a security code; 
     FIG. 5A is a view showing a clock indication appearing on a display in a normal state; 
     FIG. 5B is a view showing an indication of the display when setting the security code; 
     FIG. 5C is a view showing an indication of the display while the security code is being set; 
     FIG. 5D is a view showing an indication of the display when releasing the enter of the security code; 
     FIG. 6 is a flowchart showing a process for entering and releasing the security code; 
     FIG. 7A is a view showing an indication of the display appearing when entering and releasing the security code; 
     FIG. 7B is a view showing an indication of the display appearing when entering the security code; 
     FIG. 7C is a view showing an indication of the display appearing if a mismatch takes place between the entered security code and the pre-stored security code; 
     FIG. 7D is a view showing an indication of the display appearing if a match takes place between the entered security code and the pre-stored security code; 
     FIG. 7E is a view showing an indication of the display appearing if a predetermined number of mismatches or more take place between the entered security code and the pre-stored security code; 
     FIG. 8 is a flowchart showing a first half of the process for initializing the security code; 
     FIG. 9 is a flowchart showing a second half of the process for initializing the security code; 
     FIG. 10A is a view showing a random number generated by a random number generator appearing on a display; 
     FIG. 10B is a view showing an indication of the display appearing when entering the second initializing code; 
     FIG. 10C is a view showing an indication of the display appearing when the second initializing code is being entered; and 
     FIG. 10D is a view showing an indication of the display appearing only if a match takes place between the entered second initializing code and the first initializing code pre-stored in the electronic instrument. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The description will be oriented to an electronic instrument according to the present invention with reference to the appended drawings. 
     The embodiment of the electronic instrument concerns with a car stereo unit. For example, the car stereo unit provides a method for rewriting a security code, which includes the steps of generating a random number when a user mounts the instrument to the car, displaying the random number, comparing a first initializing code corresponding to the random number with a second initializing code corresponding to the random number entered by a user, and enabling rewrite of the security code for permitting the operation of the electronic instrument if a match between the first initializing code and the second initializing code is determined as a result of the comparison. 
     The car stereo unit, as shown in FIG. 1, includes an antenna  2  for receiving a radio wave, a radio receiver  3  for being inputted with a radio wave received by the antenna  2 , a tape reproducing unit  4  for reproducing data from an inserted tape cassette, a switcher  5  for switching the radio receiving unit  3  or the tape reproducing unit  4 , a power amplifier  6  for amplifying a signal outputted from the switching unit  5 , a speaker  7  for sounding the signal outputted by the power amplifier  6  as an audio signal, a microcomputer  8  for controlling the radio receiver  3 , the tape reproducing unit  4  and the switching unit  5 , an operation button board  9  having numerical value buttons  9   a , a SET button  9   b , an OFF button  9   c  and a RESET button  9   d , which are selectively pressed for selecting a radio station, liquid crystal display (LCD)  10  for displaying the selectively pressed result of the operation button board  9 , and an EEPROM (Electrically Erasable Programmable Read-only Memory)  11 . 
     The microcomputer  8  is composed of a CPU  12 , a ROM  13  for storing a program or data of the CPU  12 , a RAM  14  for storing numerical values entered by the numerical value buttons  9   a  of the operation button board  9 , an I/O interface  15  between the radio receiver  3 , the tape reproducing unit  4  or the switcher  5  and the CPU  12 , and a memory I/O interface  16  between the EEPROM  11  and the CPU  12 . 
     The CPU  12  further provides a random number generator  17  for generating a random number and displaying the generated random number on an LCD  10 , an initializing code generator  18  for generating a first initializing code based on the random number, a comparator  19  for comparing the numerical value stored in the RAM  14  and the first initializing code generated by the initializing code generator  18 , and a controller  20  for enabling the operation of the instrument if a match of the compared result is determined by the comparator  19 . 
     As shown in FIG. 2, the EEPROM  11  is composed of a conversion table area  21  composed of the random number and the first initializing code corresponding to the random number, a security code area  22  for saving the security code, and a random number area  23  for saving a random number generated by the random number generator  17 . 
     By referring to the conversion table saved in the conversion table area  21 , the initializing code generator  18  operates to generate the first initializing code corresponding to the random number generated by the random number area  23 . Further, the comparator  19  enables to compare the security code saved in the security code area  22  with the numerical value stored in the RAM  14  as will be discussed below. 
     The security code area  22  and the random number area  23  are kept initialized when shipped from the factory. 
     The car stereo unit  1  arranged as described above is powered by a battery  26  through a battery switch  25 . 
     The car stereo unit  1  powered by the battery  26  can be used by setting the security code. Herein, the description will be oriented to how the car stereo unit  1  may be used only by entering the security code after the car stereo unit  1  is shipped from the factory or when it is transferred to another car. This description is expanded along the flowchart shown in FIG.  3 . 
     At first, when the car stereo unit  1  is shipped from the factory at a step S 1 , as mentioned above, the security code area  22  of the EEPROM  11  is kept initialized. Then, at a step S 2 , the user sets the security code. The entered security code is saved in the security code area  22 . By setting the security code, the car stereo unit  1  becomes usable as indicated at a step S 3 . 
     Then, at a step S 4 , the car stereo unit  1  remains usable until the battery  26  is exchanged. However, if the battery  26  is removed for exchange, the car stereo unit  1  cannot be used until the same security code as the previously set code is entered. That is, the car stereo unit  1  cannot be used unless the security code is released. In a case that a non-conducting time of the battery  26  is written in the RAM  14  and the actual non-conducting time reaches the written time, the exchange of the battery  26  or the removal of the car stereo unit  1  from the car is determined. Then, the CPU  12  operates to require the entry of the security code. 
     In response to the request for the entry of the security code issued from the car stereo unit  1 , if the user remembers the security code, the user advances the operation from the step S 5  to a step S 6  so that the user can enter the same security code as the previously set code for enabling the car stereo unit  1  to execute the process for releasing the code entry. On the other hand, if the user does not remember the security code, the user advances the operation from the step S 5  to a step S 7  at which the car stereo unit  1  enables to execute the process for initializing the system so that the user can reset the security code. 
     If the user completes the process for releasing the code entry at the step S 6 , the user can use the car stereo unit  1 . Further, if the user completes the process for initializing the system at the step S 7 , by setting the new security code again, the car stereo unit  1  is enabled. Further, in the process for releasing the code entry at the step S 6 , if the user&#39;s entry of the security code is failed five times, the car stereo unit  1  is not operated until the process for initializing the system is executed. 
     The foregoing description was concerned with the case that the car stereo unit  1  can be used after it is shipped from the factory by setting the security code, the case that the car stereo unit  1  can be used by entering the security code again in the process for releasing the code entry after the battery is exchanged, or the case that the system can be used by setting the security code again in the process for initializing the system. 
     In turn, the description will be oriented to the code setting process, the code entry releasing process or the system initializing process in detail. 
     At first, the code setting process will be described along the flowchart of FIG.  4 . The LCD  10  displays the progressing status of the code setting process as shown in Figs.5A to  5 D. The user can set the code as watching the LCD for checking the current setting operation. 
     The process for setting the code is started by pressing a SEL button  9   b  located on the operation button board  9 . After making sure that the SEL button  9   b  is pressed, the CPU  12  checks if the security code area  22  of the EEPROM  11  is in the initializing state as shown at S 11  in FIG.  4 . For example, when the security code has been entered, the CPU determines that the security code area  22  is not in the initializing state. Then, the CPU  12  shifts the operation to the process for releasing the code entry at a step S 6  shown in FIG.  3 . 
     On the other hand, after making sure that the security code area  22  is in the initializing state, the CPU  12  operates the LCD  10  to display nothing. At this time, the LCD  10  changes the clock indication shown in FIG. 5A to no indication shown in FIG.  5 B. 
     From the change of the display of the LCD  10 , the user can make sure that the security code can be entered. Then, the user selectively presses the numerical value button  9   b  of the operation button board  9  for entering a four-digit security code, for example, “1”, “2”, “3” and “4” in sequence. The CPU  12  operates to display the numerical value entered by the operation button board  9  on the LCD  10  as indicated at a step S 13 . That is, as shown in FIG. 5C, the LCD  10  operates to display the numerical value “1 2 3 4”. Then, the CPU  12  enters into the waiting state for the press of the SEL button  9   b  as indicated at the step S 14 . If the user determines that the numerical value is erroneously entered on the LCD that is displaying the numerical value, the user presses the OFF button  9   c  of the operation button board  9  for canceling the entry. 
     After completion of the entry of the security code, the user presses the SEL button  9   b  again. When the CPU  12  makes sure of the press of the SEL button  9   b , the CPU  12  goes to a step S 15 . At this step, the CPU  12  checks if the entered numerical value has four digits. If it has four digits, the CPU  12  goes back to a step S 12 . At this step, the CPU  12  operates the LCD  10  to cancel the display and requests the user to enter the security code again. 
     When the CPU  12  makes sure of the entry of the four-digit numerical value at the step S 15 , at a step S 16 , the CPU  12  operates the LCD  10  to display the indication “SET  1234 ” for five seconds and save the numerical value as the security code in the security code area  22  of the EEPROM  11 . Then, the user can make sure that the security code is entered on the indication “SET  1234 ” displayed on the LCD  10 . 
     The foregoing code setting process is executed to set the security code. Then, as mentioned above, the set security code is made to be a code for releasing the code entry when exchanging the battery  26 , for example. 
     In turn, the description will be oriented to the process for releasing the code entry along the flowchart of FIG.  6 . As shown in FIGS. 7A to  7 E, the LCD  10  displays the progressing status of the process for releasing the code entry. Hence, the user can release the code entry while watching the indication of the LCD  10 . 
     At first, when the current is supplied from the battery  26  to the car stereo unit  1 , the CPU  12  operates the LCD  10  to display an indication “CODE” as shown in FIG.  7 A. On the indication, the user makes sure that the security code is allowed to be entered and then presses the numerical value buttons  9   a  corresponding to a four-digit numerical value of “1”, “2”, “3” and “4” for entering the numerical value. The CPU  12  operates the LCD  10  to display the entered numerical value and stores it in the RAM  14  at a step S 22 . Then, at a step S 23 , the CPU  12  enters into the state for waiting for the press of the SEL button  9   b . At this time, as shown in FIG. 7B, the LCD  10  is operated to display the “CODE  1234 ”. If the user determines that the numerical value is erroneously entered on the LCD that is displaying the numerical value, the user presses the OFF button  9   c  for canceling the erroneous numerical value. 
     After terminating the entry of the numerical value, the user presses the SEL button  9   b . The CPU  12  confirms this press and then checks if the numerical value stored in the RAM  14  has four digits as indicated at the step S 24 . If the numerical value stored in the RAM  14  does not have four digits, at a step S 25 , the CPU  12  operates to display an indication of “NO” on the LCD  10  for two seconds as shown in FIG.  7 C. Then, the CPU  12  returns to the step S 21  at which the CPU  12  operates to display “CODE” on the LCD  10  and requires the user to enter the security code. 
     On the other hand, at the step S 24 , if the CPU determines that the numerical value stored in the RAM  14  has four digits, the comparator  19  of the CPU  12  operates to compare the numerical value stored in the RAM  14  with the security code saved in the security code area  22  as indicated at the step S 26 . If the numerical value stored in the RAM  14  is determined to be identical with the security code saved in the security code area  22 , at a step S 27 , the CPU  12  operates to display “YES” on the LCD  10  for two seconds as shown in FIG.  7 D and then terminates the process for releasing the code entry. On the termination of the process for releasing the code, the control unit  20  enables the operation of the system. 
     For example, if the different numerical value from the security code set by the user at the previous time is inputted through the use of the operation button board  9 , the CPU  12  determines that the numerical value stored in the RAM  14  is not identical with the security code saved in the security code area  22 . Then, the CPU  12  advances the operation from the step S 26  to the step S 28 . 
     At the step S 28 , the CPU  12  checks the number of times the erroneous security code is inputted. If the number of times does not reach five, the CPU  12  returns to the step S 21  at which it requires the user to re-enter a new numerical value. 
     On the other hand, if the number of times reaches five, at the step S 29 , the CPU  12  operates to display the “SECURITY” on the LCD  10  as shown in FIG.  7 E. Then, the CPU  12  shifts the operation to the process for initializing the system indicated at the step S 7  of FIG.  3 . 
     The aforementioned process makes it possible for the user to shift the system to the process for initializing the security code stored in the memory of the electronic instrument if the user does not remember the previously set security code. 
     Therefore, the user can set the security code to the car stereo unit  1  by himself. This eliminates the necessity of safekeeping the security code in the manufacturer or its branch office. As a result, the management of the security code is simplified and the leakage of the security code to another person is prevented. Further, the car stereo unit  1  removed from the battery  26  provides a capability of preventing another person&#39;s release of the security code. This leads to inhibiting the burglary. 
     On the other hand, it is considered that even an owner may forget the previously inputted security code and cannot release the security code. In this case, to operate the car stereo unit  1 , it is necessary to execute the process for initializing the system and set the security code again. With the foregoing technology, the car stereo unit  1  enables to initialize the system without having to make the process for initializing the system public. 
     The process for initializing the system will be described in relation to the flowchart shown in FIGS. 8 to  9 . The progressing status of the system initializing process is displayed on the LCD  10  as shown in FIGS. 10A to  10 D. On the LCD  10 , the user can initialize the system as watching the indication of the LCD  10 . 
     The system initializing process is started by pressing the RESET button  9   d  of the operation button board  9  for two seconds. The CPU  12  makes sure of the press of the RESET button  9   d  and then generates a six-digit random number through the effect of the random number generator  17  and saves the random number in the random number area  23  of the EEPROM  11  as indicated at the step S 31 . 
     Then, as indicated at the step S 32 , the CPU  12  operates to display on the LCD  10  the random number generated by the random number generator  17 . As shown in FIG. 10A, on the LCD  10 , the random number generated by the random number generator  17 , for example, “987654” is displayed. The user makes sure of the random number by watching an indication of the LCD  10 . 
     On the other hand, as indicated at the step S 33 , the initializing code generator  18  operates to refer to the conversion table saved in the conversion table area  21  of the EEPROM  11  and generate a first initializing code corresponding to the random number generated by the random number generator  17 . 
     After the aforementioned process, as indicated at the step S 34 , the CPU  12  enters into the state of waiting for an entry of the second initializing code until the SEL button  9   b  is pressed. 
     The user inquires at the service station of the manufacturer of the car stereo unit  1  of the second initializing code corresponding to the random number “987654” displayed on the LCD  10 . The service station asks information such as an address and a name of the inquirer for checking if the inquirer is a registered user. After making sure that the inquirer is registered, the second initializing code, for example, “024689” is reported from the service station to the inquirer. This second initializing code is obtained by using the same conversion table as the table stored in the conversion table area  21  of the car stereo unit  1 , which is recorded in a computer installed in the service station, for example. 
     The user obtains the second initializing code from the service station and presses the SEL button  9   b  of the car stereo unit  1 . The CPU  12  makes sure of this press and changes the display of the LCD  10  into the no-indication state as indicated at the step S 35  of FIG.  10 B. Then, the user makes sure that the second initializing code entry is allowed by checking the display state of the LCD  10  and selectively presses the numerical value button board  9   a  for entering the second initializing code “024689”. The CPU  12  operates to display the entered second initializing code on the LCD  10  at the step S 36  and stores it in the RAM  14  at the step S 37 . As shown in FIG. 10C, the LCD  10  displays the entered numerical value “024689” as shown in FIG.  10 C. 
     Then, as indicated at the step S 38 , the CPU  12  enters into the waiting state for the press of the SEL button  9   b , makes sure of the press of the SEL button  9   b , and advances the operation to a step S 39 . 
     At the step S 39 , the CPU  12  compares the first initializing code generated by the generator  18  with the second initializing code stored in the RAM  14  through the effect of the comparator  19 . 
     If a match takes place between the first initializing code and the second initializing code, the CPU  12  operates to initialize the security code area  22  as indicated at the step S 40 . By initializing the security code area  22 , the car stereo unit  1  enters into the initialized state, which is the same as the shipping state. 
     Then, at a step S 41 , as shown in FIG. 10D, the CPU  12  operates to display “YES” on the LCD  10  and then terminates the process for initializing the system. The user makes sure of the completion of the initialization of the system on the indication “YES” of the LCD  10  and then sets the security code again. 
     On the other hand, if a mismatch takes place between the first initializing code and the second initializing code at a step S 39  as a result of erroneous entry of the second initializing code, for example, the CPU  12  advances the operation to a step S 42 . At this step, the CPU  12  checks if the number of times of the erroneous entry reaches three. If the number does not reach three times, the CPU  12  returns to the step S 35  and then changes the display of the LCD  10  into the no-indication state, on which the CPU requires the user to enter the second initializing code. 
     If the number of times reaches three, the CPU  12  advances the operation from the step  42  to a step S 43 . At this step, the CPU  12  operates to display the indication “SECURITY” on the LCD  10  as shown in FIG.  7 E and nullifies the entry from the operation button board  9  for ten minutes. After ten minutes, the CPU  12  returns to the step S 35  at which the LCD  10  is changed into the no-indication state again. On this display, the CPU  12  requires the user to enter the second initializing code. 
     Unless the process for initializing the system is terminated, the random number saved in the random number area  23  is not changed. Hence, the same random number is always displayed on the LCD  10  from the start of the system initialization to the end thereof. 
     The process for initializing the system is executed to initialize the security code area  22  by entering the same second initializing code as the first initializing code corresponding to the random number generated by the random number generator  17 . At a time, the system initialization is executed by entering the second initializing code managed by the manufacturer. Hence, the process for initializing the system is not required to be made public. Since the car stereo unit  1  is entered into the shipping state by initializing the security code area  22 , the security code can be set by doing the process for setting the code. That is, if the user does not remember the security code set by the user, the user can initialize the system and set the security code of the car stereo unit  1  by himself without having to making the initializing process public. 
     Since the security code is allowed to be always set by the user, the management of the security code of the car stereo unit  1  is made simpler. Hence, another person cannot make access to the security code. It means that the car stereo unit  1  cannot be used by any person except the user. This serves to protect the stereo car unit  1  from burglary. 
     Further, the service station safekeeps the second initializing code. Hence, another person cannot initialize the system. This serves to protect the car stereo unit  1  removed from the battery  26  from burglary. 
     Moreover, the conversion table or the second initializing code safekept in the service station are more simply managed. 
     The car stereo unit  1  enables to generate the first initializing code derived from the random number through the operation. The service station provides a computer for generating the second initializing code from the random number through the same operation as that of the car stereo unit  1 . 
     In addition, the random number and the first and the second initializing codes of the car stereo unit  1  are not limited to six digits. The digits of those codes may be increased. The increase makes it more difficult for another person to know the second initializing code. 
     The electronic instrument according to the present invention provides comparing means for comparing the first initializing code generated from the random number by the initializing code generating means with the second initializing code entered from the outside. Only if the first initializing code is made equal to the second initializing code, the initialization of the security code is enabled. 
     As mentioned above, since the security code can be initialized by the user, even if the user does not remember the security code set, the user can set the security code again by himself. 
     It is apparent that the thief does not know the set security code. Hence, the thief may enter his presumed security codes for solving the security. To cope with this, the present invention has a limitation of the number of times of security code entry. If the number of times of the erroneous security code entry reaches a predetermined number, the system of the invention is automatically shifted to the process for initializing the security code. 
     Since the system is automatically shifted to the initializing process, the thief is required by the electronic instrument to enter the second initializing code. Hence, the thief has to inquire with the service center or the manufacturer of the second initializing code. 
     If the thief inquires with the manufacturer or the service center of the second initializing code, the manufacturer or the service center can check if the inquirer is a registered user. 
     If the inquiry is given through a phone, the manufacturer or the service center hangs it up and then calls back the inquirer for certifying the inquiry. 
     In addition, if the registered user gives the manufacturer or the service center the report about the burglary of the electronic instrument, the manufacturer or the service center can report it to the police when someone inquires about the second initializing code.