Signal output method, signal output device, and control system

By generating a second trigger signal with a pulse at a level jump node, the problem of low response efficiency of modules and devices in the prior art is solved, and higher operation efficiency is achieved.

CN116774617BActive Publication Date: 2025-10-21GIGADEVICE SEMICON (BEIJING) INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210216424.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2025-10-21
Estimated Expiration
2042-03-07

AI Technical Summary

Technical Problem

In the prior art, modules and devices controlled by a trigger signal can only respond to a single edge of the trigger signal, which affects their operating efficiency.

Method used

The control module obtains the first trigger signal output by the counting module and the value of the control register to determine whether to generate a second trigger signal. The second trigger signal has a pulse at the level jump node and outputs the first or second trigger signal.

Benefits of technology

Improves the response efficiency of modules and devices controlled by trigger signals by increasing the number of rising and falling edges of the trigger signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116774617B_ABST
    Figure CN116774617B_ABST
Patent Text Reader

Abstract

The application provides a signal output method, a signal output device and a control system. The signal output method comprises: making a control module obtain a first trigger signal output by a counting module and a value of a control register, wherein the first trigger signal has multiple level jump nodes; then, making the control module determine whether a second trigger signal needs to be generated according to the first trigger signal according to the value, wherein the second trigger signal has pulses at the level jump nodes; and finally, making the control module output the first trigger signal or the second trigger signal. The signal output method provided by the application can finally output the second trigger signal. Compared with the first trigger signal, the second trigger signal has more rising edges and falling edges, so that the modules and devices controlled by the second trigger signal can have higher efficiency in responding to the operation of the second trigger signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of communication technology, and in particular, to a signal output method, a signal output device, and a control system. Background Art

[0002] With the continuous development of electronic technology, more and more application scenarios require the use of trigger signals as the trigger source to initiate certain operations. However, some modules and devices controlled by trigger signals can only respond to a single edge of the trigger signal (such as the rising or falling edge), which will affect the efficiency of these modules and devices in responding to the trigger signal.

[0003] Therefore, how to improve the efficiency of modules and devices controlled by a trigger signal in operating in response to the trigger signal is a problem that needs to be solved at present. Summary of the Invention

[0004] In order to solve the above problems or other problems, the present invention provides the following technical solutions.

[0005] In a first aspect, the present invention provides a signal output method, comprising:

[0006] Enable the control module to obtain a first trigger signal output by the counting module and a value of the control register, wherein the first trigger signal has multiple level transition nodes;

[0007] enabling the control module to determine, according to the value, whether a second trigger signal needs to be generated according to the first trigger signal, wherein the second trigger signal has a pulse at a location corresponding to the level transition node; and

[0008] The control module is enabled to output the first trigger signal or the second trigger signal.

[0009] According to an embodiment of the present invention, the signal output method further includes, before the step of causing the control module to obtain the first trigger signal output by the counting module and the value of the control register:

[0010] enabling a comparison circuit of the counting module to obtain a count value of the counter, a first comparison value of the first comparison register, and a second comparison value of the second comparison register;

[0011] enabling the counting module to generate the first trigger signal according to the counting value, the first comparison value, and the second comparison value;

[0012] When the count value reaches one of the first comparison value and the second comparison value, the first trigger signal jumps from the first level state to the second level state, or the first trigger signal jumps from the second level state to the first level state.

[0013] According to the signal output method of an embodiment of the present invention, the step of causing the counting module to generate the first trigger signal according to the count value, the first comparison value, and the second comparison value specifically includes:

[0014] enabling a first comparison unit of the comparison circuit to generate a first comparison signal according to the count value and the first comparison value, and enabling a second comparison unit of the comparison circuit to generate a second comparison signal according to the count value and the second comparison value;

[0015] The logic operation unit of the counting module is enabled to generate the first trigger signal according to the first comparison signal and the second comparison signal.

[0016] According to a signal output method according to an embodiment of the present invention, within one cycle, the count value monotonically increases or the count value monotonically decreases or the count value first monotonically increases and then monotonically decreases or the count value first monotonically decreases and then monotonically increases.

[0017] According to the signal output method according to an embodiment of the present invention, the first trigger signal is a pulse width modulation signal.

