Chip sampling voltage processing method and device, electrical equipment and storage medium
By performing software filtering on the chip's sampled voltage, false alarms can be identified and filtered out, thus solving the problem of false alarms in chip sampling, improving the reliability of voltage signal logic processing, and reducing costs.
Patent Information
- Application Number
- CN202111631457.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In existing technologies, low-performance chips are prone to false alarms during voltage sampling, which affects the reliability of subsequent voltage signal logic processing.
By using software filtering, false sampling voltages in the chip's sampling voltage are identified and filtered out, ensuring that only the correct sampling voltage values are retained, thus achieving accuracy in the chip's internal logic processing.
It improves the reliability of voltage signal logic processing, reduces chip costs, and at the same time ensures the same performance requirements as high-end chips.
Smart Images

Figure CN114487541B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of voltage sampling, and particularly relates to a chip-sampled voltage processing method and device, an electrical appliance and a storage medium, and especially relates to a chip-sampled voltage software processing strategy implementation method and device, an electrical appliance and a storage medium. BACKGROUND
[0002] The chip sampling of a voltage signal is always a voltage signal sampling mode used in related solutions, and the sampling of the voltage needs to have high accuracy, high precision and high real-time sampling requirements. In actual voltage sampling, the related solutions convert the input sampling voltage value into a sampling voltage value allowed by the sampling port of the chip through a conversion circuit. The principle is that the input sampling voltage (i.e., the input sampling voltage value) and the chip sampling voltage form a one-time function relationship through the conversion circuit, i.e., the input sampling voltage value can be confirmed through the chip sampling voltage. The voltage sampling port of the chip usually has high precision and allows a small sampling voltage value.
[0003] However, the performance of a relatively cheap chip is relatively low, and the chip (i.e., a relatively cheap chip) has an occasional instantaneous feedback sampling value of 0V (i.e., a sampling error) under the condition that a non-0 voltage is always input to the chip sampling port of the chip, as compared with a high-end chip. Since the instantaneous sampling error does not cause a safety problem to the performance of a product, and the use of the chip can save costs and increase profits. However, the voltage sampling error affects the subsequent software logic processing, and further affects the reliability of the logic processing based on the sampled voltage signal, such as the reliability of the control of an electrical appliance (such as an air conditioner, a washing machine, etc.).
[0004] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The present application aims to provide a chip-sampled voltage processing method and device, an electrical appliance and a storage medium, to solve the problem that a relatively cheap chip may have a voltage sampling error when the chip samples a voltage signal, and further affect the reliability of the logic processing based on the sampled voltage signal, so as to filter the incorrect sampling values of the chip-sampled voltage, ensure that the correct sampling values are used in the logic processing based on the sampled voltage signal, and improve the reliability of the logic processing based on the sampled voltage signal.
[0006] The application provides a chip sampling voltage processing method, comprising: controlling the chip to sample the voltage of an external input power supply to obtain a sampling voltage; obtaining the sampling voltage obtained by sampling the voltage of the external input power supply by the chip, and recording the sampling voltage as a chip sampling voltage; performing software filtering processing on the chip sampling voltage to filter out false sampling voltage in the chip sampling voltage to obtain correct sampling voltage; and performing preset logic processing in the chip according to the correct sampling voltage to realize logic control based on the sampling voltage obtained by sampling the voltage of the external input power supply by the chip.
[0007] In some embodiments, obtaining the sampling voltage obtained by sampling the voltage of the external input power supply by the chip, and recording the sampling voltage as a chip sampling voltage, comprises: sampling the voltage generated by the external input power supply by using a sampling port of a circuit board on which the chip is located to obtain a power supply voltage; and converting the power supply voltage input from the sampling port by using a conversion circuit in the circuit board to obtain a sampling voltage conforming to the preset voltage range of the chip, and recording the sampling voltage as a chip sampling voltage.
[0008] In some embodiments, converting the power supply voltage input from the sampling port by using the conversion circuit in the circuit board to obtain a sampling voltage conforming to the preset voltage range of the chip, and recording the sampling voltage as a chip sampling voltage, comprises: determining the set chip sampling voltage corresponding to the set power supply voltage identical to the power supply voltage input from the sampling port in the corresponding relationship between the set power supply voltage and the set chip sampling voltage as the sampling voltage conforming to the preset voltage range of the chip, and recording the sampling voltage conforming to the preset voltage range of the chip as a chip sampling voltage.
[0009] In some embodiments, performing software filtering processing on the chip sampling voltage to filter out false sampling voltage in the chip sampling voltage to obtain correct sampling voltage, comprises: periodically obtaining the chip sampling voltage according to a set sampling period, and recording the periodically obtained chip sampling voltage as an initial sampling voltage; continuing to periodically obtain the chip sampling voltage according to the set sampling period and recording the periodically obtained chip sampling voltage as a current sampling voltage in the case that the initial sampling voltage starts to become a non-zero value; starting a preset filtering mechanism; and filtering the current sampling voltage by using the filtering mechanism to filter out false sampling voltage in the chip sampling voltage to obtain correct sampling voltage.
[0010] In some embodiments, filtering the current sampling voltage using the filtering mechanism comprises: determining whether the current sampling voltage is 0; if the current sampling voltage is 0, filtering the current sampling voltage according to a previous sampling voltage in the set sampling period; if the current sampling voltage is not 0, determining the current sampling voltage as a filtered sampling voltage filtered from the current sampling voltage, and taking the filtered sampling voltage as the correct sampling voltage.
[0011] In some embodiments, filtering the current sampling voltage according to a previous sampling voltage in the set sampling period comprises: determining whether a difference between the previous sampling voltage and a set minimum voltage resolution is within a set error range; if the difference between the previous sampling voltage and the set minimum voltage resolution is within the set error range, determining the current sampling voltage as a filtered sampling voltage filtered from the current sampling voltage, and taking the filtered sampling voltage as the correct sampling voltage; if the difference between the previous sampling voltage and the set minimum voltage resolution is not within the set error range, determining whether a time length from a time when the current sampling voltage is acquired to a current time exceeds a set time; if yes, determining the current sampling voltage as a filtered sampling voltage filtered from the current sampling voltage, and taking the filtered sampling voltage as the correct sampling voltage; otherwise, determining a non-0 value when the initial sampling voltage starts to become a non-0 value as a filtered sampling voltage filtered from the initial sampling voltage, and taking the filtered sampling voltage as the correct sampling voltage.
[0012] In some embodiments, the obtaining unit obtains the sampling voltage sampled by the chip from the voltage of the external input power supply, and records the sampling voltage as a chip sampling voltage, which comprises: sampling the voltage generated by the external input power supply using a sampling port of a circuit board on which the chip is located, to obtain a power supply voltage; and converting the power supply voltage input from the sampling port using a conversion circuit in the circuit board, to obtain a sampling voltage conforming to a preset voltage range of the chip, which is recorded as the chip sampling voltage.
[0013] In some embodiments, the obtaining unit obtains the sampling voltage sampled by the chip from the voltage of the external input power supply, and records the sampling voltage as a chip sampling voltage, which comprises: sampling the voltage generated by the external input power supply using a sampling port of a circuit board on which the chip is located, to obtain a power supply voltage; and converting the power supply voltage input from the sampling port using a conversion circuit in the circuit board, to obtain a sampling voltage conforming to a preset voltage range of the chip, which is recorded as the chip sampling voltage.
[0014] In some embodiments, the acquisition unit converts the power supply voltage input from the sampling port by using the conversion circuit in the circuit board to obtain a sampling voltage conforming to the preset voltage range of the chip, denoted as a chip sampling voltage, including: according to the correspondence between the set power supply voltage and the set chip sampling voltage, determining the set chip sampling voltage corresponding to the set power supply voltage same as the power supply voltage input from the sampling port as the sampling voltage conforming to the preset voltage range of the chip, and recording the sampling voltage conforming to the preset voltage range of the chip as the chip sampling voltage.
[0015] In some embodiments, the control unit performs software filtering processing on the chip sampling voltage to filter out false sampling voltages in the chip sampling voltage to obtain correct sampling voltages, including: periodically acquiring the chip sampling voltage according to a set sampling period, and recording the periodically acquired chip sampling voltage as an initial sampling voltage; in the case where the initial sampling voltage starts to become a non-0 value, continuing to periodically acquire the chip sampling voltage according to the set sampling period, and recording the periodically acquired chip sampling voltage as a current sampling voltage; starting a preset filtering mechanism; and filtering the current sampling voltage by using the filtering mechanism to filter out false sampling voltages in the chip sampling voltage to obtain correct sampling voltages.
[0016] In some embodiments, the control unit filters the current sampling voltage by using the filtering mechanism, including: determining whether the current sampling voltage is 0; if the current sampling voltage is 0, filtering the current sampling voltage according to the previous sampling voltage in the set sampling period; and if the current sampling voltage is not 0, determining the current sampling voltage as a filtered sampling voltage filtered by filtering, and taking the filtered sampling voltage as the correct sampling voltage.
[0017] In some embodiments, the control unit filters the current sampling voltage according to the previous sampling voltage in the set sampling period, including: determining whether the difference between the previous sampling voltage and the set minimum voltage resolution is within a set error range; if the difference between the previous sampling voltage and the set minimum voltage resolution is within the set error range, determining the current sampling voltage as a filtered sampling voltage filtered, and taking the filtered sampling voltage as the correct sampling voltage; if the difference between the previous sampling voltage and the set minimum voltage resolution is not within the set error range, determining whether the length of time from the time of obtaining the current sampling voltage to the current time exceeds a set time; if yes, determining the current sampling voltage as the filtered sampling voltage filtered, and taking the filtered sampling voltage as the correct sampling voltage; otherwise, determining the non-zero value when the initial sampling voltage starts to become a non-zero value as the filtered sampling voltage filtered, and taking the filtered sampling voltage as the correct sampling voltage.
[0018] In order to match the above-mentioned device, the application further provides an electrical equipment, including: the above-mentioned chip sampling voltage processing device.
[0019] In order to match the above-mentioned method, the application further provides a storage medium, including a stored program, wherein when the program runs, the device where the storage medium is located executes the above-mentioned chip sampling voltage processing method.
[0020] Therefore, the scheme of the application, by setting the software processing strategy, under the premise of not affecting the safety performance of the chip sampling voltage affecting the subsequent logic processing, filtering the mis-sampling value of the sampling voltage input into the chip, ensuring that the chip sampling voltage is the correct sampling value and will not filter out the correct sampling value, so as to ensure that the correct sampling value is used when the logic processing is performed based on the sampling obtained voltage signal, thereby filtering the mis-sampling value of the chip sampling voltage, ensuring that the correct sampling value is used when the logic processing is performed based on the sampling obtained voltage signal, which is beneficial to improve the reliability of the logic processing when the logic processing is performed based on the sampling obtained voltage signal.
[0021] Other features and advantages of the application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the application.
[0022] The technical scheme of the application will be further described in detail below with the drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The flowchart of the application improves the previous input voltage sampling processing.
[0024] Figure 2 Flowchart of an embodiment of the chip sampling voltage processing method of the present application;
[0025] Figure 3 Flowchart of an embodiment of the chip sampling voltage processing method of the present application for obtaining the sampling voltage obtained by sampling the voltage of the external input power supply of the chip;
[0026] Figure 4 Flowchart of an embodiment of the chip sampling voltage processing method of the present application for performing software filtering processing on the chip sampling voltage;
[0027] Figure 5 Flowchart of an embodiment of the chip sampling voltage processing method of the present application for filtering the current sampling voltage by using the filtering mechanism;
[0028] Figure 6 Flowchart of an embodiment of the chip sampling voltage processing method of the present application for filtering the current sampling voltage according to the previous sampling voltage;
[0029] Figure 7 Structural diagram of an embodiment of the chip sampling voltage processing device of the present application;
[0030] Figure 8 Improved input voltage sampling processing flowchart of the present application;
[0031] Figure 9 Flowchart of the sampling voltage filtering processing in the chip sampling voltage software processing strategy of the present application.
[0032] In the embodiments of the present application, the reference signs in the accompanying drawings are as follows:
[0033] 102 - acquisition unit; 104 - control unit. DETAILED DESCRIPTION
[0034] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0035] Figure 1 Improved input voltage sampling processing flowchart of the present application. As shown in Figure 1 the input voltage sampling processing flowchart in the related solution, it includes:
[0036] Step 11, the voltage generated by the external power supply is input into the sampling voltage via the sampling port of the circuit board.
[0037] Step 12, the sampling voltage input into the sampling port of the circuit board is processed by the conversion circuit part of the circuit board, so that the voltage value at the chip voltage sampling port reaches the chip port limited sampling value range, and the chip sampling voltage is obtained.
[0038] Step 13, according to the sampling voltage (i.e. the chip sampling voltage obtained in step 12), the processing of the chip internal software logic is realized.
[0039] Since the input voltage sampling value of the circuit board (i.e. the sampling voltage input into the sampling port of the circuit board) and the chip voltage sampling value are in a linear relationship, the input sampling voltage can be obtained through the chip sampling voltage, so that the voltage information processing of the external input voltage value of the circuit board and the subsequent logic processing can be realized. However, in the actual use of the chip, there may be an occasional sampling value of 0, which is an error sampling value, so this phenomenon needs to be processed.
[0040] Among them, the voltage information processing of the external input voltage value of the circuit board and the subsequent logic processing include: collecting a specific voltage value, inputting the voltage value information to the chip through the circuit, and the chip obtains the voltage data which can be used for subsequent chip logic processing, such as the collected voltage exceeding the limited value, the chip will output a voltage overvoltage signal and control the product (such as air conditioner, washing machine and other electrical equipment) to report overvoltage and stop running.
[0041] The chip will sample the voltage of the chip voltage sampling port at a very high frequency. The sampling principle is that the chip voltage sampling part is composed of multiple logic switches. When different voltages are input into the chip, the corresponding switch will be opened. The chip detects the opened logic switch to obtain the chip sampling port voltage information. The logic switch detection part of the actual use of the cost-reduced chip may occasionally work intermittently, resulting in an intermittent period that is not detected as an opened logic switch, thus judging that the chip sampling port voltage is 0. Among them, the sampling structure is integrated in the chip. The user only needs to pay attention to that the chip can detect the voltage value connected to the specific pin of the chip, which can be understood as that the voltage collection part of the chip may occasionally work intermittently, resulting in that the chip internally judges that the sampling voltage is 0.
[0042] In order to overcome the logic problem caused by the sampling false report of a relatively low performance chip, and at the same time ensure that only the sampling false report voltage is filtered without filtering the correct sampling voltage, the scheme of the present application proposes a software voltage sampling algorithm, specifically a chip sampling voltage software processing strategy, such as a chip sampling voltage processing method.
[0043] According to an embodiment of the present application, a chip sampling voltage processing method is provided, as shown in Figure 2 The chip sampling voltage processing method can include steps S110-S140.
[0044] At step S110, the chip samples the voltage of an external input power supply to obtain a sampling voltage.
[0045] At step S120, the sampling voltage obtained by sampling the voltage of the external input power supply by the chip is acquired, and is denoted as a chip sampling voltage.
[0046] In some embodiments, the specific process of acquiring the sampling voltage obtained by sampling the voltage of the external input power supply by the chip as the chip sampling voltage in step S120 is described in the following exemplary description.
[0047] The specific process of acquiring the sampling voltage obtained by sampling the voltage of the external input power supply by the chip as the chip sampling voltage in step S120 is further described below with reference to Figure 3 The specific process of acquiring the sampling voltage obtained by sampling the voltage of the external input power supply by the chip as the chip sampling voltage in step S120 is further described below with reference to
[0048] At step S210, the voltage generated by the external input power supply is sampled by using a sampling port of a circuit board on which the chip is located to obtain a power supply voltage.
[0049] At step S220, the power supply voltage input from the sampling port is converted by using a conversion circuit in the circuit board to obtain a sampling voltage that meets a preset voltage range of the chip, and is denoted as a chip sampling voltage.
[0050] Figure 8 The improved input voltage sampling processing flowchart of the present application is shown in Figure 8 In the scheme of the present application, the improved input voltage sampling processing flowchart includes:
[0051] At step 21, the voltage generated by the external power supply is input as a sampling voltage via a sampling port of a circuit board.
[0052] At step 22, the sampling voltage input by the sampling port of the circuit board is processed by a conversion circuit portion of the circuit board, so that the voltage value at the chip voltage sampling port is within the chip port limited sampling value range, and a chip sampling voltage is obtained.
[0053] At step 23, the chip sampling voltage is processed by software to filter the chip sampling voltage to a correct sampling value.
[0054] Step 24, according to the sampling voltage (i.e. the correct sampling value obtained in step 23), the processing of the chip internal software logic is realized.
[0055] Figure 8 The improved input voltage sampling processing flow shown in the figure, compared with the improved input voltage sampling processing flow shown in the figure, the software processing sampling voltage flow is added. Figure 1
[0056] In some embodiments, in step S220, the power supply voltage input from the sampling port is converted by the conversion circuit in the circuit board to obtain a sampling voltage conforming to the preset voltage range of the chip, which is called chip sampling voltage, including: according to the corresponding relationship between the set power supply voltage and the set chip sampling voltage, the set chip sampling voltage corresponding to the set power supply voltage which is the same as the power supply voltage input from the sampling port in the corresponding relationship is determined as the sampling voltage conforming to the preset voltage range of the chip, and the sampling voltage conforming to the preset voltage range of the chip is recorded as the chip sampling voltage.
[0057] Referring to Figure 8 The conversion circuit part of the circuit board is processed, including: the circuit functions as linear voltage conversion. If the input voltage of the circuit is x, the output voltage y=ax+b. Where a and b are constants. That is, the voltage output to the chip can be used to deduce the input voltage value of the conversion circuit. The conversion method can be resistance division, using an operational amplifier to amplify the voltage, using a special chip to convert voltage, etc.
[0058] At step S130, the chip sampling voltage is subjected to software filtering processing to filter out false sampling voltage in the chip sampling voltage, and a correct sampling voltage is obtained.
[0059] In some embodiments, the specific process of step S130 for software filtering processing of the chip sampling voltage to filter out false sampling voltage in the chip sampling voltage to obtain a correct sampling voltage, see the following exemplary description.
[0060] The following will be combined Figure 4 The embodiment flowchart of the method of the application shown in the figure for software filtering processing of the chip sampling voltage, further illustrates the specific process of step S130 for software filtering processing of the chip sampling voltage, including: step S310 to step S340.
[0061] Step S310, according to the set sampling period, the chip sampling voltage is periodically obtained, and the periodically obtained chip sampling voltage is recorded as the initial sampling voltage.
[0062] Step S320, in the case that the initial sampling voltage starts to become a non-0 value, continue to periodically acquire the chip sampling voltage as the current sampling voltage according to the set sampling period.
[0063] Step S330, start a preset filtering mechanism.
[0064] Step S340, in the case that the filtering mechanism has been started, filter the current sampling voltage by using the filtering mechanism to filter out false sampling voltages in the chip sampling voltage to obtain correct sampling voltages.
[0065] The scheme of the present application can correctly identify correct voltage sampling and false sampling voltage under the voltage value fed back after the chip sampling voltage is processed by the chip, and filter out false sampling voltage without simultaneously filtering out correct sampling voltage. The software processing strategy is improved to ensure that voltage sampling can meet the performance requirements of high-end chips, and the cost of the chip is reduced.
[0066] In some embodiments, the specific process of filtering the current sampling voltage by using the filtering mechanism in step S340 is described in the following exemplary description.
[0067] The following will be described in combination with Figure 5 The flowchart of filtering the current sampling voltage by using the filtering mechanism in the method of the present application is shown in FIG. 4, which further describes the specific process of filtering the current sampling voltage by using the filtering mechanism in step S340, including steps S410 to S430.
[0068] Step S410, determine whether the current sampling voltage is 0.
[0069] Step S420, if the current sampling voltage is 0, filter the current sampling voltage according to the previous sampling voltage in the set sampling period. The previous sampling voltage is the sampling voltage corresponding to a sampling point before the sampling point corresponding to the current sampling voltage in the set sampling period.
[0070] Step S430, if the current sampling voltage is not 0, determine the current sampling voltage as a filtered sampling voltage obtained by filtering, and take the filtered sampling voltage as the correct sampling voltage.
[0071] Figure 9 FIG. 4 is a flowchart of a sampling voltage filtering process in a software processing strategy of a chip sampling voltage according to the present application. Figure 9 The flowchart of a sampling voltage filtering process in a software processing strategy of a chip sampling voltage includes:
[0072] Step 31: The chip periodically obtains the initial sampling voltage. This initial sampling voltage can be... Figure 1 and Figure 8 The chip sampling voltage shown in the example is after being processed by the conversion circuit.
[0073] Step 32: When the chip starts sampling a non-zero value, that is, when the initial sampling voltage obtained by the chip periodically begins to become non-zero, continue periodic sampling to obtain the chip sampling voltage obtained by continuing periodic sampling when the initial sampling voltage begins to become non-zero. This current sampling voltage value is the sampling voltage value relative to the initial sampling voltage.
[0074] If the chip voltage sample value is 0 at the beginning, it means there is no voltage input to the chip, so no processing is performed. Subsequent processing only begins after an input is detected at the chip voltage sampling port, causing the sample value to be non-zero. This subsequent processing refers to... Figure 9 The process shown is the one after a non-zero value is obtained; otherwise, it will remain at the point where the chip periodically obtains the initial sampling voltage.
[0075] Step 33: Determine if the current sampled voltage value is 0: If yes, proceed to step 34. Otherwise, proceed to step 35.
[0076] If the voltage sampling value is 0 in subsequent chip voltage sampling, there are two possibilities: one is that the sampling port voltage is 0, and the other is that the logic switch detection part of the voltage detection section in the chip is intermittently working, resulting in a false judgment of a voltage value of 0.
[0077] In some implementations, the specific process of filtering the current sampling voltage based on the previous sampling voltage within the set sampling period in step S420 is illustrated in the following exemplary description.
[0078] The following is combined Figure 6 The schematic diagram shown is a flowchart of an embodiment of the method of the present invention that filters the current sampled voltage based on the previous sampled voltage. The specific process of filtering the current sampled voltage based on the previous sampled voltage in step S420 is further explained, including steps S510 to S530.
[0079] Step S510: Determine whether the difference between the previous sampled voltage and the set minimum voltage resolution value is within the set error range.
[0080] Step S520: If the difference between the previous sampled voltage and the set minimum voltage resolution value is within the set error range, then the current sampled voltage is determined as the filtered sampled voltage obtained by filtering, and the filtered sampled voltage is used as the correct sampled voltage.
[0081] Step S530, if the difference between the previous sampling voltage and the set minimum voltage resolution is not within the set error range, determine whether the length of time from the time when the current sampling voltage is obtained to the current time exceeds the set time: if yes, determine the current sampling voltage as the filtered sampling voltage obtained by filtering, and take the filtered sampling voltage as the correct sampling voltage. Otherwise, determine the non-zero value when the initial sampling voltage starts to become a non-zero value as the filtered sampling voltage obtained by filtering, and take the filtered sampling voltage as the correct sampling voltage.
[0082] As shown in Figure 9 , a sampling voltage filtering process in a software processing strategy of a chip sampling voltage further includes:
[0083] Step 34, determine whether the previous sampling voltage value is close to the minimum resolution: if yes, execute step 35. Otherwise, execute step 36.
[0084] The minimum resolution refers to the minimum voltage resolution. The minimum voltage resolution refers to the minimum voltage value unit that can be recognized by the chip. For example, the minimum resolution is 0.0001V, and when the sampling voltage is 1V, the corresponding voltage value 1 / 0.0001=10000 is returned in the program. When the sampling voltage is 0.00025V, the corresponding voltage value 0.00025 / 0.0001=2 is returned in the program due to the minimum resolution (specifically, the tail-cut method can be used because smaller voltage cannot be distinguished). Since the minimum resolution is usually very small like 0.0001V, the voltage values 2 and 3 returned in the program represent sampling voltage values of only about 0.0002V and 0.0003V, respectively. Therefore, such sampling voltage values can be considered to be close to the minimum resolution. The judgment of how many V below the sampling voltage value is considered to be close to the minimum resolution can be flexibly set according to actual conditions.
[0085] Due to the high sampling accuracy requirement in actual use, the chip voltage sampling port requires extremely low voltage resolution, so the actual sampling port voltage value is at least several tens of times larger than the minimum voltage resolution to meet the accuracy requirement. This makes the voltage sampling value not immediately change from several tens of times the minimum voltage to 0, but gradually decrease to 0 in subsequent sampling due to the discharge effect. Therefore, if the previous sampling value is close to the minimum voltage resolution (the difference between the two is within several tens of times), it can be determined that the sampling port voltage is 0 as the correct data, and the actual sampling value is adopted. If it is several tens of times higher than the minimum voltage resolution, i.e., according to the discharge effect, the sampling port voltage will not immediately change to 0, so it is determined to be an incorrect sampling value, and the previous non-zero value is adopted as the voltage after filtering.
[0086] Step 35, determine the real-time sampling value as a correct sampling value, and then execute step 38.
[0087] Step 36, determine whether the current time is more than a set time, such as 1 second, from the time when the current sampling voltage value is obtained: if yes, execute step 35; otherwise, execute step 37.
[0088] If the next sampling value is still 0, the previous value that is not 0 is also used as the voltage after filtering and processing. After another second, if the sampling value is still 0, the 0 is directly used as the sampling voltage without filtering. This approach has two possible phenomena: one is that the voltage value is actually reduced to 0 during the error sampling period, resulting in the value of the subsequent continuous sampling being 0, so the 0 is determined as a correct value. The other is that the chip voltage sampling part has a problem, that is, the logic switch detection part in the chip occasionally works discontinuously for more than 1 second, so the chip quality does not meet the requirements, and the 0 value is retained to enable the subsequent processing to find the hardware problem of the circuit board.
[0089] In some alternative embodiments, the operation of filtering the abnormal value 0 in the embodiment of the present application is to use the original non-0 value as the voltage after filtering and processing when the value is 0 for more than 1 second. In practice, 1 second can be changed to other intervals according to safety requirements.
[0090] Step 37, determine the non-0 value when the initial sampling voltage periodically obtained by the chip starts to become a non-0 value as a correct sampling value.
[0091] Step 38, output the correct sampling value as a sampling voltage after overcurrent processing, and record it as a correct sampling voltage.
[0092] Step 39, realize the processing of the chip internal software logic according to the correct sampling voltage.
[0093] According to the examples shown in steps 31 to 39, the scheme of the present application can exclude the problem of sampling false reporting 0 caused by the logic switch detection part in the chip working discontinuously, and ensure that the normal 0 reporting part is not filtered out after filtering the false reporting 0 data.
[0094] Through the software processing strategy of the scheme of the present application, the chip with the current cost reduction scheme can meet the same effect as the high-performance chip, the cost is reduced, and the abnormal sampling value 0 is reasonably filtered and processed, so that the normal chip voltage sampling 0 required for subsequent processing is not filtered out.
[0095] At step S140, according to the correct sampling voltage, the logic processing preset in the chip is performed, and logic control based on the sampling voltage obtained by sampling the voltage of the external input power supply of the chip is realized.
[0096] The scheme of the present application can correct the sampling problem of a type of chip used for cost reduction, and ensure normal use of the chip. Specifically, the scheme of the present application adopts a software processing strategy to filter the incorrect sampling value of the sampling voltage input into the chip without affecting the safety performance of the subsequent logic processing, so as to ensure that the data collected by the chip is the correct sampling value, and at the same time, the correct sampling value is not filtered out, the sampling requirement as high-end chips is realized, the cost of the chip is saved, the software processing problem caused by the incorrect sampling voltage of the chip is overcome, and the reliability of the logic processing based on the voltage signal obtained by sampling is improved.
[0097] In the scheme, it is considered that the incorrect sampling value filtered out by filtering the chip sampling voltage is 0, but if the sampling value is always 0 for a long time, 0 cannot be filtered out for a long time, because at this time, the hardware may have a problem, and thus a safety problem may occur, so it is necessary to ensure that the safety performance caused by sampling is not affected. In order to ensure that the safety performance caused by sampling is not affected, it is necessary to ensure that the correct sampling value is not filtered out. For example, after entering the voltage filtering processing, the sampling voltage is still 0 after 1 second, there may be two phenomena, one is that the voltage value is indeed reduced to 0 during the incorrect sampling period, so that the value of the subsequent continuous sampling is always 0, and thus 0 is determined as the correct value; the other is that the chip voltage sampling part has a problem, that is, the logic switch detection part in the chip occasionally works discontinuously for more than 1 second, at this time, the quality of the chip does not meet the requirements, so the 0 value is retained to enable the subsequent processing to find that the hardware of the circuit board has a problem. According to this processing mode, the sampling value 0 is treated as the correct data for processing at this time, that is, the sampling voltage value 0 will not be filtered as an incorrect sampling after 1 second, so that the correct sampling value is not filtered out.
[0098] Compared with the related scheme, the scheme of the present application solves the problem that the chip sampling is judged as 0 due to the abnormality of the chip itself, can identify the correct sampling voltage and the incorrect sampling voltage value, and can ensure that the incorrect sampling value is limited within a certain range, so as to ensure that the chip sampling can meet the normal working requirements, and has good feasibility and practicability. The scheme of the present application can solve the problem that the chip incorrectly reports the sampling voltage value as 0 due to the abnormality of the chip when the input voltage is normal during voltage sampling. The incorrect voltage value can be filtered out, and at the same time, it is necessary to ensure that the chip working quality meets the requirements during processing, and the sampling filtering cannot affect the correct logic processing.
[0099] According to the technical scheme of the embodiment, the software processing strategy is set, the incorrect sampling value of the sampling voltage input into the chip is filtered under the premise that the safety performance of the subsequent logic processing of the chip sampling voltage is not affected, the sampling voltage of the chip is ensured to be the correct sampling value and the correct sampling value is not filtered out, the correct sampling value is ensured to be used when the logic processing is performed on the voltage signal obtained based on sampling, and therefore, the incorrect sampling value of the chip sampling voltage is filtered, the correct sampling value is ensured to be used when the logic processing is performed on the voltage signal obtained based on sampling, and the reliability of the logic processing performed on the voltage signal obtained based on sampling is improved.
[0100] According to the embodiment of the application, a chip sampling voltage processing device corresponding to the processing method of the chip sampling voltage is also provided. Figure 7 As shown in the structural schematic diagram of an embodiment of the device of the application, the chip sampling voltage processing device can include an acquisition unit 102 and a control unit 104.
[0101] The control unit 104 is configured to control the chip to sample the voltage of the external input power supply to obtain a sampling voltage. For details of the specific functions and processing of the control unit 104, see step S110.
[0102] The acquisition unit 102 is configured to acquire the sampling voltage obtained by sampling the voltage of the external input power supply by the chip, which is recorded as the chip sampling voltage. For details of the specific functions and processing of the acquisition unit 102, see step S120.
[0103] In some embodiments, the acquisition unit 102 acquires the sampling voltage obtained by sampling the voltage of the external input power supply by the chip, which is recorded as the chip sampling voltage, including:
[0104] The acquisition unit 102 is specifically further configured to sample the voltage generated by the external input power supply by using the sampling port of the circuit board where the chip is located to obtain a power supply voltage. For details of the specific functions and processing of the acquisition unit 102, see step S210.
[0105] The acquisition unit 102 is specifically further configured to convert the power supply voltage input from the sampling port by using the conversion circuit in the circuit board to obtain a sampling voltage that meets the preset voltage range of the chip, which is recorded as the chip sampling voltage. For details of the specific functions and processing of the acquisition unit 102, see step S220.
[0106] Figure 8 The improved input voltage sampling processing flowchart of the application is shown in FIG. 2. Figure 8 As shown in the improved input voltage sampling processing flowchart of the application, the improved input voltage sampling processing flowchart includes:
[0107] Step 21, the voltage generated by the external power supply is input into the sampling voltage via the sampling port of the circuit board.
[0108] Step 22, the sampling voltage input into the sampling port of the circuit board is processed by the conversion circuit part of the circuit board, so that the voltage value at the chip voltage sampling port reaches the chip port limited sampling value range, and the chip sampling voltage is obtained.
[0109] Step 23, the chip sampling voltage is processed by software to filter the chip sampling voltage into a correct sampling value.
[0110] Step 24, according to the sampling voltage (i.e. the correct sampling value obtained in step 23), the processing of the chip internal software logic is realized.
[0111] Figure 8 The improved input voltage sampling processing flow shown in the figure, compared with Figure 1 The improved input voltage sampling processing flow shown in the figure, compared with
[0112] In some embodiments, the acquisition unit 102 converts the power supply voltage input from the sampling port by the conversion circuit in the circuit board to obtain a sampling voltage conforming to the preset voltage range of the chip, which is called chip sampling voltage, including: the acquisition unit 102 is specifically configured to determine the set chip sampling voltage corresponding to the same set power supply voltage in the corresponding relationship between the set power supply voltage and the set chip sampling voltage as the sampling voltage conforming to the preset voltage range of the chip according to the corresponding relationship between the set power supply voltage and the set chip sampling voltage, and record the sampling voltage conforming to the preset voltage range of the chip as the chip sampling voltage.
[0113] Referring to Figure 8 The conversion circuit part of the circuit board includes: the circuit functions as linear voltage conversion. If the input voltage of the circuit is x, the output voltage y=ax+b. Wherein a and b are constants. That is, the voltage output to the chip can be used to inversely deduce the input voltage value of the conversion circuit. The conversion device can be resistance division, using an operational amplifier to amplify the voltage, using a special chip to convert voltage, etc.
[0114] The control unit 104 is further configured to perform software filtering processing on the chip sampling voltage to filter out false sampling voltage in the chip sampling voltage, and obtain correct sampling voltage. The specific functions and processing of the control unit 104 are also referred to step S130.
[0115] In some embodiments, the control unit 104 performs software filtering on the chip sampling voltage to filter out false sampling voltages in the chip sampling voltage to obtain correct sampling voltages, including:
[0116] The control unit 104 is specifically further configured to periodically obtain the chip sampling voltage at a set sampling period, and record the periodically obtained chip sampling voltage as an initial sampling voltage. For specific functions and processes of the control unit 104, see step S310.
[0117] The control unit 104 is specifically further configured to continue to periodically obtain the chip sampling voltage at the set sampling period and record the periodically obtained chip sampling voltage as a current sampling voltage, in the case that the initial sampling voltage starts to become a non-zero value. For specific functions and processes of the control unit 104, see step S320.
[0118] The control unit 104 is specifically further configured to start a preset filtering mechanism. For specific functions and processes of the control unit 104, see step S330.
[0119] The control unit 104 is specifically further configured to filter the current sampling voltage by using the filtering mechanism to filter out false sampling voltages in the chip sampling voltage to obtain correct sampling voltages, in the case that the filtering mechanism has been started. For specific functions and processes of the control unit 104, see step S340.
[0120] The scheme of the present application can correctly identify correct voltage sampling and false sampling voltage under the voltage value fed back after the chip sampling voltage is processed by the chip, and filter out false sampling voltage without simultaneously filtering out correct sampling voltage. Through the improved software processing strategy, the performance requirements of voltage sampling can be realized with high-end chips, while the cost of the chip is reduced.
[0121] In some embodiments, the control unit 104 filters the current sampling voltage by using the filtering mechanism, including:
[0122] The control unit 104 is specifically further configured to determine whether the current sampling voltage is 0. For specific functions and processes of the control unit 104, see step S410.
[0123] The control unit 104 is further configured to filter the current sampling voltage based on the previous sampling voltage within the set sampling period if the current sampling voltage is 0. The previous sampling voltage is the sampling voltage corresponding to a sampling point preceding the sampling point corresponding to the current sampling voltage within the set sampling period. The specific functions and processing of the control unit 104 are further described in step S420.
[0124] The control unit 104 is further configured to, if the current sampled voltage is not 0, determine the current sampled voltage as the filtered sampled voltage obtained by filtering, and use the filtered sampled voltage as the correct sampled voltage. The specific functions and processing of the control unit 104 are further described in step S430.
[0125] Figure 9 This is a schematic diagram of the sampling voltage filtering process in a software processing strategy for chip sampling voltage according to the present invention. Figure 9 As shown, a sampling voltage filtering process in a software processing strategy for chip sampling voltage includes:
[0126] Step 31: The chip periodically obtains the initial sampling voltage. This initial sampling voltage can be... Figure 1 and Figure 8 The chip sampling voltage shown in the example is after being processed by the conversion circuit.
[0127] Step 32: When the chip starts sampling a non-zero value, that is, when the initial sampling voltage obtained by the chip periodically begins to become non-zero, continue periodic sampling to obtain the chip sampling voltage obtained by continuing periodic sampling when the initial sampling voltage begins to become non-zero. This current sampling voltage value is the sampling voltage value relative to the initial sampling voltage.
[0128] If the chip voltage sample value is 0 at the beginning, it means there is no voltage input to the chip, so no processing is performed. Subsequent processing only begins after an input is detected at the chip voltage sampling port, causing the sample value to be non-zero. This subsequent processing refers to... Figure 9 The process shown is the one after a non-zero value is obtained; otherwise, it will remain at the point where the chip periodically obtains the initial sampling voltage.
[0129] Step 33: Determine if the current sampled voltage value is 0: If yes, proceed to step 34. Otherwise, proceed to step 35.
[0130] If the voltage sampling value is 0 in subsequent chip voltage sampling, there are two possibilities: one is that the sampling port voltage is 0, and the other is that the logic switch detection part of the voltage detection section in the chip is intermittently working, resulting in a false judgment of a voltage value of 0.
[0131] In some embodiments, the control unit 104 filters the current sampling voltage according to the previous sampling voltage in the set sampling period, including:
[0132] The control unit 104 is further configured to determine whether the difference between the previous sampling voltage and the set minimum voltage resolution is within a set error range. The specific functions and processes of the control unit 104 are also described in step S510.
[0133] The control unit 104 is further configured to determine the current sampling voltage as the filtered sampling voltage obtained by filtering if the difference between the previous sampling voltage and the set minimum voltage resolution is within the set error range, and take the filtered sampling voltage as the correct sampling voltage. The specific functions and processes of the control unit 104 are also described in step S520.
[0134] The control unit 104 is further configured to determine whether the length of time from the time of obtaining the current sampling voltage to the current time exceeds a set time if the difference between the previous sampling voltage and the set minimum voltage resolution is not within the set error range: if yes, determine the current sampling voltage as the filtered sampling voltage obtained by filtering, and take the filtered sampling voltage as the correct sampling voltage. Otherwise, determine the non-zero value when the initial sampling voltage starts to become a non-zero value as the filtered sampling voltage obtained by filtering, and take the filtered sampling voltage as the correct sampling voltage. The specific functions and processes of the control unit 104 are also described in step S530.
[0135] As shown in Figure 9 The sampling voltage filtering process in the software processing strategy of the chip sampling voltage further includes:
[0136] Step 34: Determine whether the previous sampling voltage value is close to the minimum resolution value: if yes, execute step 35. Otherwise, execute step 36.
[0137] Because of the high sampling accuracy requirement in actual use, the resolution of the chip voltage sampling port is required to be extremely low voltage, so the actual sampling port voltage value is at least tens of times larger than the minimum voltage resolution to meet the accuracy requirement. This makes the voltage sampling value not immediately change from the tens of times of the minimum voltage to 0, but gradually decreases in each subsequent sampling due to the discharge effect until the final value is 0. Therefore, it can be judged that if the previous sampling value is close to the minimum voltage resolution (the difference between the two is within tens of times), the sampling port voltage is 0, which is correct data, and the real-time sampling value is adopted. If it is more than tens of times of the minimum voltage resolution, that is, according to the discharge effect, the sampling port voltage will not immediately change to 0, so it is determined that the sampling value is incorrect, and the previous value that is not 0 is adopted as the voltage after filtering and processing.
[0138] Step 35, determining the real-time sampling value as a correct sampling value, and then executing step 38.
[0139] Step 36, judging whether the current time is more than the set time, such as 1 second, from the time when the current sampling voltage value is obtained: if yes, executing step 35; otherwise, executing step 37.
[0140] If the next sampling value is still 0, the previous value that is not 0 is also adopted as the voltage after filtering and processing. After another second, if the sampling value is still 0, 0 is directly taken as the sampled voltage without filtering. This approach may have two phenomena because the value is still 0 after 1 second. One is that the voltage value is actually reduced to 0 during the incorrect sampling period, resulting in the value of the subsequent continuous sampling being 0, so 0 is determined as the correct value. The other is that there is a problem in the chip voltage sampling part, that is, the intermittent working time of the logic switch detection part in the chip occasionally exceeds 1 second, at which time the chip quality does not meet the requirements, so the 0 value is retained to enable the subsequent processing to find the hardware problem of the circuit board.
[0141] In some alternative embodiments, the operation of filtering the abnormal value 0 in the embodiment of the present application is to continuously take the original value that is not 0 as the voltage after filtering and processing when the value is 0 for 1 second. In practice, 1 second can be changed to other intervals according to safety requirements.
[0142] Step 37, determining the non-0 value of the initial sampling voltage obtained by the chip periodically as a correct sampling value when the initial sampling voltage starts to become a non-0 value.
[0143] Step 38, outputting the correct sampling value as the sampling voltage after overcurrent processing, which is recorded as the correct sampling voltage.
[0144] Step 39, realizing the processing of the chip internal software logic according to the correct sampling voltage.
[0145] Referring to the examples shown in steps 31 to 39, the scheme of the present application can exclude the problem of false 0 caused by the intermittent operation of the logic switch detection part in the chip, and ensure that the normal 0 is not filtered out after filtering the false 0.
[0146] Through the software processing strategy of the scheme of the present application, the chip currently using the cost reduction scheme can meet the same effect as the high-performance chip, and the cost is reduced. At the same time, through reasonable filtering of the abnormal sampling value 0, it is ensured that the normal chip voltage sampling report 0 part required for subsequent processing will not be filtered out.
[0147] The control unit 104 is also configured to perform the logic processing preset in the chip according to the correct sampling voltage, so as to realize the logic control based on the sampling voltage obtained by sampling the voltage of the external input power supply by the chip. The specific functions and processes of the control unit 104 also refer to step S140.
[0148] The scheme of the present application can correct the sampling problem of a type of chip using cost reduction, and ensure the normal use of this type of chip. Specifically, the scheme of the present application adopts a software processing strategy, which does not affect the safety performance of the chip sampling voltage affecting the subsequent logic processing, filters the false sampling value of the input chip sampling voltage, ensures that the data collected by the chip is the correct sampling value, and does not filter out the correct sampling value, realizes the same sampling requirement as the high-end chip, saves the cost of the chip, overcomes the software processing problem caused by the false sampling voltage of the chip, and is beneficial to improving the reliability of the logic processing based on the sampling obtained voltage signal.
[0149] Compared with related schemes, the scheme of the present application solves the problem of false 0 caused by abnormal judgment of the chip itself in chip sampling, can identify the correct sampling voltage and the false sampling voltage value, and can ensure that the false sampling value is limited in a certain range, so as to ensure that the chip sampling can meet the normal working requirements, and has good feasibility and practicality. The scheme of the present application can solve the problem that the chip reports false sampling voltage value 0 due to abnormal work under the condition that the input voltage is normal during voltage sampling. It can filter out the false voltage value, and at the same time, it needs to ensure that the chip working quality can meet the requirements during processing, and the sampling filtering cannot affect the correct logic processing.
[0150] Since the processing and functions realized by the device of the present embodiment are basically corresponding to the embodiments, principles and examples of the foregoing method, the description of the present embodiment will not be described in detail, and the related description in the foregoing embodiments will be referred to, which will not be described herein.
[0151] The application adopts the technical scheme, sets the software processing strategy, filters the false sampling value of the sampling voltage input to the chip under the premise of not influencing the safety performance of the subsequent logic processing of the chip sampling voltage, guarantees that the chip sampling voltage is the correct sampling value and the correct sampling value is not filtered out, thereby guaranteeing that the correct sampling value is used when the logic processing is performed on the voltage signal obtained based on the sampling, the sampling problem of the chip for cost reduction can be solved, and the normal use of the chip is guaranteed.
[0152] According to the embodiment of the application, an electric appliance corresponding to the chip sampling voltage processing device is also provided. The electric appliance can include the chip sampling voltage processing device described above.
[0153] Since the processing and functions realized by the electric appliance of the embodiment are basically corresponding to the embodiments, principles and examples of the foregoing device, the description of the embodiment is not described in detail, and the related description in the foregoing embodiments can be referred to, and will not be described here.
[0154] The application adopts the technical scheme, sets the software processing strategy, filters the false sampling value of the sampling voltage input to the chip under the premise of not influencing the safety performance of the subsequent logic processing of the chip sampling voltage, guarantees that the chip sampling voltage is the correct sampling value and the correct sampling value is not filtered out, thereby guaranteeing that the correct sampling value is used when the logic processing is performed on the voltage signal obtained based on the sampling, the sampling problem of the chip for cost reduction can be solved, and the normal use of the chip is guaranteed.
[0155] According to the embodiment of the application, a storage medium corresponding to the chip sampling voltage processing method is also provided. The storage medium includes a stored program, wherein when the program runs, the device where the storage medium is located performs the chip sampling voltage processing method described above.
[0156] Since the processing and functions realized by the storage medium of the embodiment are basically corresponding to the embodiments, principles and examples of the foregoing method, the description of the embodiment is not described in detail, and the related description in the foregoing embodiments can be referred to, and will not be described here.
[0157] The application adopts the technical scheme, sets the software processing strategy, filters the false sampling value of the sampling voltage input to the chip under the premise of not influencing the safety performance of the subsequent logic processing of the chip sampling voltage, guarantees that the chip sampling voltage is the correct sampling value and the correct sampling value is not filtered out, thereby guaranteeing that the correct sampling value is used when the logic processing is performed on the voltage signal obtained based on the sampling, the sampling problem of the chip for cost reduction can be solved, and the normal use of the chip is guaranteed.
[0158] In summary, the person skilled in the art can easily understand that the above-mentioned advantageous modes can be freely combined and superimposed without conflict.
[0159] The above merely provides an example of the present application, but should not be used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for processing chip sampling voltage, characterized in that, include: The chip is controlled to sample the voltage of the external input power supply to obtain the sampled voltage; The sampled voltage obtained by the chip sampling the voltage of the external input power supply is denoted as the chip sampled voltage; According to the set sampling period, the chip sampling voltage is periodically acquired, and the periodically acquired chip sampling voltage is recorded as the initial sampling voltage; when the initial sampling voltage starts to become a non-zero value, the chip sampling voltage is periodically acquired according to the set sampling period, and recorded as the current sampling voltage; Activate the preset filtering mechanism; use the filtering mechanism to determine whether the current sampled voltage is 0; If the current sampling voltage is 0, then determine whether the difference between the previous sampling voltage and the set minimum voltage resolution value is within the set error range; if the difference between the previous sampling voltage and the set minimum voltage resolution value is within the set error range, then determine the current sampling voltage as the filtered sampling voltage obtained by filtering, and use the filtered sampling voltage as the correct sampling voltage; If the difference between the previous sampled voltage and the set minimum voltage resolution value is not within the set error range, then determine whether the time length from the time of obtaining the current sampled voltage to the current time exceeds the set time: if so, then determine the current sampled voltage as the filtered sampled voltage obtained by filtering, and use the filtered sampled voltage as the correct sampled voltage; Otherwise, the non-zero value at which the initial sampling voltage begins to change to a non-zero value is determined as the filtered sampling voltage obtained by filtering, and the filtered sampling voltage is taken as the correct sampling voltage; Based on the correct sampled voltage, the chip performs preset internal logic processing to achieve logic control based on the sampled voltage obtained by sampling the voltage of the external input power supply.
2. The chip sampling voltage processing method according to claim 1, characterized in that, The sampled voltage obtained by the chip sampling the voltage of the external input power supply is denoted as the chip sampled voltage, and includes: Using the sampling port on the circuit board where the chip is located, the voltage generated by the external input power supply is sampled to obtain the power supply voltage; The power supply voltage input from the sampling port is converted using the conversion circuit in the circuit board to obtain a sampling voltage that conforms to the preset voltage range of the chip, which is denoted as the chip sampling voltage.
3. The chip sampling voltage processing method according to claim 2, characterized in that, The power supply voltage input from the sampling port is converted using the conversion circuit in the circuit board to obtain a sampling voltage that conforms to the preset voltage range of the chip, denoted as the chip sampling voltage, including: Based on the correspondence between the set power supply voltage and the set chip sampling voltage, the set chip sampling voltage corresponding to the set power supply voltage that is the same as the power supply voltage input from the sampling port is determined as the sampling voltage that conforms to the preset voltage range of the chip, and the sampling voltage that conforms to the preset voltage range of the chip is recorded as the chip sampling voltage.
4. The chip sampling voltage processing method according to claim 1, characterized in that, Also includes: If the current sampling voltage is not 0, then the current sampling voltage is determined as the filtered sampling voltage obtained by filtering, and the filtered sampling voltage is used as the correct sampling voltage.
5. A processing device for chip sampling voltage, characterized in that, include: The control unit is configured to control the chip to sample the voltage of an external input power supply to obtain a sampled voltage; The acquisition unit is configured to acquire the sampled voltage obtained by the chip sampling the voltage of the external input power supply, and denoted as the chip sampled voltage; The control unit is further configured to periodically acquire the chip sampling voltage according to a set sampling period, and record the periodically acquired chip sampling voltage as the initial sampling voltage; when the initial sampling voltage begins to become a non-zero value, it continues to periodically acquire the chip sampling voltage according to the set sampling period, and record it as the current sampling voltage. A preset filtering mechanism is activated; using the filtering mechanism, it is determined whether the current sampling voltage is 0; if the current sampling voltage is 0, it is determined whether the difference between the previous sampling voltage and the set minimum voltage resolution value is within the set error range; if the difference between the previous sampling voltage and the set minimum voltage resolution value is within the set error range, the current sampling voltage is determined as the filtered sampling voltage obtained by filtering, and the filtered sampling voltage is used as the correct sampling voltage. If the difference between the previous sampled voltage and the set minimum voltage resolution value is not within the set error range, then determine whether the time length from the time of obtaining the current sampled voltage to the current time exceeds the set time: if so, then determine the current sampled voltage as the filtered sampled voltage obtained by filtering, and use the filtered sampled voltage as the correct sampled voltage; Otherwise, the non-zero value at which the initial sampling voltage begins to change to a non-zero value is determined as the filtered sampling voltage obtained by filtering, and the filtered sampling voltage is taken as the correct sampling voltage; The control unit is further configured to perform preset logic processing within the chip based on the correct sampled voltage, thereby realizing logic control based on the sampled voltage obtained by the chip sampling the voltage of the external input power supply.
6. The chip sampling voltage processing apparatus according to claim 5, characterized in that, The acquisition unit acquires a sampled voltage obtained by sampling the voltage of the external input power supply obtained by the chip, denoted as the chip sampled voltage, including: Using the sampling port on the circuit board where the chip is located, the voltage generated by the external input power supply is sampled to obtain the power supply voltage; The power supply voltage input from the sampling port is converted using the conversion circuit in the circuit board to obtain a sampling voltage that conforms to the preset voltage range of the chip, which is denoted as the chip sampling voltage.
7. The chip sampling voltage processing apparatus according to claim 6, characterized in that, The acquisition unit uses a conversion circuit in the circuit board to convert the power supply voltage input from the sampling port to obtain a sampling voltage that conforms to the preset voltage range of the chip, denoted as the chip sampling voltage, including: Based on the correspondence between the set power supply voltage and the set chip sampling voltage, the set chip sampling voltage corresponding to the set power supply voltage that is the same as the power supply voltage input from the sampling port is determined as the sampling voltage that conforms to the preset voltage range of the chip, and the sampling voltage that conforms to the preset voltage range of the chip is recorded as the chip sampling voltage.
8. The chip sampling voltage processing apparatus according to claim 5, characterized in that, The control unit is further configured to determine the current sampling voltage as the filtered sampling voltage if the current sampling voltage is not 0, and to use the filtered sampling voltage as the correct sampling voltage.
9. An electrical appliance, characterized in that, include: The chip sampling voltage processing apparatus as described in any one of claims 5 to 8.
10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the chip sampling voltage processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
High transient response digital control system and method of switch power supply
CN101917119A