Method and equipment for improving anti-interference capability of refrigerator control unit
By judging and setting the unused IO port in the refrigerator control unit to the output or unused state, the problem of reducing the anti-interference capability of the refrigerator MCU is solved, and the quality and market competitiveness of the refrigerator are improved.
Patent Information
- Application Number
- CN202311237837.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-25
AI Technical Summary
The IO port of the refrigerator control unit is not correctly set to the output or unused state, resulting in the MCU's anti-interference ability being reduced, affecting the normal operation of the refrigerator.
By obtaining the usage information of each IO port on the MCU since its initialization, it is determined whether there are IO ports that have not been used within the current preset time, and set them to the output or unused state.
It improves the anti-interference capability of the refrigerator MCU, thereby improving the quality and market competitiveness of the refrigerator control unit and the overall refrigerator.
Smart Images

Figure CN119687641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of refrigerators, and in particular to a method and a device for improving the anti-interference capability of a refrigerator control unit. Background Art
[0002] The control unit of the refrigerator is a key component of the refrigerator. The normal operation of the control unit is a prerequisite for the normal operation of the refrigerator. The control unit may be interfered with and cannot work normally. Improving the anti-interference ability of the control unit is crucial to improving the quality of the refrigerator.
[0003] MCU is the core of the refrigerator control unit. It is very important to improve the anti-interference ability of MCU. The IO port of MCU is an important channel for interference to enter MCU. Generally, the IO port can be set to input, output or unused. When the IO port is in output or unused state, the anti-interference ability is higher than the input state. During design, the unused IO ports are generally set to output or unused state. However, sometimes due to negligence of developers, or simplified design, only hardware is changed without changing software. The originally used IO port is not used in the new project, and the IO port is not set to output or unused state, which will cause the MCU's anti-interference ability to be reduced, and the control unit's anti-interference ability will be reduced. Summary of the invention
[0004] An object of the present invention is to provide a method for improving the anti-interference capability of a refrigerator control unit.
[0005] A further object of the present invention is to improve the market competitiveness of refrigerators.
[0006] In particular, the present invention provides a method for improving the anti-interference capability of a refrigerator control unit, the control unit comprising an MCU, the method comprising:
[0007] Obtain usage information of each IO port whose usage status is input on the MCU since initialization;
[0008] Determine whether there is an IO port that has not been used within a preset time period according to the usage information of each IO port;
[0009] If so, the use state of the IO port that has not been used within the current preset time period is set to output or unused.
[0010] Optionally, before obtaining usage information of each IO port whose usage status is input on the MCU since initialization, the method further includes:
[0011] After each of the IO ports whose usage status is input has completed initialization, detecting the usage status of each of the IO ports;
[0012] When it is detected that any of the IO ports is used, use information about the IO port is written into a setting storage unit of the MCU.
[0013] Optionally, obtaining usage information of each IO port whose usage status is input on the MCU since initialization includes:
[0014] The usage information of each IO port whose usage status is input on the MCU since initialization is obtained from the setting storage unit of the MCU.
[0015] Optionally, the usage information includes identification information and usage time of the IO port; and
[0016] The determining, based on the usage information of each IO port, whether there is an IO port that has not been used within a current preset time period includes:
[0017] It is determined whether there is an IO port that has not been used within a preset time period according to the identification information and the usage time of each IO port.
[0018] Optionally, judging whether there is an IO port that has not been used within a current preset time period according to the identification information and usage time of each IO port includes:
[0019] The IO ports whose usage time is beyond the current preset time or whose usage time is 0 are determined as IO ports that have not been used within the current preset time.
[0020] Optionally, the setting storage unit is a RAM storage unit of the MCU.
[0021] Optionally, before obtaining usage information of each IO port whose usage status is input on the MCU since initialization, the method further includes:
[0022] After detecting that the MCU is powered on, the IO ports whose use state is input are determined, and the direction registers and data registers of the IO ports whose use state is input are initialized and set to complete the initialization of the IO ports.
[0023] Optionally, the determining the IO port whose usage status is input includes:
[0024] The IO port whose status is input is read from a preset IO port usage status table recording the usage status of the IO port and determined.
[0025] Optionally, after setting the usage status of an IO port that has not been used within a preset time period to output or unused, the method further includes:
[0026] The latest usage status of the IO port is written into the IO port usage status table.
[0027] According to another aspect of the present invention, there is also provided a device for improving the anti-interference capability of a refrigerator control unit, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above methods.
[0028] In the method proposed by the present invention, the usage information of each IO port with input usage status on the MCU since initialization is first obtained, and then it is determined whether there is an IO port that has not been used within the current preset time length according to the usage information of each IO port. If so, the usage status of the IO port that has not been used within the current preset time length is set to output or not used. Based on the technical solution provided by the present invention, by setting the usage status of the IO port that has not been used within the current preset time length to output or not used. Thereby, the anti-interference ability of the refrigerator MCU can be improved, and then the anti-interference ability of the refrigerator control unit can be improved, and then the quality of the refrigerator can be improved and the market competitiveness of the refrigerator can be improved.
[0029] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below.
[0030] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0032] Figure 1 is a flow chart of a method for improving the anti-interference capability of a refrigerator control unit according to an embodiment of the present invention;
[0033] Figure 2 is a flow chart of a method for improving the anti-interference capability of a refrigerator control unit according to a preferred embodiment of the present invention;
[0034] Figure 3 The present invention is a schematic structural block diagram of a device for improving the anti-interference capability of a refrigerator control unit according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0036] It should be noted that the technical features in the embodiment and optional embodiments of the present invention can be combined with each other under the premise of no conflict.
[0037] Figure 1 FIG. 1 is a flow chart of a method for improving the anti-interference capability of a refrigerator control unit according to an embodiment of the present invention. Figure 1 As shown, the method for improving the anti-interference capability of a refrigerator control unit proposed by the present invention may at least include the following steps S102-S106.
[0038] Step S102: Acquire usage information of each IO port whose usage status is input on the MCU (Microcontroller Unit) since initialization.
[0039] Step S104: judging whether there is an IO port that has not been used within a preset time period according to the usage information of each IO port.
[0040] Step S106: If there is an IO port that has not been used within the current preset time period, the use status of the IO port that has not been used within the current preset time period is set to output or unused.
[0041] In the embodiment of the present invention, the usage information of each IO port on the MCU that is in the input state since initialization is first obtained, and then it is determined whether there is an IO port that has not been used within the current preset time length according to the usage information of each IO port. If so, the usage state of the IO port that has not been used as input within the current preset time length is set to output or unused. Based on the technical solution provided by the present invention, by setting the usage state of the IO port that has not been used within the current preset time length to output or unused. This can improve the anti-interference ability of the refrigerator MCU, thereby improving the anti-interference ability of the refrigerator control unit, thereby improving the quality of the refrigerator and improving the market competitiveness of the refrigerator.
[0042] Figure 2The method for improving the anti-interference capability of a refrigerator control unit according to a preferred embodiment of the present invention is a flow chart. In some preferred or alternative embodiments of the present invention, before obtaining the usage information of each IO port whose usage status is input on the MCU since initialization, the method further includes the following steps S202 and S204.
[0043] Step S202: After each IO port in the input usage state is initialized, the usage status of each IO port is detected.
[0044] Step S204: When it is detected that any IO port is used, the use information of the IO port is written into the setting storage unit of the MCU.
[0045] The setting storage unit of the MCU may be a random access memory (RAM) storage unit of the MCU.
[0046] Among them, after each IO port in the input usage state is initialized, the usage of each IO port in the input usage state can be periodically detected. When it is detected that any IO port in the input usage state is used, the usage information of the IO port is written in the setting storage unit of the MCU, so as to facilitate the subsequent acquisition of the usage of the IO port according to the usage information of the IO port stored in the storage unit.
[0047] The periodic detection duration may be determined according to actual conditions, and the present invention does not impose any specific limitation thereto.
[0048] In some preferred or alternative embodiments of the present invention, the step S102 mentioned above of obtaining usage information of each IO port on the MCU whose usage status is input since initialization includes:
[0049] The usage information of each IO port whose usage status is input on the MCU since initialization is obtained from the setting storage unit of the MCU.
[0050] In step S204, when it is detected that any IO port is used, the use information of the IO port is written into the setting storage unit of the MCU, and then the use information of the IO port is retrieved from the setting storage unit of the MCU.
[0051] In some preferred or alternative embodiments according to the present invention, the usage information mentioned above includes identification information and usage time of the IO port; and
[0052] The above step S104 determines whether there is an IO port that has not been used within the current preset time period according to the usage information of each IO port, including:
[0053] According to the identification information and usage time of each IO port, it is determined whether there is an IO port that has not been used within the current preset time period.
[0054] The identification information of the IO port is a unique identification of the IO port, which is used to identify a specific IO port.
[0055] In some preferred or alternative embodiments of the present invention, judging whether there is an IO port that has not been used within a preset time period according to the identification information and usage time of each IO port may include:
[0056] The IO ports whose usage time is beyond the current preset time or whose usage time is 0 are determined as IO ports that have not been used within the current preset time.
[0057] If the usage time of the IO port is outside the current preset time or is 0, it means that the IO port has not been used for a long time. In this case, it is determined as an IO port that has not been used within the current preset time.
[0058] For example, the usage time of the IO port is 9:00-9:10, and the time corresponding to the current preset time is 10:00-10:30, then the IO port with the usage time of 9:00-9:10 can be determined as the IO port that has not been used within the current preset time.
[0059] In some preferred or alternative embodiments of the present invention, before obtaining the usage information of each IO port whose usage status is input on the MCU since initialization mentioned in step S102, the following is also included:
[0060] After detecting that the MCU is powered on, the IO ports in the input state are determined, and the direction registers and data registers of the IO ports in the input state are initialized to complete the initialization of the IO ports.
[0061] When the refrigerator is connected to the power supply, the power supply of the refrigerator control board starts to work, and the MCU of the control board is powered on and runs. When the MCU is powered on, it is initialized to initialize the IO direction register and the initial value of the IO port. After the initialization is completed, the MCU enters the normal function operation.
[0062] In one embodiment of the present invention, determining an IO port whose usage status is input may include:
[0063] The IO port whose status is input is read from a preset IO port usage status table recording the usage status of the IO port and determined.
[0064] Among them, the setting of the IO port usage status table helps to quickly read the usage status of the IO port.
[0065] In some preferred or alternative embodiments of the present invention, after setting the use status of the IO port that has not been used within the current preset time period to output or unused as mentioned in step S106 above, the method further includes:
[0066] Write the latest usage status of the IO port into the IO port usage status table.
[0067] Among them, writing the latest usage status of the IO port into the IO port usage status table helps to obtain the latest usage status of the IO port next time.
[0068] Based on the same inventive concept, the present invention also proposes a device for improving the anti-interference ability of a refrigerator control unit. Figure 3 is a schematic structural block diagram of a device for improving the anti-interference capability of a refrigerator control unit according to an embodiment of the present invention. Figure 3 As shown, the device 200 for improving the anti-interference capability of a refrigerator control unit includes a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute a method for improving the anti-interference capability of a refrigerator control unit as in any of the above embodiments.
[0069] Among them, the device for improving the anti-interference ability of the refrigerator control unit can be connected to the refrigerator data, and it can be arranged at the network side equipment such as the server and the cloud. The device for improving the anti-interference ability of the refrigerator control unit can also be a centralized control device, which is arranged in the environment or surrounding environment where the refrigerator is located. The data connection method between the device for improving the anti-interference ability of the refrigerator control unit and the refrigerator includes but is not limited to wireless transmission, infrared transmission, ultrasonic transmission, etc. The device for improving the anti-interference ability of the refrigerator control unit can also be used as a part of the refrigerator and arranged inside the refrigerator.
[0070] The present invention proposes a method and device for improving the anti-interference ability of a refrigerator control unit. In the method proposed by the present invention, the usage information of each IO port whose usage status is input on the MCU since initialization is first obtained, and then it is determined whether there is an IO port that has not been used within the current preset time length according to the usage information of each IO port. If so, the usage status of the IO port that has not been used within the current preset time length is set to output or not used. Based on the technical solution provided by the present invention, by setting the usage status of the IO port that has not been used within the current preset time length to output or not used. Thereby, the anti-interference ability of the refrigerator MCU can be improved, and then the anti-interference ability of the refrigerator control unit can be improved, and then the quality of the refrigerator can be improved and the competitiveness of the refrigerator can be improved.
[0071] Furthermore, after each IO port in the input usage state is initialized, the usage of each IO port in the input usage state is detected. When it is detected that any IO port in the input usage state is used, the usage information of the IO port is written into the setting storage unit of the MCU, so as to facilitate the subsequent acquisition of the usage of the IO port according to the usage information of the IO port stored in the storage unit.
[0072] In addition, the functional units in various embodiments of the present invention may be physically independent of each other, or two or more functional units may be integrated together, or all functional units may be integrated into one processing unit. The above integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
[0073] Those skilled in the art can understand that if the integrated functional unit is implemented in the form of software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can essentially or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, which includes a number of instructions to enable a computing device (such as a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention when running the instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.
[0074] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as a computing device such as a personal computer, a server, or a network device), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of a computing device, the computing device executes all or part of the steps of the methods described in the embodiments of the present invention.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate from the protection scope of the present invention.
Claims
1. A method for improving the anti-interference ability of a refrigerator control unit, characterized in that: The control unit includes an MCU, and the method includes: Obtain usage information of each IO port whose usage status is input on the MCU since initialization; Determine whether there is an IO port that has not been used within a preset time period according to the usage information of each IO port; If so, the use state of the IO port that has not been used within the current preset time period is set to output or unused.
2. The method according to claim 1, characterized in that Before obtaining the usage information of each IO port whose usage status is input on the MCU since initialization, it also includes: After each of the IO ports whose usage status is input has completed initialization, detecting the usage status of each of the IO ports; When it is detected that any of the IO ports is used, use information about the IO port is written into a setting storage unit of the MCU.
3. The method according to claim 2, characterized in that The obtaining of usage information of each IO port whose usage status is input on the MCU since initialization includes: The usage information of each IO port whose usage status is input on the MCU since initialization is obtained from the setting storage unit of the MCU.
4. The method according to claim 3, characterized in that The usage information includes identification information and usage time of the IO port; as well as The determining, based on the usage information of each IO port, whether there is an IO port that has not been used within a current preset time period includes: It is determined whether there is an IO port that has not been used within a preset time period according to the identification information and the usage time of each IO port.
5. The method according to claim 4, characterized in that The determining whether there is an IO port that has not been used within a preset time period according to the identification information and the usage time of each IO port includes: The IO ports whose usage time is beyond the current preset time or whose usage time is 0 are determined as IO ports that have not been used within the current preset time.
6. The method according to claim 2, characterized in that The setting storage unit is a RAM storage unit of the MCU.
7. The method according to claim 1, characterized in that Before obtaining the usage information of each IO port whose usage status is input on the MCU since initialization, it also includes: After detecting that the MCU is powered on, the IO ports whose use state is input are determined, and the direction registers and data registers of the IO ports whose use state is input are initialized and set to complete the initialization of the IO ports.
8. The method according to claim 7, characterized in that The step of determining the IO port whose usage status is input includes: The IO port whose status is input is read from a preset IO port usage status table recording the usage status of the IO port and determined.
9. The method according to claim 8, characterized in that After setting the use status of the IO port that has not been used within the current preset time to output or unused, the method further includes: The latest usage status of the IO port is written into the IO port usage status table.
10. A device for improving the anti-interference ability of a refrigerator control unit, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 9.