[0018] In a second aspect, the present invention provides a signal output device, comprising:

[0019] a counting module having a first signal output port, wherein the first signal output port is configured to output a first trigger signal, wherein the first trigger signal has a plurality of level transition nodes; and

[0020] A control module is coupled to the first signal output port and has a second signal output port. The control module is configured to obtain the first trigger signal and the numerical value of the control register, and determine whether it is necessary to generate a second trigger signal based on the first trigger signal based on the numerical value. The second signal output port is configured to output the first trigger signal or the second trigger signal, wherein the second trigger signal has a pulse at the position corresponding to the level jump node.

[0021] According to a signal output device according to an embodiment of the present invention, the control module includes a control unit and a pulse generating circuit, wherein:

[0022] The control unit is coupled to the first signal output port, the control register, the pulse generating circuit, and the second signal output port, and is configured to determine whether the first trigger signal needs to be input to the pulse generating circuit according to the value;

[0023] The pulse generating circuit is coupled to the second signal output port and is configured to generate the second trigger signal according to the first trigger signal.

[0024] According to an embodiment of the present invention, the signal output device, wherein the counting module includes a comparison circuit, and a counter coupled to the comparison circuit, a first comparison register, and a second comparison register, wherein:

[0025] The comparison circuit is configured to obtain a count value of the counter, a first comparison value of the first comparison register, and a second comparison value of the second comparison register, and generate the first trigger signal according to the count value, the first comparison value, and the second comparison value.

[0026] According to a signal output device according to an embodiment of the present invention, the counting module includes a comparison circuit, and a counter coupled to the comparison circuit, a first comparison register, a second comparison register, and a logic operation unit. The comparison circuit includes a first comparison unit and a second comparison unit, wherein:

[0027] The first comparison unit is coupled to the counter and the first comparison register, and is configured to generate a first comparison signal according to the count value and the first comparison value;

[0028] The second comparison unit is coupled to the counter and the second comparison register, and is configured to generate a second comparison signal according to the count value and the second comparison value;

[0029] The logic operation unit is coupled to the first comparison unit and the second comparison unit, and is configured to generate the first trigger signal according to the first comparison signal and the second comparison signal.

[0030] In a third aspect, the present invention provides a control system, comprising:

[0031] A control device comprising the signal output device described in any one of the above items.

[0032] According to the control system of an embodiment of the present invention, the control device includes an analog-to-digital converter, wherein the analog-to-digital converter is configured to perform sampling according to the first trigger signal or the second trigger signal.

[0033] According to an embodiment of the present invention, the control system further comprises:

[0034] a motor coupled to the third signal output port of the signal output device, the motor operating according to the signal output from the third signal output port;

[0035] The analog-to-digital converter is configured to sample the analog signal output by the motor according to the first trigger signal or the second trigger signal.

[0036] According to a control system of an embodiment of the present invention, the analog-to-digital converter is triggered to perform the sampling at a rising edge and / or a falling edge of the first trigger signal and at a rising edge and / or a falling edge of the second trigger signal.

[0037] In the control system according to an embodiment of the present invention, the control device is a micro control unit chip, and the signal output device is a timer.

[0038] The beneficial effects of the present invention are as follows: the present invention provides a signal output method, a signal output device and a control system. The signal output method includes: enabling the control module to obtain the first trigger signal output by the counting module and the numerical value of the control register, wherein the first trigger signal has multiple level jump nodes, and then enabling the control module to determine whether it is necessary to generate a second trigger signal based on the first trigger signal according to the numerical value, and wherein the second trigger signal has a pulse at the position corresponding to the level jump node, and finally, enabling the control module to output the first trigger signal or the second trigger signal. The signal output method provided by the present invention can ultimately output the second trigger signal. Compared with the first trigger signal, since the second trigger signal has more rising edges and falling edges, the modules and devices controlled by the second trigger signal can have a higher efficiency in operating in response to the second trigger signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in describing the various embodiments according to the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 FIG. 4 is a flow chart of a signal output method provided in an embodiment according to the present invention.

[0041] Figure 2 FIG. 1 is a schematic structural diagram of a signal output device provided in an embodiment according to the present invention.

[0042] Figure 3FIG. 1 is a waveform diagram of a signal generated by a signal output device according to an embodiment of the present invention.

[0043] Figure 4 FIG. 1 is a flow chart of a signal output method provided in a first embodiment according to the present invention.

[0044] Figure 5 FIG. 1 is a schematic structural diagram of a signal output device provided in a first embodiment according to the present invention.

[0045] Figure 6 FIG. 1 is a waveform diagram of a signal generated by the signal output device provided in the first embodiment according to the present invention.

[0046] Figure 7 FIG. 1 is a flow chart of a signal output method provided in a second embodiment according to the present invention.

[0047] Figure 8 FIG. 1 is a schematic structural diagram of a signal output device provided in a second embodiment according to the present invention.

[0048] Figure 9 FIG. 1 is a waveform diagram of a signal generated by a signal output device provided in accordance with a second embodiment of the present invention.

[0049] Figure 10 FIG. 1 is a schematic diagram of the structure of a control system provided in an embodiment according to the present invention.

[0050] Figure 11 FIG. 1 is a structural diagram of a control system provided in accordance with another embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0052] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of the specified features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0053] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections, electrical connections, or mutual communication; direct connections or indirect connections through an intermediate medium; and internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0054] The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numbers and / or reference letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed. In addition, the present invention provides examples of various specific processes and materials, but those skilled in the art will recognize the application of other processes and / or the use of other materials.

[0055] See also Figures 1 to 3 , Figure 1 and Figure 2 1 and 2 respectively show a flow chart of a signal output method according to an embodiment of the present invention and a structural diagram of a signal output device 100. Figure 3 FIG. 1 shows a waveform diagram of a signal generated by the signal output device 100 according to an embodiment of the present invention, as shown in FIG. Figures 1 to 3 As shown, the signal output method may specifically include the following steps:

[0056] Acquisition step S101: enabling the control module 120 to acquire a first trigger signal output by the counting module 110 and a value of the control register R3, wherein the first trigger signal has a plurality of level transition nodes (N1 to N4);

[0057] Determining step S102: enabling the control module 120 to determine, based on the numerical value, whether it is necessary to generate a second trigger signal based on the first trigger signal, wherein the second trigger signal has a pulse at a location corresponding to a level transition node (N1 to N4);

[0058] Output step S103: enabling the control module 120 to output the first trigger signal or the second trigger signal.

[0059] It should be noted that during operation, the motor needs to be sampled by the analog to digital converter (ADC) in the microcontroller unit (MCU) chip, and needs to be controlled by a trigger signal to perform operations such as sampling of analog signals such as current or voltage.

[0060] In one embodiment, the signal output by a timer (a timer module) in a microcontroller chip can serve as a trigger signal for an analog-to-digital converter to sample an analog signal. However, since the analog-to-digital converter is often controlled only by the rising edge of the trigger signal (or, alternatively, only by the falling edge of the trigger signal) to perform corresponding operations, to ensure efficient sampling of analog signals such as current and voltage, in such embodiments, the timer is typically configured to output a pulse signal, and the pulse frequency of the pulse signal is set accordingly.

[0061] However, adopting the above implementation method will limit the types of signals that the timer can output.

[0062] For further information, please refer to Figures 1 to 3 In an embodiment according to the present invention, the signal type of the first trigger signal output by the counting module 110 is not restricted. Specifically, the control module 120 generates a second trigger signal having a pulse at a level transition node (N1 to N4) corresponding to the first trigger signal. Since a level transition node can only have one rising edge or one falling edge in the signal, and a pulse has a pair of rising edges and falling edges, the second trigger signal generated by the control module 120 has more rising edges and falling edges than the first trigger signal output by the counting module 110. The modules and devices controlled by the second trigger signal can perform corresponding operations in response to the rising edge or falling edge of the pulse in the second trigger signal. Therefore, according to an embodiment of the present invention, without restricting the signal type of the first trigger signal output by the counting module 110, it is ensured that the modules and devices controlled by the second trigger signal can have higher operating efficiency.

[0063] In an embodiment according to the present invention, specifically, within one cycle, the first trigger signal output by the counting module 110 has at least one level transition node.

