FIELD OF THE INVENTION

The present invention relates to a function parameter switching memory circuit and an operating method thereof, and more particularly to a function parameter switching memory circuit for a peripheral device and an operating method thereof.

BACKGROUND OF THE INVENTION

Generally, a personal computer or a notebook computer is equipped with various peripheral devices such as input devices. For example, a mouse device is one of the common input devices. For complying with different operating environments or meeting different operating requirements during the operations, the mouse device is usually equipped with a design of allowing the user to switch various function parameters. For example, in some kinds of mouse devices, the dots per linear inch (DPI) value that represents the mouse resolution can be adjusted by the user. Consequently, the user can select the desired sensitivity of operating the mouse device.

For example, in the field of designing mouse devices, a commercially available optical sensor with the product number PAW3519 is provided with a function of allowing the user to self-switch the DPI value of the mouse device.

FIG. 1Ais a schematic perspective view illustrating a conventional mouse device with a DPI switching function.FIG. 1Bis a schematic circuit block diagram illustrating associated components of the mouse device ofFIG. 1Afor executing the DPI switching function.

As shown inFIGS. 1A and 1B, the mouse device10comprises a DPI switching key11. When the DPI switching key11is manually triggered by the user, the DPI switching key11correspondingly generates a physical switch signal I11. The physical switch signal I11is transmitted to the optical sensor13to notify the optical sensor13of performing a DPI switching process.

However, the conventional technology still has some drawbacks. For example, the optical sensor13with the function of allowing the user to self-switch the DPI value of the mouse device is implemented with a SoC type chip (e.g., the PAW3519 optical sensor chip). Consequently, the internal programs of the optical sensor13cannot be modified, and the optical sensor13cannot be connected with an external memory. In case that a power management device12is suffered from power interruption, the optical sensor13cannot memorize the DPI value that is switched-and-set by the user (i.e., the physical switch signal I11). Consequently, when the power management device12is started again, the internal default DPI value P of the optical sensor13is used again In other words, the use of the conventional moue device is not convenient to the user.

Moreover, during the process of transmitting the physical switch signal I11to the optical sensor13, if the optical sensor13is not ready to receive the data signals, some problems occur. For example, if the power management device12is started or restarted after power interruption and the optical sensor13is in a reset state, the physical switch signal I11is possibly unable to be successfully received. Under this circumstance, the DPI value that is switched and set by the user (i.e., the physical switch signal I11) and the real DPI value of the optical sensor13during operation are inconsistent.

Moreover, according to the voltage level of an I/O pin of the optical sensor electrically connected with the DPI switching key11, the optical sensor13recognizes that the DPI value is switched to a specified value. If the I/O pin is interfered by the external noise, the voltage level at the I/O pin is suffered from an unexpected voltage change. Moreover, if the amount of the voltage change reaches an unexpected DPI switching threshold that is set in the optical sensor13, the optical sensor13may accidentally activate an internal DPI switching process. Consequently, a malfunction of the DPI switching process is possibly generated.

As mentioned above, the conventional technologies have many drawbacks. For example, the DPI value cannot be memorized, the DPI value that is switched and set by the user cannot be stored, the DPI value that is switched and set by the user and the real DPI value of the optical sensor are possibly inconsistent, or the DPI switching process is accidentally activated. For solving the above drawbacks of the conventional technologies, the present invention provides a function parameter (e.g., DPI) switching memory circuit and an operating method by using the structure of the existing optical sensor.

SUMMARY OF THE INVENTION

An object of the present invention provides a function parameter switching memory circuit and an operating method. Even if the structure of the existing optical sensor is used, the function parameter of the optical sensor during operation can be continuously maintained at the function parameter that is switched and set by the user.

In accordance with an aspect of the present invention, a function parameter switching memory circuit for a peripheral device is provided. The peripheral device includes an optical sensor. The function parameter switching memory circuit includes a function parameter switching key and a simulation control circuit. The function parameter switching key generates and outputs a physical switch signal in response to a switching trigger action of a user. The simulation control circuit includes an external controller and a virtual switch signal generator. The external controller is electrically connected with the function parameter switching key. The external controller generates and outputs a control command according to the physical switch signal. The external controller analyzes the physical switch signal to memorize a switched-and-set function parameter storage value. The virtual switch signal generator is electrically connected between the external controller and the optical sensor. The virtual switch signal generator generates and outputs a virtual switch signal to the optical sensor according to the control command. The external controller generates and outputs the control command to the virtual switch signal generator according to one of the physical switch signal and the switched-and-set function parameter storage value. The optical sensor performs a function parameter switching process according to the virtual switch signal.

In an embodiment, the function parameter switching key is a dots per linear inch (DPI) switching key or a polling rate switching key.

