Method and device for updating program functions corresponding to a version flag

In an electronic device for implementing various functions using a DSP, the functionality can be updated as required. The electronic device is provided with a DSP and a flash memory for storing a program executed by the DSP. A program for implementing a new function implements both an old function and the new function, and for implementing a function corresponding to a version flag that has been set in version flags. When the program in the flash memory is updated to a program for implementing the new function, the program for implementing a new function is loaded into the flash memory, and a version flag corresponding to the new function is set in the version flags.

TECHNICAL FIELD

The present invention relates to an electronic device which is adapted to implement various functions using a digital signal processor (DSP).

BACKGROUND ART

AV (Audio and Visual) preamplifiers, for example, in which audio signals have been digitized, use a processing circuit such as a DSP to perform signal processing such as decoding, effecting, and equalizing. When the DSP is used, a program executed by the DSP can be modified to change the content to be processed.

Therefore, there has been conceived an AV preamplifier which is provided with a non-volatile, rewritable memory in which a program executed by the DSP is stored. This allows the program stored in the non-volatile memory to be rewritten to update functionality of the AV amplifier or add a new function, so that the functionality of the AV amplifier can be up-to-date at any time.

For example, when a novel encoding method is used for a digital audio signal, the corresponding decoding method can be added to the AV amplifier, or, when new effecting is put into practice, the effecting can be added to the AV amplifier. Furthermore, a program executed by the DSP can be improved to obtain a higher quality audio signal, or a bug can be removed from a bugged program. Thus, the AV amplifier can be upgraded to an up-to-date one.

A flash memory has been used in general as the above-noted non-volatile, rewritable memory. In order to rewrite a program stored in the flash memory, it is necessary to erase the program in the flash memory before rewriting.

If a new function is added while an old function remains, the overall content of the flash memory must be rewritten, and it is therefore necessary to install versions in order, such as Ver. 1→Ver. 2→Ver. 3, in order to update the functionality. Thus, it is impossible to select and install only a function that is newly added in Ver. 3 to update the functionality.

In addition, functions newly added by versions are of different value from one version to another. As a result, for example, even if a function that is added in Ver. 3 is of less value than a function that is added in Ver. 2, it is necessary to set the price of Ver. 3 to a higher price than that of Ver. 2 although Ver. 3 must have been offered at a lower price.

The present invention is intended to solve such problems.

DISCLOSURE OF INVENTION

According to the present invention, an electronic device is provided, which includes:

a DSP for executing a program P written in the non-volatile memory to implement a predetermined function; a control circuit for performing predetermined control; an input circuit; and version flags stored in the non-volatile memory,

wherein a program Q for implementing a new function as the above-described function is a program for implementing an old function and the new function, and has content for implementing a function corresponding to a version flag out of the version flags which has been set; and

the predetermined control is such that, when the program P in the non-volatile memory is updated to the program Q for implementing the new function, the program Q for implementing the new function is loaded into the nonvolatile memory via the input circuit, and

a version flag of the version flags which corresponds to the new function is set.

Therefore, only a function corresponding to a bit of version flag bits which is set to “1” can be implemented.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1shows an example in which the present invention is embodied as an AV amplifier supporting 5.1 channel audio, in which reference numeral10denotes a DVD (Digital Versatile Disc) player, and reference numeral20denotes an AV amplifier.

The DVD player10is a signal source in 5.1 channel audio. In the DVD player10, a DVD is played back, and a playback signal therefor is output in the form of a serial digital audio signal according to IEC (International Electrotechnical Commission)-958 standard (so-called SPDIF (Sony Philips Digital InterFace) standard), and the digital audio signal is supplied to the AV amplifier20.

In the AV amplifier20, the digital audio signal supplied from the DVD player10is supplied to a DSP23through an input connector21and an interface circuit22. The DSP23decodes the digital audio signal from the interface circuit22into digital audio signals on six channels (left front, right front, left side, right side, central front, and bass channels), and performs processing, such as effecting and equalizing, on the digital audio signals.

The six-channel digital audio signals output from the DSP23are supplied to a D/A (Digital to Analog) converter circuit24for D/A conversion into six-channel analog audio signals. The analog audio signals are passed through an amplifier25and a variable attenuator circuit26for adjusting main sound volume to output terminals27.

The AV amplifier20is further provided with a microcomputer31as a control circuit, and a signal indicating the type of playback signal supplied to the interface circuit22is supplied to the microcomputer31from the interface circuit22.

The microcomputer31is connected to an operation key (or an operation toggle)32and a display, such as an LCD (Liquid Crystal Display)33. When the operation key32is operated, the microcomputer31controls the DSP23to modify the playback mode, the effect type, or the like. Various information such as the operating state of the AV amplifier20is displayed on the LCD33. A predetermined control signal is supplied to the variable attenuator circuit26from the microcomputer31to control the level of the analog audio signals output to the output terminals27according to operation using the operation key32.

The microcomputer31is further connected to a flash memory34as a non-volatile, rewritable memory. The flash memory34stores a program executed by the DSP23and various information. The program stored in the flash memory34is executed by the DSP23, thus allowing the above-described functions such as decoding, effecting, and equalizing to be implemented. The program executed by the DSP23in order to implement the functions of the AV amplifier20is hereinafter referred to as a “function program”.

In this example, the function program stored in the flash memory34is provided by a CD-ROM (CD Read Only Memory)50, and the CD-ROM50stores data shown inFIGS. 4A to 4C, by way of example.

It is assumed herein that a vendor of the AV amplifier20develops and markets a function program for implementing a new function A, after which the vendor develops and markets a function program for implementing a function B, after which the vendor develops and markets a function program for implementing a function C.

Then, when the vendor develops and markets the function program for implementing the function A, the vendor markets a CD-ROM50A having a function program5A, a load program100, and miscellaneous information200recorded therein, as shown inFIG. 4A. When the vendor develops and markets the function program for implementing the function B, the vendor markets a CD-ROM50B having a function program5B, a load program100, and miscellaneous information200recorded therein, as shown inFIG. 4B. When the vendor develops and markets the function program for implementing the function C, the vendor markets a CD-ROM50C having a function program SC, a load program100, and miscellaneous information200recorded therein, as shown inFIG. 4C.

The function program5A is a program executed by the DSP23in the AV amplifier20to implement the function A. The function program5B is a program executed by the DSP23in the AV amplifier20to implement the function B as well as the function A when bit0(LSB (Least Significant Bit)) of a version flag VFLG shown inFIG. 3B, which is stored in the flash memory34of the AV amplifier20, is checked and is set to “1”, as described in detail below.

The function program5C is executed by the DSP23in the AV amplifier20to implement the function C as well as the function A when bits0and1of the version flag VFLG shown inFIG. 3Bare checked and when bit0is set to “1” and the function B when bit1is set to “1”.

Therefore, the function program is such that an up-to-date function at the time when the function program was developed is implemented without condition, while the previous function is implemented only when the corresponding bit of the version flag VFLG is “1”.

The load program100is a program for loading a function program into the flash memory34from the CD-ROM50. The load program100is transferred to a RAM (Random Access Memory)311of the microcomputer31from the CD-ROM50, and is then executed by a CPU (Central Processing Unit) (not shown) of the microcomputer31. For example, the load program100has a structure shown inFIG. 2. Although a detailed description of the load program100is made below, only a portion relevant to the present invention is depicted inFIG. 2.

The miscellaneous information200includes information indicating a model which can be updated by the CD-ROM50.

A seal imprinted with a CD key (identification code) for identifying the CD-ROM50is affixed to a plastic case which receives the CD-ROM50.

The microcomputer31in the AV amplifier20is further provided with a communication port312which is specified by, for example, the RS-232C standard, for transferring the function program and the load program in the CD-ROM50to the AV amplifier20, and the port312is connected to a connector35. When the function program is loaded into the flash memory34, a personal computer40is connected with the connector35.

FIG. 3Ashows an exemplary memory map of the flash memory34. In this example, addresses 0 to 1FFFh (h indicates hexadecimal) are assigned to the flash memory34, in which the addresses 400h to 40Fh indicate a storage area for version information of the loaded function program. The addresses 410h to 41Fh indicate a storage area for information indicating the model of the AV amplifier20, etc., and the addresses 420h to 42Fh indicate a storage area for a CD (Compact Disc) key for identifying the CD-ROM50.

The address 430h indicates a storage area for the version flag VFLG, and the address 500h and the following addresses indicate a storage area for the function program. In this case, as shown inFIG. 3B, for example, each bit of the version flag VFLG corresponds to each of the functions implemented by the DSP23, and is set to “1” indicating that implementation of the corresponding function is allowed and to “0” indicating that it is not allowed.

For example, inFIG. 3B, bit0corresponds to the function A, which is “1”, thus indicating that implementation of the function A is allowed; and bit1corresponds to the function B, which is “0”, thus indicating that implementation of the function B is not allowed.

In this configuration, when a DVD is played back, a playback signal from the player10is supplied to the DSP23through the input connector21and the interface circuit22, and is then decoded into digital audio signals on the respective channels. The processing, such as effecting and equalizing, corresponding to operation using the operation key32is further performed.

The digital audio signals processed by the DSP23are subjected to D/A conversion by the D/A converter circuit24into analog audio signals, and the analog audio signals are passed through the amplifier25and the variable attenuator circuit26for adjusting main sound volume to the output terminals27.

On the other hand, the functionality of the AV amplifier20is updated as follows: when the functionality is updated, the personal computer40is connected to the connector35, and the CD-ROM50is set in the personal computer40. The CD-ROM50is the CD-ROM50A, the CD-ROM50B, or the CD-ROM50C depending upon the version of a marketed CD-ROM.

The key32of the AV amplifier20is operated to instruct an updating using the CD-ROM50Then, the load program100is read from the CD-ROM50, and the load program100is loaded into the RAM311from the personal computer40via the communication port312.

After loading, processing of a CPU (not shown) of the microcomputer31allows the routine of the load program100loaded in the RAM311to proceed to step10, followed by step102, in which the miscellaneous information200stored in the CD-ROM50is checked based on the model information stored in the flash memory34to determine whether or not the CD-ROM50supports the AV amplifier20.

As a result of determination, if the CD-ROM50supports the AV amplifier20, the routine proceeds from step102to step103, in which the version flag VFLG stored in the flash memory34is retrieved. In step104, the version flag VFLG retrieved from the flash memory34in step103is checked to determine whether or not the function program prepared in the CD-ROM50is qualified to be installed or rewritten to the flash memory34.

If it is determined that the function program prepared in the CD-ROM50is qualified to be installed or rewritten to the flash memory34, the routine proceeds from step104to step111, in which a bit in the bits of the version flag VFLG in the flash memory34which corresponds to a function newly added by the CD-ROM50is set to “1”. For example, when the CD-ROM50comprises the CD-ROM50B and the function B is added, bit1in the bits of the version flag VFLG which corresponds to the function B is set to “1”.

In order to set bit1to “1”, the version flag VFLG is retrieved from the flash memory34to take a difference between the retrieved version flag VFLG and mask data in which bit1is “1” and the other bits are “0”, and the result is written to the flash memory34as a new version flag VFLG. The same processing is performed in case where any other bit is set to “1”.

In step111, furthermore, the version information stored in the flash memory34is updated using the version information contained in the miscellaneous information200in the CD-ROM50.

The routine then proceeds to step112. In step112, processing before the function program is written to the flash memory34, for example, a process to display on the LCD33that the write processing is executed, is performed.

In step113, the function program in the CD-ROM50is written to the flash memory34. After the program has been written, in step114, processing after the program is written to the flash memory34, for example, a process to display on the LCD33that the writing in step113has been correctly executed, is performed. Then, in step115, the program100ends.

If it is determined in step102that the CD-ROM50does not support the AV amplifier20, the routine proceeds from step102to step121, in which incompatibility of the CD-ROM50is displayed on the LCD33. In step122, then, the program100ends.

If it is determined in step104that the function program prepared in the CD-ROM50is not qualified to be installed to the flash memory34, the routine proceeds from step104to step131, in which it is determined whether or not the function program stored in the CD-ROM50is a freeware program, such as a bug-fixed function program.

If it is a freeware program, the routine proceeds from step131to step111; and, as described above, the version flag VFLG stored in the flash memory34is updated in step111, and the function program stored in the flash memory34is updated to the freeware function program stored in the CD-ROM50in step113.

If the function program stored in the CD-ROM50is a shareware program in step131, the routine proceeds from step131to step132, in which the routine waits for entry of the CD key.

When the CD key given to the CD-ROM50is entered using the operation key32, the routine proceeds from step132to step133, in which it is determined whether or not the CD key entered in step132is correct. If the entered CD key is correct, the routine proceeds from step133to step111; and, in the subsequent steps, the function program and the version flag VFLG in the flash memory34are updated in the way described above.

However, if the entered CD key is not correct in step133, the routine proceeds from step133to step134, in which, for example, the fact that the CD key is wrong is displayed on the LCD33. Then, in step115, the program100ends.

As described above, the function program5A is programmed so as to implement the function A; the function program5B is programmed so as to implement the function B as well as the function A when bit0of the version flag VFLG is set to “1”; and the function program5C is programmed so as to implement the function C as well as the function A or the function B when bit0or bit1of the version flag VFLG is set to “1”.

Thus, the function program in the CD-ROM50is installed to the flash memory34in the way described above to update the version flag VFLG, whereby only a function whose corresponding bit is set to “1” is effectively implemented.

In this way, a new function can be added to the above-described AV amplifier20, in which case, in particular, the above-described AV amplifier20is designed so that, when a new function is added, a function program capable of implementing both the new function and a function which has been developed is stored in the flash memory34and a bit in the version flag VFLG which corresponds to the new function is updated.

Therefore, if functions A, B, C, . . . are developed and offered in order, for example, users can add only the function C, that is, users can select and add only an up-to-date function. Thus, if the functions are of different value, a desired function can be added at a price corresponding to the value thereof.

Although, in the previous description, files (the function program, the load program100, and the miscellaneous information200) in the CD-ROM50are read and supplied to the microcomputer31by the personal computer40, the files may be read and supplied to the microcomputer31by the DVD player10. Alternatively, the files may be supplied to the microcomputer31over the Internet or by a service using a file delivery system.

According to the present invention, an electronic device for implementing various functions by a DSP and a program executed by the DSP enables users to select and add only an up-to-date function if the various functions have been developed and offered in order. If the functions are of different value, a desired function can be added at a price corresponding to the value thereof.