[0064] It should be noted that, considering that it is not necessary in all cases for the control module 120 to output a trigger signal with more rising edges and falling edges, therefore, in an embodiment according to the present invention, the control module 120 needs to determine whether it is necessary to generate and output a second trigger signal based on the value of the control register R3. For example, when the control register R3 can store one bit of data, if its value is 1 (corresponding to the data stored in the control register R3 being 1), it indicates that the control module 120 needs to output the second trigger signal; if its value is 0 (corresponding to the data stored in the control register R3 being 0), it indicates that the control module 120 needs to output the first trigger signal.

[0065] Specifically, in an embodiment according to the present invention, the first trigger signal may be a pulse width modulation (PWM) signal.

[0066] See also Figures 4 to 6 , Figure 4 and Figure 5 1 and 2 respectively show a flow chart of a signal output method according to a first embodiment of the present invention and a structural diagram of a signal output device 200. Figure 6 FIG. 1 shows a waveform diagram of a signal generated by the signal output device 200 according to the first embodiment of the present invention. Figures 4 to 6 As shown, the signal output method provided in the first embodiment may specifically include the following steps:

[0067] Acquisition step S201: enabling the comparison circuit 211 of the counting module 210 to acquire the count value of the counter 212, the first comparison value of the first comparison register R1, and the second comparison value of the second comparison register R2;

[0068] Generating step S202: enabling the counting module 210 to generate a first trigger signal according to the count value, the first comparison value, and the second comparison value, wherein the first trigger signal has level transition nodes (N1 to N4) corresponding to the first comparison value and the second comparison value;

[0069] Determining step S203: enabling the control module 220 to obtain the first trigger signal and the value of the control register R3, and determining, based on the value, whether it is necessary to generate a second trigger signal based on the first trigger signal, wherein the second trigger signal has a pulse at a location corresponding to a level transition node (N1 to N4);

[0070] Output step S204: enabling the control module 220 to output the first trigger signal or the second trigger signal.

[0071] For further information, please refer to Figure 5In this embodiment, the signal output device 200 for executing the above-mentioned signal output method includes a counting module 210 and a control module 220, wherein:

[0072] The counting module 210 includes a comparison circuit 211 and a counter 212 coupled to the comparison circuit 211, a first comparison register R1, and a second comparison register R2. The counting module 210 has a first signal output port A. The comparison circuit 211 is configured to perform the above-mentioned acquisition step S201 and the above-mentioned generation step S202. The first signal output port A is configured to output a first trigger signal.

[0073] The control module 220 is coupled to the first signal output port A, and the control module 220 has a second signal output port B, wherein the control module 220 is configured to perform the above-mentioned determination step S203 and the above-mentioned output step S204, and the second signal output port B is configured to output the first trigger signal or the second trigger signal.

[0074] It should be noted that, during the process of the comparison circuit 211 executing the above-mentioned generation step S202, when the count value of the counter 212 reaches one of the first comparison value and the second comparison value, the first trigger signal generated by the comparison circuit 211 will jump from the first level state to the second level state, or jump from the second level state to the first level state. Specifically, the first level state is one of a high level state and a low level state, and the second level state is the other of the high level state and the low level state.

[0075] Specifically, in this embodiment, within one cycle, the change trend of the count value of the counter 212 may include, for example, monotonically increasing, monotonically decreasing, monotonically increasing followed by monotonically decreasing, and monotonically decreasing followed by monotonically increasing, etc. The embodiments according to the present invention do not limit this change trend.

[0076] For further information, please refer to Figure 5 In this embodiment, the control module 220 specifically includes a control unit 221 and a pulse generating circuit 222, wherein:

[0077] The control unit 221 is coupled to the first signal output port A, the control register R3, the pulse generating circuit 222 and the second signal output port B, and is configured to determine whether the first trigger signal needs to be input to the pulse generating circuit 222 according to the value of the control register R3;

[0078] The pulse generating circuit 222 is coupled to the second signal output port B and is configured to generate a second trigger signal according to the first trigger signal.

[0079] Specifically, in this embodiment, the control unit 221 can be a switching transistor, and the voltage corresponding to the value of the control register R3 can control the first signal output port A and the pulse generating circuit 222 to be connected, or control the first signal output port A and the second signal output port B to be connected.