In an embodiment, the external controller is a microprocessor that is independently located outside the optical sensor.

In an embodiment, the microprocessor comprises an internal memory, or the microprocessor is electrically connected with an external memory. The switched-and-set function parameter storage value is stored in one of the internal memory and the external memory.

In an embodiment, if the physical switch signal is an abnormal physical switch signal, the external controller performs a switch signal filtering process to filter off the abnormal physical switch signal.

In an embodiment, the peripheral device further includes a power management device, and the power management device is electrically connected with the optical sensor and served as a power source. The power management device is further electrically connected with the external controller, or the power management device is further electrically connected with the external controller and the virtual switch signal generator.

In an embodiment, when the power management device is in a normal power state, the external controller generates and outputs the control command to the virtual switch signal generator according to the received physical switch signal. Consequently, the optical sensor performs the function parameter switching process.

In an embodiment, while the power management device is started or restarted after power interruption and the optical sensor is in a reset state, the external controller generates and outputs the control command to the virtual switch signal generator according to the memorized the switched-and-set function parameter storage value. Consequently, the optical sensor performs the function parameter switching process.

In an embodiment, the optical sensor issues a feedback monitoring signal to the external controller, and the external controller determines a content of the control command and a timing of generating and outputting the control command according to the feedback monitoring signal.

In an embodiment, the feedback monitoring signal is a real function parameter of the optical sensor during operation and/or a function parameter switching notification interrupt signal of the optical sensor. If the external controller performs a monitoring and comparing process and judges that the real function parameter and the switched-and-set function parameter storage value are different, the external controller regenerates and outputs the control command to the virtual switch signal generator according to the switched-and-set function parameter storage value. Consequently, the optical sensor performs a function parameter calibration process.

In an embodiment, the feedback monitoring signal is a ready signal of the optical sensor. When the external controller receives the ready signal, the external controller generates and outputs the control command to the virtual switch signal generator according to one of the physical switch signal and the switched-and-set function parameter storage value. Consequently, the optical sensor performs the function parameter switching process.

In an embodiment, after the optical sensor is reset, the optical sensor generates and outputs the ready signal to the external controller.

In an embodiment, if the external controller fails to receive the physical switch signal for a specified time period, the simulation control circuit is switched from a working mode to a low power consumption mode or a sleep mode.

In an embodiment, when the simulation control circuit is in the low power consumption mode or the sleep mode, if the external controller receives the physical switch signal or the external controller performs a monitoring and comparing process and judges that a real function parameter of the optical sensor during operation and the switched-and-set function parameter storage value are different, the simulation control circuit is restored to the working mode.

In an embodiment, the function parameter switching key is a key-type physical switch element or a touch-type switch element.

In an embodiment, the peripheral device is a peripheral input device, and the peripheral input device includes a mouse device.

In accordance with another aspect of the present invention, a peripheral device is provided. The peripheral device includes a function parameter switching key, an optical sensor and a simulation control circuit. The function parameter switching key generates and outputs a physical switch signal in response to a switching trigger action of a user. The optical sensor is permitted to perform a function parameter switching process. The simulation control circuit is electrically connected between the function parameter switching key and the optical sensor. The simulation control circuit generates and outputs a virtual switch signal to the optical sensor according to the physical switch signal. The simulation control circuit analyzes the physical switch signal to memorize a switched-and-set function parameter storage value. The simulation control circuit generates and outputs the virtual switch signal according to one of the physical switch signal and the switched-and-set function parameter storage value. The optical sensor performs a function parameter switching process according to the virtual switch signal.

In an embodiment, the function parameter switching key is a dots per linear inch (DPI) switching key or a polling rate switching key.

In an embodiment, the function parameter switching key is a key-type physical switch element or a touch-type switch element.

In an embodiment, the simulation control circuit is independently located outside the optical sensor, and a function parameter switching memory circuit is defined by the simulation control circuit and the function parameter switching key collaboratively. The simulation control circuit at least includes an external controller and a virtual switch signal generator. The external controller is electrically connected with the function parameter switching key. The external controller generates and outputs a control command according to the physical switch signal. The external controller analyzes the physical switch signal to memorize the switched-and-set function parameter storage value. The virtual switch signal generator is electrically connected between the external controller and the optical sensor. The virtual switch signal generator generates and outputs the virtual switch signal to the optical sensor according to the control command.

In an embodiment, the external controller includes an internal memory, or the external controller is electrically connected with an external memory. The switched-and-set function parameter storage value is stored in one of the internal memory and the external memory.

In an embodiment, the peripheral device further includes a power management device, and the power management device is electrically connected with the optical sensor and served as a power source. The power management device is further electrically connected with the external controller, or the power management device is further electrically connected with the external controller and the virtual switch signal generator.

