Pulse signal generating device and method
By designing a pulse signal generation device in the LED light control system, using configuration modules, pulse signal generation modules and power control modules, the problems of inflexible configuration and high power consumption in the prior art are solved, and more efficient configuration and reduction are achieved Power consumption.
Patent Information
- Application Number
- CN202411358823.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In the prior art, the configuration of LED lamps is not flexible enough and the system power consumption is high.
A pulse signal generation device and method are provided, including a configuration module, a pulse signal generation module and a power control module. The configuration module outputs configuration information, and the pulse signal generation module generates pulse signals based on the configuration information, and independently controls the power supply status of each module through the power control module.
Improves configuration flexibility for loads connected to the output node and reduces overall system power consumption.
Smart Images

Figure CN118870600B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of signal control technology, and in particular to a pulse signal generating device and method. Background Art
[0002] LED lights (Light-Emitting Diode Light) are widely used in various lighting and indication scenarios due to their long life and low energy consumption. However, the control of LED lights usually requires the MCU (MicroControl Unit) to be in working state, which increases the power consumption of the system. In addition, the MCU's logic control of LED lights usually has only one set of fixed configurations, which is not flexible and convenient to use. Summary of the invention
[0003] In view of the above problems, the embodiments of the present invention provide a pulse signal generating device and method, which are used to solve the problems in the prior art that the configuration of LED lamps is not flexible enough and the system power consumption is high.
[0004] According to one aspect of an embodiment of the present invention, a pulse signal generating device is provided, the device is used to control the pulse signal output of an output node, the device comprising:
[0005] A configuration module, used to output at least one set of configuration information; the at least one set of configuration information is used to characterize the waveform of the pulse signal;
[0006] A pulse signal generating module, comprising a configuration storage unit, a configuration selection unit and a signal generating unit; wherein the configuration storage unit is used to store the configuration information output by the configuration module; the configuration selection unit is used to select each group of configuration information in at least one group of configuration information stored in the configuration storage unit as the target configuration information in sequence according to the numbering sequence of at least one group of configuration information; the signal generating unit is used to generate a pulse signal to the output node according to the target configuration information;
[0007] The power control module is used to control the power supply to the pulse signal generating module and the power supply to the configuration module according to the working state of the pulse signal generating module; the working state is used to characterize the generation of the pulse signal by the pulse signal generating module based on the configuration information.
[0008] In an optional implementation, the signal generating unit is further configured to return a pulse generating signal to the configuration selecting unit after generating a pulse signal corresponding to the target configuration information;
[0009] The configuration selection unit is used to determine the next group of configuration information corresponding to the target configuration information in at least one group of configuration information as new target configuration information according to the sequence of numbers after receiving the pulse generation signal.
[0010] In an optional embodiment, the power control module includes a first control unit and a second control unit;
[0011] The first control unit is used to control the power supply to the pulse signal generating module according to the first power signal and the working state of the pulse signal generating module;
[0012] The second control unit is used to control the power supply to the configuration module according to the second power signal.
[0013] In an optional implementation, the configuration storage unit includes a plurality of configuration storage sub-units, and the configuration storage sub-units correspond one-to-one to the configuration numbers of the configuration information;
[0014] The configuration storage subunit is used to determine and store a corresponding set of configuration information from at least one set of configuration information output by the configuration module;
[0015] The configuration storage subunit is also used to update the time period quantity of a corresponding set of configuration information after the configuration selection unit selects a set of configuration information corresponding to the configuration storage subunit, and configure the corresponding set of configuration information as invalid when the time period quantity is zero.
[0016] In an optional implementation, the configuration selection unit is further used to send a configuration completion signal to the first control unit when the configuration information corresponding to all configuration sub-storage units is configured as invalid; the configuration completion signal is used to indicate that the working state of the pulse signal generation module is that the generation of the pulse signal has been completed;
[0017] The first control unit is used to stop supplying power to the pulse signal generating module in response to the configuration completion signal.
[0018] According to another aspect of an embodiment of the present invention, a pulse signal generation method is provided, which is applied to a pulse signal generation module in any of the pulse signal generation devices described above, and the method comprises:
[0019] Acquire at least one set of configuration information from a configuration module; the configuration information is used to characterize the waveform of the pulse signal;
[0020] Based on the serial numbering sequence of the configuration information, each group of configuration information is sequentially determined as the target configuration information;
[0021] Based on the target configuration information, a pulse signal is generated and output.
[0022] In an optional implementation, each group of configuration information is sequentially determined as target configuration information based on a numbering sequence, including:
[0023] In response to receiving and storing at least one set of configuration information, querying at least one set of configuration information in a serial number sequence, and determining a first set of configuration information found in the query as target configuration information;
[0024] Alternatively, in response to a pulse generation signal generated by a signal generation unit of the pulse signal generation module after generating a pulse signal, the next set of configuration information corresponding to the target configuration information is determined based on the numbering sequence, and the next set of configuration information corresponding to the target configuration information is determined as the new target configuration information.
[0025] In an optional implementation, the configuration information includes the number of cycles, the cycle length, and the waveform configuration; generating and outputting a pulse signal based on the target configuration information includes:
[0026] Determine a unit pulse signal corresponding to the pulse signal based on the waveform configuration and the cycle length;
[0027] The number of unit pulse signals is set to the number of cycles, and a pulse signal is generated and output.
[0028] In an optional implementation, the configuration information further includes a time period number, and the time period number is used to represent the number of times the pulse signal corresponding to the configuration information is to be generated;
[0029] After generating and outputting a pulse signal based on the target configuration information, it also includes:
[0030] Subtract one from the number of time periods in the target configuration information to update the target configuration information;
[0031] If the number of time periods in the target configuration information is zero, the target configuration information is configured as invalid.
[0032] In an optional embodiment, the method further includes:
[0033] If at least one set of configuration information obtained is configured as invalid, a configuration completion signal is sent to the power control module to instruct the power control module to cut off the power supply to the pulse signal generating module.
[0034] The embodiment of the present invention stores the configuration information output by the configuration module through the configuration storage unit, selects each group of configuration information in the configuration storage unit as the target configuration information in turn through the configuration selection unit, and generates a pulse signal corresponding to the target configuration information through the signal generation unit, so that multiple groups of configurations can be output to the load connected to the output node, thereby improving the flexibility of the configuration of the load connected to the output node; at the same time, the power control module controls the power supply of the configuration module and the pulse signal generation module respectively, and the pulse signal generation module can still work normally after the configuration module is powered off, thereby reducing the overall power consumption of the system.
[0035] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0037] Figure 1 is a structural schematic diagram of a pulse signal generating device provided by an embodiment of the present invention;
[0038] Figure 2 It is a structural architecture diagram of a pulse signal generating device provided by an embodiment of the present invention;
[0039] Figure 3 It is a flow chart of a pulse signal generating method provided by an embodiment of the present invention;
[0040] Figure 4 is a schematic diagram of a pulse signal in a pulse signal generating method provided by an embodiment of the present invention;
[0041] Figure 5 It is a schematic diagram of a pulse signal in a pulse signal generating method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0043] At present, the control of devices such as LED lights and motors that need to work through pulse signal input usually requires the MCU (Micro Control Unit) to be in a working state. After the MCU is powered off, the system will lose the ability to control the device, which will lead to increased system power consumption; and the MCU's logical control of these devices usually has only one set of fixed configurations, and can often only input a pulse signal of one logic at a time. If you want to change the logical control of these devices, you need to re-issue the control logic. For some application scenarios that require repeated switching of control logic, this operation method will be very cumbersome and not flexible and convenient to use.
[0044] Based on this, an embodiment of the present invention provides a pulse signal generating device, which is used to control the operation of a signal light connected to an output node, and the device includes: a configuration module, which is used to output at least one set of configuration information; the configuration information is used to characterize the waveform of the pulse signal; the pulse signal generating module includes a configuration storage unit, a configuration selection unit and a signal generating unit; wherein the configuration storage unit is used to store at least one set of configuration information output by the configuration module; the configuration selection unit is used to select each set of configuration information in at least one set of configuration information stored in the configuration storage unit as the target configuration information in sequence according to the numbering sequence of at least one set of configuration information; the signal generating unit is used to generate a pulse signal to the output node according to the target configuration information; a power supply control module is used to control the power supply to the pulse signal generating module according to the working state of the pulse signal generating module, and to control the power supply to the configuration module; the working state is used to characterize the generation of the pulse signal by the pulse signal generating module based on the configuration information. In this way, the configuration information output by the configuration module is stored through the configuration storage unit, each group of configuration information in the configuration storage unit is selected as the target configuration information in turn through the configuration selection unit, and the pulse signal corresponding to the target configuration information is generated through the signal generation unit, so that multiple groups of configurations can be output to the load connected to the output node, thereby improving the configuration flexibility of the load connected to the output node; at the same time, the power supply control module controls the power supply of the configuration module and the pulse signal generation module respectively, and the pulse signal generation module can still work normally after the configuration module is powered off, thereby reducing the overall power consumption of the system.
[0045] On the one hand, an embodiment of the present invention provides a pulse signal generating device, which can be used to control the pulse signal output of an output node. Specifically, the pulse signal generating device is provided with an output node for external output, and the pulse signal generating device is connected to a load through the output node, and outputs a pulse signal to the load, thereby controlling the operation of the load. Optionally, the load connected to the output node can be any device that works through a pulse signal input, such as a signal light, an electric motor, etc.; in an embodiment of the present invention, a signal light, in particular, a three-color signal light, is taken as an example to explain the pulse signal generating device as described above. It should be noted that this is only an exemplary description and does not constitute a specific limitation on the load connected to the output node. Figure 1 is a schematic diagram of the structure of a pulse signal generating device provided by an embodiment of the present invention, such as Figure 1 As shown, the device includes: a configuration module, a pulse signal generating module, and a power control module. The configuration module is connected to the pulse signal generating module in communication, and the power control module is connected to the configuration module and the pulse signal generating module respectively.
[0046] In the embodiment of the present invention, the configuration module is used to output at least one set of configuration information, wherein at least one set of configuration information is used to characterize the waveform of the pulse signal, that is, to characterize the working mode of the load connected to the output node, and illustratively, to characterize the working mode of the signal light, which is a specific configuration of the light waveform of the signal light, such as light color, light flashing mode, light duration, etc. The configuration module can be implemented by a related function or a related module in a computing module such as a computer system having computing and information processing capabilities, that is, the configuration module can be integrated in a certain computing module.
[0047] In an optional implementation, a configuration register unit is provided in the configuration module, and the user can write the configuration information into the configuration register unit through the bus interface according to the application requirements. The configuration register unit can be provided with multiple groups of waveform configuration registers and general registers, such as clock frequency division coefficient registers, etc. Each group of waveform configuration registers in the multiple groups of waveform configuration registers can store a group of configuration information, and the configuration information will record and correspond to the waveform configuration register in which it is located by setting the configuration number, and the number of waveform configuration registers can be adjusted according to user needs. The user can configure all the configuration information at one time, and then generate the corresponding pulse signal through the pulse signal generation module, or add or modify the configuration information in the process of generating the pulse signal by the pulse signal generation module to achieve multiple configurations.
[0048] In the embodiment of the present invention, Figure 1 As shown, the pulse signal generating module includes a configuration storage unit, a configuration selection unit and a signal generating unit. The configuration storage unit is used to store at least one set of configuration information output by the configuration module, and is connected to the configuration module for receiving at least one set of configuration information output by the configuration module. The configuration selection unit is connected to the configuration storage unit for selecting each set of configuration information in the at least one set of configuration information stored in the configuration storage unit as the target configuration information in sequence according to the numbering sequence of the configuration information, thereby realizing multiple configurations of the signal light without modifying the configuration information. The signal generating unit is connected to the configuration selection unit for generating a corresponding pulse signal to the output node according to the target configuration information selected by the configuration selection unit, thereby outputting a pulse signal to the signal light connected to the pulse signal generating device through the output node to control the operation of the signal light.
[0049] In an optional embodiment, the pulse signal generating module is an LPWM module, which, based on PWM technology, combined with components such as memory and timer, can further control the brightness and color of the traffic light. By controlling the brightness of various colors of the traffic light, a variety of colors can be mixed to meet the user's demand for the color of the traffic light and improve the richness and flexibility of the traffic light configuration.
[0050] In the embodiment of the present invention, Figure 1 As shown, the power control module is connected to the pulse signal generating module and the configuration module respectively, and the power control module controls the power supply of the pulse signal generating module and the configuration module respectively, that is, the power supply of the pulse signal generating module and the configuration module are independent, and the two do not affect each other. Specifically, the power control module is used to control the power supply to the pulse signal generating module according to the working state of the pulse signal generating module, and to control the power supply to the configuration module, wherein the working state is used to characterize the generation of the pulse signal by the pulse signal generating module based on the configuration information.
[0051] In an optional embodiment, corresponding to the multiple groups of waveform configuration registers provided in the configuration module, the configuration storage unit is provided with configuration storage subunits equal to the number of waveform configuration registers, and each configuration storage subunit includes a register for storing a set of configuration information. Specifically, the configuration storage subunit corresponds one-to-one with the configuration number of the configuration information, and the configuration number of the configuration information corresponds one-to-one with the waveform configuration register where it is located during configuration, thereby realizing a one-to-one correspondence between the configuration storage subunit-configuration information-waveform configuration register through a variety of corresponding relationships, thereby maintaining consistency in the pulse signal generating device and avoiding errors. Accordingly, the configuration storage subunit is used to determine a corresponding set of configuration information from the configuration information output by the configuration module, and store the corresponding set of configuration information.
[0052] In an optional embodiment, if Figure 1 As shown, after generating the pulse signal corresponding to the target configuration information, the signal generation unit can also be used to return a pulse generation signal (auto_down) to the configuration selection unit, thereby indicating that the pulse signal corresponding to the target configuration information currently selected by the configuration selection unit has been generated. After receiving the pulse generation signal (auto_down) sent by the signal generation unit, the configuration selection unit selects new target configuration information to perform the next set of configurations for the signal light. Specifically, the configuration selection unit is used to determine the next set of configuration information corresponding to the target configuration information as the new target configuration information in the order of numbers after receiving the pulse generation signal.
[0053] In an optional embodiment, the configuration information includes the number of time periods, and the number of time periods is used to represent the number of times to be generated of the pulse signal corresponding to the group of configuration information. Accordingly, the configuration storage subunit is also used to update the number of time periods in the corresponding group of configuration information after the configuration selection unit selects the group of configuration information corresponding to the configuration storage subunit, that is, to reduce the number of time periods in the corresponding group of configuration information by one, so that the number of times to be generated of the pulse signal represented by the number of time periods is consistent with the actual number of times to be generated; if the number of time periods becomes zero after the update, it indicates that the pulse signals corresponding to the group of configuration information have all been generated, so the group of configuration information can be configured as invalid when the number of time periods is zero.
[0054] In an optional implementation, the configuration selection unit may count the configuration number corresponding to the target configuration information after selecting it. At the same time, each time the configuration selection unit selects the target configuration information, the configuration selection unit compares the number of time periods in the configuration information with the count value stored in the configuration selection unit. If the number of time periods is greater than the count value, the configuration information may be used as the target configuration information. If the number of time periods is equal to the count value, the configuration storage unit is instructed to configure the group of configuration information as invalid.
[0055] In an optional embodiment, Figure 2 is a schematic diagram of the structure of a pulse signal generating device provided by an embodiment of the present invention, such as Figure 2 As shown, the power control module includes a first control unit and a second control unit, wherein the first control unit is used to control the power supply to the pulse signal generating module according to the first power signal and the working state of the pulse signal generating module; the second control unit is used to control the power supply to the configuration module according to the second power signal; wherein the first power signal and the second power signal are power supply signals connected from the outside, the first power signal only indicates the power supply to the pulse signal generating module, and the second power signal only indicates the power supply to the configuration module, thereby separating the power supply to the pulse signal generating module and the configuration module. The first control unit and the second control unit control the pulse signal generating module and the configuration module respectively and separately, thereby isolating the power supply and power supply control to the configuration module and the pulse signal generating module. Thereby, it can be achieved that: on the one hand, the configuration module can be powered off after inputting the configuration information to the pulse signal generating module, which will not affect the pulse signal generating module from generating the pulse signal, and at the same time it can also reduce the overall power consumption of the system; on the other hand, the first control unit controls the power supply to the pulse signal generating module according to the first power supply signal and the working state of the pulse signal generating module. When the working state of the pulse signal generating module is that the generation of the pulse signal has been completed, that is, the current working task has been completed, the first control unit can cut off the power supply to the pulse signal generating module, thereby realizing the automatic power-off of the pulse signal generating module after the work is completed, and further reducing the power consumption.
[0056] In an optional implementation, if all group configuration information stored in the configuration storage unit is configured as invalid, it indicates that the pulse information corresponding to the currently input configuration information has been generated, and the current working task of the pulse signal generation module has been completed. Correspondingly, the configuration selection unit is also used to send a configuration completion signal (lpwm_down) to the power control module, specifically the first control unit in the power control module, after the configuration information stored in the configuration storage unit is configured as invalid. The configuration completion signal (lpwm_down) is used to indicate that the working state of the pulse signal generation module is that the generation of the pulse signal has been completed. The first control unit is used to respond to the configuration completion signal (lpwm_down), determine that the working state of the pulse signal generation module is that the generation of the pulse signal has been completed, and stop supplying power to the pulse signal generation module.
[0057] The pulse signal generating device provided by the embodiment of the present invention includes: a configuration module, which is used to output at least one set of configuration information; the configuration information is used to characterize the waveform of the pulse signal; the pulse signal generating module includes a configuration storage unit, a configuration selection unit and a signal generating unit; wherein the configuration storage unit is used to store at least one set of configuration information output by the configuration module; the configuration selection unit is used to select each set of configuration information in at least one set of configuration information stored in the configuration storage unit as the target configuration information in sequence according to the numbering sequence of the configuration information; the signal generating unit is used to generate a pulse signal to an output node according to the target configuration information; a power supply control module is used to control the power supply to the pulse signal generating module according to the working state of the pulse signal generating module, and to control the power supply to the configuration module; the working state is used to characterize the generation of the pulse signal by the pulse signal generating module based on the configuration information. In this way, the configuration information output by the configuration module is stored through the configuration storage unit, each group of configuration information in the configuration storage unit is selected as the target configuration information in turn through the configuration selection unit, and the pulse signal corresponding to the target configuration information is generated through the signal generation unit, so that multiple groups of complex output configurations connected to the output node can be connected, thereby improving the flexibility of configuring the load connected to the output node; at the same time, the power supply control module controls the power supply of the configuration module and the pulse signal generation module respectively, and the pulse signal generation module can still work normally after the configuration module is powered off, thereby reducing the overall power consumption of the system.
[0058] On the other hand, an embodiment of the present invention provides a pulse signal generation method, which can be applied to a pulse signal generation module of any of the pulse signal generation devices described above. The following describes a specific embodiment of a pulse signal generation method of the present invention. Figure 3It is a flowchart of a pulse signal generation method provided by an embodiment of the present invention. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiment or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 3 As shown, the method may include:
[0059] Step 310: Obtain at least one set of configuration information from the configuration module.
[0060] In the embodiment of the present invention, the configuration information is used to characterize the waveform of the pulse signal, that is, to characterize the working mode of the load connected to the output node. For example, the configuration information characterizes the working mode of the signal light, which is a specific configuration of the light waveform of the signal light, such as light color, light flashing mode, light duration, etc. After the configuration information is obtained from the configuration module, the configuration storage unit in the pulse signal generation module will store it in the corresponding configuration storage subunit according to the configuration number in the configuration information. For example, there are 8 configuration storage subunits in the configuration storage unit, namely configuration storage subunit 0-configuration storage subunit 7, and the configuration numbers of the corresponding configuration information are 0-7 respectively. When the configuration information with configuration number 0 is obtained, it is stored in configuration storage subunit 0, and when the configuration information with configuration number 1 is obtained, it is stored in configuration storage subunit 1, and so on. When the configuration information with configuration number n is obtained, it is stored in configuration storage subunit n.
[0061] Step 320: Based on the serial numbering sequence of the configuration information, determine each group of configuration information as the target configuration information in sequence.
[0062] In the embodiment of the present invention, the numbering sequence of the configuration information is a sequence that is cyclically cycled based on the sequence of the configuration numbers in the configuration information. For example, if the configuration storage unit is provided with 8 configuration storage sub-units, the sequence is cyclically polled in the order of 0 to 7. It should be noted that, although the cyclic polling is performed in the sequence of the configuration information numbers in this step, the pulse signal generating module does not need to obtain the configuration information corresponding to all the configuration numbers, but may only obtain one or several groups of configuration information, for example, only obtain the configuration information with the configuration number of 2.
[0063] In the embodiment of the present invention, the configuration selection unit in the pulse signal generation module searches for at least one group of configuration information according to the serial number sequence of each group of configuration information, and sequentially determines the found configuration information as the target configuration information. Specifically, it can be divided into the following two situations:
[0064] In the first case, the configuration selection unit queries at least one set of configuration information in accordance with the sequence of numbers in response to receiving and storing at least one set of configuration information, and determines the first set of configuration information found as the target configuration information. This case corresponds to the pulse signal generation module being in an idle working state, at which time the pulse signal generation module has not yet started to generate pulse signals, and the configuration storage unit receives and stores each set of configuration information; at this time, the configuration selection unit queries the configuration information corresponding to each configuration number in sequence in accordance with the sequence of numbers, and determines the first set of configuration information found as the target configuration information. Taking 8 sets of configuration information as an example, at this time, the configuration selection unit searches for each set of configuration information in sequence in the order of numbers 0-7 until the first set of configuration information is found and determined as the target configuration information.
[0065] In the second case, the configuration selection unit responds to the pulse generation signal (auto_down) generated by the signal generation unit after generating the pulse signal, and determines the next set of configuration information corresponding to the target configuration information based on the numbering order, and determines the next set of configuration information corresponding to the target configuration information as the new target configuration information, wherein the pulse generation signal (auto_down) is generated by the signal generation unit after generating the pulse signal and returned to the configuration selection unit to indicate that the configuration selection unit has currently generated the pulse signal. This case corresponds to the working state of the pulse signal generation module in operation, at which time the pulse signal generation module is already generating a pulse signal, and the signal generation unit will return a pulse generation signal (auto_down) to the configuration selection unit when generating a pulse signal corresponding to a set of configuration information, to indicate that the configuration selection unit continues to select the target configuration information; at this time, the configuration selection unit starts from the target configuration information and queries the configuration information corresponding to each configuration number in sequence according to the numbering order, and the first set of configuration information queried is the next set of configuration information corresponding to the target configuration information, and the set of configuration information is determined as the new target configuration information. Taking 8 groups of configuration information and the target configuration information numbered N as an example, continue searching from the target configuration information in the order of numbers 0-7, that is, search in the order of N+1, N+2, ..., 7, 0, 1, ..., N, until the first group of configuration information is found, it is determined as the target configuration information. In particular, if N happens to be 7, that is, the target configuration information happens to be the last group of configuration information, then search in the order of 0-7.
[0066] In an optional implementation, when searching for configuration information, the configuration selection unit searches for configuration information in the corresponding configuration storage subunit in sequence according to the numbering order. If the configuration information is not stored in the configuration storage subunit, all information related to the configuration information is 0 or other invalid values. Correspondingly, the configuration information includes enabling information. If the enabling information is 1, it indicates that the group of configuration information is valid. If the enabling information is 0 or other invalid values, it indicates that the group of configuration information is invalid. When querying, the configuration selection unit can query the enabling information of each group of configuration information in sequence according to the numbering order, and determine the first group of configuration information with enabling information of 1 as the target configuration information.
[0067] Step 330: Generate and output a pulse signal based on the target configuration information.
[0068] In an embodiment of the present invention, the signal generating unit in the pulse signal generating module obtains the target configuration information selected by the configuration selecting unit, and generates a pulse signal according to the configuration corresponding to the target configuration information, and outputs the generated pulse signal through the output node to the load connected to the pulse signal generating device, i.e., the signal light, so as to control the signal light to work according to the instruction of the pulse signal.
[0069] In an optional embodiment, as shown in Table 1 below, a group of configuration information includes a configuration number, enable information, color enable information, number of time periods, number of cycles, cycle length and waveform configuration; wherein the configuration number is the number of the group of configuration information; the enable information is used to indicate whether the group of configuration information is valid; the color enable information is used to indicate whether various colors are valid, which is specifically reflected in whether the generated pulse signal is sent to the control pin of the corresponding color; the number of time periods is used to characterize the number of times the pulse signal corresponding to the configuration information is to be generated; the number of cycles is used to characterize the number of signal cycles contained in the pulse signal corresponding to a time period; the cycle length is used to characterize the clock length of a signal cycle; the waveform configuration is the specific configuration information of the waveform within a signal cycle.
[0070] Table 1
[0071]
[0072] In an optional implementation, as shown in Table 1, the color enable information may include enable information of multiple colors. Taking a three-color signal light as an example, the color enable information may include red enable information, green enable information, and blue enable information, wherein when the enable information is 1, it indicates that the corresponding color is valid, and the generated pulse signal is sent to the control pin of the corresponding color. When the enable information is 0, it indicates that the corresponding color is invalid, and the generated pulse signal is not sent to the control pin of the corresponding color. Accordingly, the pulse signal generation module finally outputs 3 pulse signals, and these 3 pulse signals are respectively output to the control pins of the corresponding colors of the signal light.
[0073] In an optional implementation, as shown in Table 1, the waveform configuration may include a first pulse starting point, a second pulse starting point, and a high level duration. The first pulse starting point represents the starting point of the first high level in a signal cycle, the second pulse starting point represents the starting point of the second high level in a signal cycle, and the high level duration represents the duration of the high level in a signal cycle.
[0074] In an optional embodiment, Figure 4 is a schematic diagram of a pulse signal in a pulse signal generating method provided by an embodiment of the present invention, and the following is combined with Figure 4 The method for generating a pulse signal based on target configuration information in the present invention is explained by referring to the configuration information in Table 1. Figure 4 As shown, a pulse signal includes multiple signal cycles, and the pulse signal corresponding to one signal cycle is a unit pulse signal. The unit pulse signals corresponding to each signal cycle are the same. When generating a pulse signal, first determine the unit pulse signal corresponding to the pulse signal based on the waveform configuration and cycle length, then set the number of unit pulse signals to the number of cycles, and generate and output the pulse signal. Referring to Table 1, the cycle length is 100, the first pulse starting point and the second pulse starting point are both 0, and the high level time length is 40, then the corresponding unit pulse signal is as follows Figure 4 As shown in the figure, the signal is composed of a high-level signal with a length of 40 clocks and a low-level signal with a length of 60 clocks. At the same time, the number of cycles is 10, so the above unit pulse signal is repeated 10 times to obtain the corresponding pulse signal. The final pulse signal has a time length of 1000, which is the product of the number of cycles and the cycle length.
[0075] In an optional implementation, after a pulse signal is generated based on the target configuration information, the configuration storage unit updates the number of time periods in the target configuration information so that the number of time periods represented by the number of time periods to be generated is consistent with the actual number of time periods to be generated. Specifically, the number of time periods in the target configuration information is reduced by one to update the target configuration information; if the number of time periods in the target configuration information is zero, it indicates that the current time is the last pulse signal corresponding to the target configuration information, and therefore the target configuration information is configured as invalid. Optionally, after selecting the target configuration information, the configuration selection unit may count the configuration number corresponding to the target configuration information. At the same time, each time the configuration selection unit selects the target configuration information, the configuration selection unit compares the number of time periods in the configuration information with the count value stored in the configuration selection unit. If the number of time periods is greater than the count value, the configuration information may be used as the target configuration information. If the number of time periods is equal to the count value, the configuration storage unit is instructed to configure the group of configuration information as invalid. Figure 4 Taking Table 1 as an example, the number of time periods in Table 1 is 2, indicating that the pulse signal corresponding to this group of configuration information needs to generate two segments, and only one group of configuration information is configured in Table 1. Therefore, after the pulse signal is generated for the first time, the number of time periods is updated to 1. At the same time, the configuration information is searched in the order of numbers, and only the configuration information can be found. At this time, the pulse signal corresponding to the configuration information is generated again, and the number of time periods is updated again to 0. Since the number of time periods is 0 at this time, the configuration information is configured as invalid, and the corresponding enable information is modified to the corresponding value of invalidity. There is no valid configuration information in the configuration storage unit, and the pulse signal generation module is completed, and finally a total of 2 pulse signals are generated.
[0076] Above Figure 4 The example in Table 1 corresponds to a case where there is one set of configuration information. The following takes multiple sets of configuration information as an example to further illustrate the embodiment of the present invention. Figure 5 As shown in Table 2, the configuration storage unit stores configuration information with number information 2 and number information 5. First, according to the numbering sequence, start searching from number 0-7, find the configuration information with number information 2, and generate a pulse signal according to the configuration information, corresponding to Figure 5 Phase 1 in the configuration information with number information 2 is updated to 1. After generating the pulse signal corresponding to phase 1, the configuration information with number information 2 is searched downward in the order of numbers until the configuration information with number information 5 is found. A pulse signal is generated according to the configuration information, corresponding to Figure 5Phase 2 in the configuration information with number information 5 is selected, and the number of time periods in the configuration information with number information 5 is updated to 4. After the pulse signal corresponding to phase 2 is generated, the configuration information with number information 5 is searched downward in the order of numbers to find the configuration information with number information 2. A pulse signal corresponding to phase 1 is generated according to the configuration information, and the number of time periods in the configuration information with number information 2 is updated to 0. At this time, since the number of time periods in the configuration information with number information 2 is 0, the configuration information with number information 2 is configured as invalid. After that, there is only the configuration information with number information 5, and the above steps are repeated. The specific process is not repeated here. Finally, 3 pulse signals corresponding to the configuration information with number information 5 are generated, and the following is obtained: Figure 5 The pulse signal shown in .
[0077] Table 2
[0078]
[0079] In an optional embodiment, during the process of the pulse signal generating module generating a pulse signal, the enable can be stopped by software or other means, thereby stopping the pulse signal generating module from generating a pulse signal. After the pulse signal generating module is stopped, if it does not obtain new configuration information, other information except the number of time periods in the configuration information stored in the configuration storage unit remains unchanged, but the remaining number of time periods is cleared, and the calculation is restarted when the pulse signal generating module is started again, that is, the number of time periods is initialized to the number set in the original configuration information, and the pulse signal is regenerated based on the initial number of time periods.
[0080] In an optional implementation, in the process of the pulse signal generation module generating a pulse signal, the waveform of the pulse signal can be flexibly adjusted and configured according to the current pulse signal generation situation without affecting the generation and output of the current pulse signal, and a new configuration or adjustment configuration can be added based on the current configuration. Specifically, when outputting a pulse signal corresponding to the current target configuration information, a new set of configuration information can be stored in the corresponding configuration storage subunit according to the numbering information of the configuration information and other information. If the corresponding configuration storage subunit has not previously stored valid configuration information, the configuration is added at this time. If the corresponding configuration storage subunit has previously stored valid configuration information, the new configuration information will overwrite the configuration information previously stored in the storage subunit to achieve configuration modification and adjustment. Taking the pulse signal corresponding to the configuration information with numbered information 2 currently being generated and the newly written configuration information with numbered information 3 as an example, if no valid configuration information is stored in the configuration storage subunit corresponding to the numbered information 3, the new configuration information is written into the corresponding configuration storage subunit to realize the addition of the configuration information. After the pulse signal corresponding to the configuration information with numbered information 2 is generated, a pulse signal corresponding to the newly written configuration information with numbered information 3 is generated, thereby; if valid configuration information is already stored in the configuration storage subunit corresponding to the numbered information 3, the new configuration information is written into the corresponding configuration storage subunit to overwrite the configuration information originally stored in the configuration storage subunit to realize the modification and adjustment of the configuration information. After the pulse signal corresponding to the configuration information with numbered information 2 is generated, a pulse signal corresponding to the new configuration information with numbered information 3 after the overwriting is generated.
[0081] In an optional implementation, if all the acquired configuration information is configured as invalid, a configuration completion signal (lpwm_down) is sent to the power control module to instruct the power control module to cut off the power supply to the pulse signal generation module. Optionally, the lpwm_down signal can also be used as a signal indicating the working state of the pulse signal generation module. At this time, the pulse signal generation module feeds back the lpwm_down signal to the power control module in real time. If the lpwm_down signal is 0, it indicates that the pulse signal generation module is in an idle working state. If the lpwm_down signal is 1, it indicates that the pulse signal generation module is in a working working state. If all the acquired configuration information is removed, the lpwm_down signal switches from 1 to 0, indicating that the pulse signal generation module switches to an idle state, and the power control module is triggered to cut off the power supply to the pulse signal generation module.
[0082] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.
[0083] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0084] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0085] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of protection of the present invention. The word "comprising" does not exclude the existence of elements or steps not listed in the present invention. The word "one" or "an" preceding an element does not exclude the existence of multiple such elements. The present invention can be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In the embodiments in which several devices are listed, several of these devices can be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.
Claims
1. A pulse signal generating device, characterized in that: The device is used to control the pulse signal output of the output node, and the device comprises: A configuration module, configured to output at least one set of configuration information; the at least one set of configuration information is used to characterize the waveform of the pulse signal; A pulse signal generating module, comprising a configuration storage unit, a configuration selection unit and a signal generating unit; wherein the configuration storage unit is used to store the at least one set of configuration information output by the configuration module; the configuration selection unit is used to select each set of configuration information in the at least one set of configuration information stored in the configuration storage unit as the target configuration information in sequence according to the numbering sequence of the at least one set of configuration information; the signal generating unit is used to generate the pulse signal to the output node according to the target configuration information; The configuration storage unit includes a plurality of configuration storage subunits, and the configuration storage subunits correspond to the configuration numbers of the configuration information one by one; the configuration storage subunit is used to determine and store a corresponding set of configuration information from the at least one set of configuration information output by the configuration module; the configuration storage subunit is also used to update the time period quantity of the corresponding set of configuration information after the configuration selection unit selects the set of configuration information corresponding to the configuration storage subunit, and configure the corresponding set of configuration information as invalid when the time period quantity is zero; A power control module is used to control the power supply to the pulse signal generating module and the power supply to the configuration module according to the working state of the pulse signal generating module; the working state is used to characterize the generation of the pulse signal by the pulse signal generating module based on the at least one set of configuration information.
2. The device according to claim 1, characterized in that The signal generating unit is further configured to return a pulse generating signal to the configuration selecting unit after generating a pulse signal corresponding to the target configuration information; The configuration selection unit is used to determine, after receiving the pulse generation signal, the next group of configuration information corresponding to the target configuration information in the at least one group of configuration information as new target configuration information according to the numbering sequence.
3. The device according to claim 1, characterized in that The power control module includes a first control unit and a second control unit; The first control unit is used to control the power supply to the pulse signal generating module according to the first power signal and the working state of the pulse signal generating module; The second control unit is used to control the power supply to the configuration module according to the second power signal.
4. The device according to claim 3, characterized in that The configuration selection unit is further used to send a configuration completion signal to the first control unit when the configuration information corresponding to all configuration sub-storage units is configured as invalid; the configuration completion signal is used to indicate that the working state of the pulse signal generation module is that the generation of the pulse signal has been completed; The first control unit is used to stop supplying power to the pulse signal generating module in response to the configuration completion signal.
5. A pulse signal generation method, characterized in that: A pulse signal generating module applied to a pulse signal generating device as claimed in any one of claims 1 to 4, the method comprising: Acquire at least one set of configuration information from a configuration module; the configuration information is used to characterize the waveform of the pulse signal; Based on the numbering sequence of the configuration information, determining each group of the configuration information as the target configuration information in sequence; Based on the target configuration information, generating and outputting a pulse signal; The configuration information includes the number of time periods, and the number of time periods is used to represent the number of times the pulse signal corresponding to the configuration information is to be generated; after generating and outputting the pulse signal based on the target configuration information, it also includes: reducing the number of time periods in the target configuration information by one to update the target configuration information; if the number of time periods in the target configuration information is zero, the target configuration information is configured as invalid.
6. The method according to claim 5, characterized in that The step of determining, based on the numbering sequence of the configuration information, each group of the configuration information as target configuration information in sequence includes: In response to receiving and storing the at least one set of configuration information, querying the at least one set of configuration information in the sequence of numbers, and determining the first set of configuration information found in the query as the target configuration information; Alternatively, in response to a pulse generation signal generated by a signal generation unit of the pulse signal generating module after generating the pulse signal, the next set of configuration information corresponding to the target configuration information is determined based on the numbering sequence, and the next set of configuration information corresponding to the target configuration information is determined as the new target configuration information.
7. The method according to claim 5, characterized in that The configuration information includes the number of cycles, the length of the cycle, and the waveform configuration; the generating and outputting the pulse signal based on the target configuration information includes: Determining a unit pulse signal corresponding to the pulse signal based on the waveform configuration and the cycle length; The number of the unit pulse signals is set to the number of cycles, and the pulse signal is generated and output.
8. The method according to claim 5, characterized in that The method further comprises: If the at least one set of configuration information obtained is configured as invalid, a configuration completion signal is sent to the power control module to instruct the power control module to cut off the power supply to the pulse signal generating module.
Citation Information
Patent Citations
Pulse ablation device, control method thereof and storage medium
CN114145841A
Control method and device of light-emitting device and electronic equipment
CN116600450A