[0080] According to the aforementioned embodiment, an embodiment according to the present invention provides a signal output method, comprising: enabling the comparison circuit 211 of the counting module 210 to obtain the count value of the counter 212, the first comparison value of the first comparison register R1, and the second comparison value of the second comparison register R2; enabling the counting module 210 to generate a first trigger signal according to the count value, the first comparison value, and the second comparison value, wherein the first trigger signal has level transition nodes (N1 to N4) corresponding to the first comparison value and the second comparison value; enabling the control module 220 to obtain the first trigger signal and the value of the control register R3, and determining whether to generate a second trigger signal according to the value, wherein the second trigger signal is generated when the second trigger signal corresponds to the first comparison value. There is a pulse at the level jump node (N1 to N4); the control module 220 outputs a first trigger signal or a second trigger signal. The signal output method provided by the present invention can enable the control module 220 to generate and output a second trigger signal. Compared with the first trigger signal output from the counting module 210, the second trigger signal has more rising edges and falling edges, and the modules and devices controlled by the second trigger signal can respond to the rising edge or falling edge of the pulse in the second trigger signal to perform corresponding operations. Therefore, this embodiment can ensure that the modules and devices controlled by the second trigger signal can have higher operating efficiency without restricting the signal type of the first trigger signal output by the counting module 210.

[0081] See also Figures 7 to 9 , Figure 7 and Figure 8 1 and 2 respectively show a flow chart of a signal output method according to a second embodiment of the present invention and a structural diagram of a signal output device 300. Figure 9 FIG. 4 shows a waveform diagram of a signal generated by the signal output device 300 according to the second embodiment of the present invention. Figures 7 to 9 As shown, the signal output method provided in the second embodiment may specifically include the following steps:

[0082] Acquisition step S301: enabling the comparison circuit 311 of the counting module 310 to acquire the count value of the counter 312, the first comparison value of the first comparison register R1, and the second comparison value of the second comparison register R2;

[0083] First generating step S302: enabling the first comparing unit 3111 of the comparing circuit 311 to generate a first comparison signal according to the count value and the first comparison value, and enabling the second comparing unit 3112 of the comparing circuit 311 to generate a second comparison signal according to the count value and the second comparison value;

[0084] Second generating step S303: enabling the logic operation unit 313 of the counting module 310 to generate a first trigger signal according to the first comparison signal and the second comparison signal, wherein the first trigger signal has level transition nodes (N1 to N4) corresponding to the first comparison value and the second comparison value;

[0085] Determining step S304: enabling the control module 320 to obtain the first trigger signal and the value of the control register R3, and determining, based on the value, whether it is necessary to generate a second trigger signal based on the first trigger signal, wherein the second trigger signal has a pulse at a location corresponding to a level transition node (N1 to N4);

[0086] Output step S305: enabling the control module 320 to output the first trigger signal or the second trigger signal.

[0087] For further information, please refer to Figure 8 In this embodiment, the signal output device 300 for executing the above-mentioned signal output method includes a counting module 310 and a control module 320, wherein:

[0088] The counting module 310 includes a comparison circuit 311, a counter 312 coupled to the comparison circuit 311, a first comparison register R1, a second comparison register R2, and a logic operation unit 313. The comparison circuit 311 includes a first comparison unit 3111 and a second comparison unit 3111. The first comparison unit 3111 and the second comparison unit 3111 are configured to perform the above-mentioned acquisition step S301 and the first generation step S302. The logic operation unit 313 is configured to perform the above-mentioned second generation step S303.

[0089] The control module 320 is configured to execute the above-mentioned determination step S304 and the above-mentioned output step S305, and the control module 320 (including the control unit 321 and the pulse generating unit 322) in this embodiment is similar to the structure and function of the control module 220 (including the control unit 221 and the pulse generating unit 222) in the first embodiment above. Therefore, in this embodiment, this module will not be described in detail.

[0090] It should be noted that, in this embodiment, the logic operation unit 313 configured to perform the second generation step S303 may be an XOR gate. Furthermore, in other embodiments according to the present invention, the logic operation unit may also be composed of other logic gates. In these embodiments, it is sufficient to ensure that the generated first trigger signal has level transition nodes corresponding to the first comparison value and the second comparison value.

[0091] See also Figure 10 , Figure 10 A schematic structural diagram of a control system 400 provided in accordance with an embodiment of the present invention is shown. From the diagram, the various components of the embodiment of the present invention and the relative positional relationships of the various components can be intuitively seen.

[0092] like Figure 10 As shown, the control system 400 includes a control device 410, wherein the control device 410 includes the signal output device 200 and an analog to digital converter 411 (ADC) as described in the first embodiment above, wherein the analog to digital converter 411 is coupled to the second signal output port B of the signal output device 200, and is configured to perform sampling based on the first or second trigger signal output by the signal output device 200, and can be the sampling of an analog signal of any module or device.

[0093] For example, Figure 11 As shown, the control system 400 includes a control device 410 and a motor 420, wherein the control device 410 includes the signal output device 200 and the analog-to-digital converter 411 as described in the first embodiment above, and the motor 420 is coupled to the third signal output port C of the signal output device 200 and operates according to the signal output from the third signal output port C. In a further embodiment, in addition to the counting module 110 in the first embodiment, the signal output device 200 further includes a plurality of other counting modules (not shown), and these other counting modules and the counting module 110 use the same counting cycle (e.g. Figure 6 or Figure 9 The other counting modules can output signals through the third signal output port C to drive the control motor 420.

[0094] The analog-to-digital converter 411 is configured to sample analog signals, such as the three-phase current / voltage, of the motor 420 based on the first trigger signal or the second trigger signal. Because the drive control signal of the motor 420 has the same period as the first trigger signal or the second trigger signal that triggers the ADC sampling, the analog signals of the motor 420 can be sampled multiple times within a single period. It should be noted that in other embodiments according to the present invention, the analog-to-digital converter 411 may also sample analog signals from other modules or devices.

[0095] Now return to reference Figure 10 The analog-to-digital converter 411 is triggered by the rising edge of the first trigger signal or the rising edge of the second trigger signal to start sampling the analog signal. In other embodiments of the present invention, the analog-to-digital converter 411 may also be triggered by the falling edge of the first trigger signal or the falling edge of the second trigger signal to start sampling the analog signal, or by both the rising and falling edges of the first trigger signal and the rising and falling edges of the second trigger signal to start sampling the analog signal. The present invention is not limited thereto.

[0096] It should be noted that if Figure 5 、 Figure 6 as well as Figure 10 As shown, in this embodiment, the first trigger signal generated by the comparison circuit 211 has only two level transition nodes within one cycle, and the analog-to-digital converter 411 coupled to the signal output device 200 only responds to the rising edge of the signal. Therefore, when the signal output device 200 outputs the first trigger signal from the second signal output port B, the analog-to-digital converter 411 can sample the analog signal once within one cycle, and when the signal output device 200 outputs the second trigger signal from the second signal output port B, the analog-to-digital converter 411 can sample the analog signal twice within one cycle.

[0097] It should be noted that, in the embodiment according to the present invention, the control device 410 is a microcontroller unit (MCU) chip, and the signal output device 200 is a timer (Timer module) in the microcontroller unit chip. TM Series of microcontroller chips.

[0098] In addition to the above embodiments, the present invention may also have other implementations. Any technical solution formed by equivalent replacement or equivalent replacement falls within the scope of protection required by the present invention.

[0099] In summary, although the preferred embodiments of the present invention have been disclosed above, the above preferred embodiments are not intended to limit the present invention. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope defined by the claims.

Claims

1. A signal output method, characterized in that: include: Enable the control module to obtain a first trigger signal output by the counting module and a value of the control register, wherein the first trigger signal has multiple level transition nodes; enabling the control module to determine, according to the value, whether a second trigger signal needs to be generated according to the first trigger signal, wherein the second trigger signal has a pulse at a location corresponding to the level transition node; and The control module is enabled to output the first trigger signal or the second trigger signal.

2. The signal output method according to claim 1, wherein: Before the step of enabling the control module to obtain the first trigger signal output by the counting module and the value of the control register, the method further includes: enabling a comparison circuit of the counting module to obtain a count value of the counter, a first comparison value of the first comparison register, and a second comparison value of the second comparison register; enabling the counting module to generate the first trigger signal according to the counting value, the first comparison value, and the second comparison value; When the count value reaches one of the first comparison value and the second comparison value, the first trigger signal jumps from the first level state to the second level state, or the first trigger signal jumps from the second level state to the first level state.

3. The signal output method according to claim 2, wherein: The step of causing the counting module to generate the first trigger signal according to the count value, the first comparison value, and the second comparison value specifically includes: enabling a first comparison unit of the comparison circuit to generate a first comparison signal according to the count value and the first comparison value, and enabling a second comparison unit of the comparison circuit to generate a second comparison signal according to the count value and the second comparison value; The logic operation unit of the counting module is enabled to generate the first trigger signal according to the first comparison signal and the second comparison signal.

4. The signal output method according to claim 2, wherein: In one cycle, the count value monotonically increases or the count value monotonically decreases or the count value first monotonically increases and then monotonically decreases or the count value first monotonically decreases and then monotonically increases.

5. The signal output method according to claim 1, wherein: The first trigger signal is a pulse width modulation signal.

6. A signal output device, characterized in that: include: a counting module having a first signal output port, wherein the first signal output port is configured to output a first trigger signal, wherein the first trigger signal has a plurality of level transition nodes; and A control module is coupled to the first signal output port and has a second signal output port. The control module is configured to obtain the first trigger signal and the numerical value of the control register, and determine whether it is necessary to generate a second trigger signal based on the first trigger signal based on the numerical value. The second signal output port is configured to output the first trigger signal or the second trigger signal, wherein the second trigger signal has a pulse at the position corresponding to the level jump node.

7. The signal output device according to claim 6, characterized in that: The control module includes a control unit and a pulse generating circuit, wherein: The control unit is coupled to the first signal output port, the control register, the pulse generating circuit, and the second signal output port, and is configured to determine whether the first trigger signal needs to be input to the pulse generating circuit according to the value; The pulse generating circuit is coupled to the second signal output port and is configured to generate the second trigger signal according to the first trigger signal.

8. The signal output device according to claim 6, characterized in that: The counting module includes a comparison circuit, and a counter coupled to the comparison circuit, a first comparison register, and a second comparison register, wherein: The comparison circuit is configured to obtain a count value of the counter, a first comparison value of the first comparison register, and a second comparison value of the second comparison register, and generate the first trigger signal according to the count value, the first comparison value, and the second comparison value.

9. The signal output device according to claim 6, characterized in that: The counting module includes a comparison circuit, and a counter coupled to the comparison circuit, a first comparison register, a second comparison register, and a logic operation unit. The comparison circuit includes a first comparison unit and a second comparison unit, wherein: The first comparison unit is coupled to the counter and the first comparison register, and is configured to generate a first comparison signal according to a count value and the first comparison value; The second comparison unit is coupled to the counter and the second comparison register, and is configured to generate a second comparison signal according to the count value and the second comparison value; The logic operation unit is coupled to the first comparison unit and the second comparison unit, and is configured to generate the first trigger signal according to the first comparison signal and the second comparison signal.

10. A control system, characterized in that: include: A control device comprising the signal output device according to any one of claims 6 to 9.

11. The control system according to claim 10, characterized in that: The control device includes an analog-to-digital converter, wherein the analog-to-digital converter is configured to perform sampling according to the first trigger signal or the second trigger signal.

12. The control system according to claim 11, characterized in that: The control system further includes: a motor coupled to the third signal output port of the signal output device, the motor operating according to the signal output from the third signal output port; The analog-to-digital converter is configured to sample the analog signal output by the motor according to the first trigger signal or the second trigger signal.

13. The control system according to claim 11, characterized in that: At the rising edge and / or falling edge of the first trigger signal and at the rising edge and / or falling edge of the second trigger signal, the analog-to-digital converter is triggered to perform the sampling.

14. The control system according to claim 10, characterized in that: The control device is a micro control unit chip, and the signal output device is a timer.

Citation Information

Patent Citations

  • 1-16 and 1.5-7.5 frequency dividers used for a clock synthesizer in a digital system

    CN107547082A

  • Method, device and system for controlling motor

    CN110601605A