In an embodiment, when the power management device is in a normal power state, the external controller generates and outputs the control command to the virtual switch signal generator according to the received physical switch signal. Consequently, the optical sensor performs the function parameter switching process.

In an embodiment, while the power management device is started or restarted after power interruption and the optical sensor is in a reset state, the external controller generates and outputs the control command to the virtual switch signal generator according to the memorized the switched-and-set function parameter storage value. Consequently, the optical sensor performs the function parameter switching process.

In an embodiment, the optical sensor issues a feedback monitoring signal to the simulation control circuit, and the simulation control circuit determines a content of the control command and a timing of generating and outputting the virtual switch signal according to the feedback monitoring signal. The feedback monitoring signal is a real function parameter of the optical sensor during operation, a function parameter switching notification interrupt signal of the optical sensor or a ready signal of the optical sensor.

In an embodiment, if the simulation control circuit fails to receive the physical switch signal for a specified time period, the simulation control circuit is switched from a working mode to a low power consumption mode or a sleep mode. When the simulation control circuit is in the low power consumption mode or the sleep mode, if the simulation control circuit receives the physical switch signal or the simulation control circuit performs a monitoring and comparing process and judges that a real function parameter of the optical sensor during operation and the switched-and-set function parameter storage value are different, the simulation control circuit is restored to the working mode.

In accordance with another aspect of the present invention, a function parameter switching memory operating method for a peripheral device is provided. The peripheral device at least includes a function parameter switching key, an optical sensor, a simulation control circuit and a power management device. The function parameter switching memory operating method at least includes the following steps. In a step (a), while the power management device is started or restarted after power interruption and the optical sensor is in a reset state, the simulation control circuit judges whether a switched-and-set function parameter storage value has been stored in the simulation control circuit. In a step (b), if the simulation control circuit judges that the switched-and-set function parameter storage value has been stored in the simulation control circuit, the simulation control circuit generates a virtual switch signal according to the switched-and-set function parameter storage value. Consequently, the optical sensor performs a function parameter switching process. In a step (c), if the simulation control circuit judges that the switched-and-set function parameter storage value is not stored in the simulation control circuit, the simulation control circuit judges whether a physical switch signal generated and outputted from the function parameter switching key in response to a switching trigger action of a user is received within a specified time period. In a step (d), if the simulation control circuit judging that the physical switch signal is received within the specified time period, the simulation control circuit generates the virtual switch signal according to the physical switch signal. Consequently, the optical sensor performs the function parameter switching process. In a step (e), if the simulation control circuit judges that the physical switch signal is not received within the specified time period, an operation mode of the simulation control circuit is switched from a working mode to a low power consumption mode or a sleep mode. In a step (f), when the simulation control circuit is in the low power consumption mode or the sleep mode, the simulation control circuit judges whether the physical switch signal is received, or the simulation control circuit perform a monitoring and comparing process and judges whether a real function parameter of the optical sensor during operation and the switched-and-set function parameter storage value are identical. In a step (g), if the simulation control circuit judges that the physical switch signal is received or the simulation control circuit judges that the real function parameter of the optical sensor and the switched-and-set function parameter storage value are different, the operation mode of the simulation control circuit is restored to the working mode.

In the step (b) or the step (d), before or after the optical sensor performs the function parameter switching process, the function parameter switching memory operating method further includes a step (h) of allowing the optical sensor to issue a feedback monitoring signal to the simulation control circuit. Consequently, the simulation control circuit determines a content of the control command and a timing of generating and outputting the virtual switch signal according to the feedback monitoring signal. The feedback monitoring signal is the real function parameter of the optical sensor during operation, or the feedback monitoring signal is a ready signal of the optical sensor, or the feedback monitoring signal is a function parameter switching notification interrupt signal.

In an embodiment, the feedback monitoring signal is the ready signal of the optical sensor, and the simulation control circuit waits for receiving the ready signal before the optical sensor performs the function parameter switching process. When the simulation control circuit receives the ready signal, the optical sensor performs the function parameter switching process according to one of the physical switch signal and the switched-and-set function parameter storage value.

In an embodiment, the feedback monitoring signal is the real function parameter of the optical sensor during operation and/or the function parameter switching notification interrupt signal of the optical sensor. After the optical sensor performs the function parameter switching process, if the simulation control circuit performs a monitoring and comparing process and judges that the real function parameter and the switched-and-set function parameter storage value are different, the simulation control circuit regenerates and outputs the virtual switch signal according to the switched-and-set function parameter storage value. Consequently, the optical sensor performs a function parameter calibration process.

The above objects and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:

