SUMMERY OF THE UTILITY MODEL
The utility model provides a square wave signal generator for solve the technical problem that the square wave signal that generates among the prior art can't satisfy the product precision demand.
The utility model provides a square wave signal generator, square wave signal generator includes control chip, digital analog conversion chip DAC _ A, digital analog conversion chip DAC _ B and switch; wherein,
the control chip is connected with the DAC _ A, the DAC _ B and the switch and used for controlling the DAC _ A and the DAC _ B to output voltage values and controlling the switch to switch periodically between the connection with the ground and the connection with the DAC _ A so as to generate square wave signals;
the DAC _ B is connected with the DAC _ A, and outputs a voltage value for controlling the DAC _ A reference voltage value;
and if the precision of the DAC _ A output voltage value needs to be adjusted, the control chip correspondingly adjusts the DAC _ A reference voltage value by controlling the DAC _ B output voltage value, so that the precision of the DAC _ A output signal corresponds to the adjusted DAC _ A reference voltage value.
The utility model provides a square wave signal generator, if when adjusting the square wave signal's that generates precision according to the actual demand of product, this square wave signal generator passes through control chip with DAC _ A with DAC _ B connects, controls DAC _ A with DAC _ B's output voltage, and through control DAC _ B output voltage value corresponds the adjustment DAC _ A reference voltage value, makes DAC _ A output signal's precision corresponds with DAC _ A reference voltage value after the adjustment. Therefore, the amplitude value of the square wave signal generated by the square wave signal generator is more accurate by controlling the output voltage of the DAC _ A and the DAC _ B through the control chip.
Optionally, the square wave signal generator further comprises: and the pushing circuit is connected between the DAC _ A and the switch and used for amplifying the DAC _ A output signal and transmitting the amplified DAC _ A output signal to the switch.
The utility model provides a square wave signal generator, through DAC _ A with set up the push circuit between the switch, be used for with DAC _ A output voltage value is enlargied with fixed multiple, has not only improved DAC _ A's driving force can also be through control DAC _ A output voltage value corresponds the adjustment the input signal's of switch voltage value for the square wave signal's that generates amplitude satisfies actual demand.
Optionally, the control chip is specifically configured to: receiving parameters of the square wave signal input by a user, wherein the parameters comprise one or more combinations of the frequency of the square wave signal, the duty ratio of the square wave signal, the amplitude of the square wave signal and the precision magnitude of the amplitude of the square wave signal; controlling the DAC _ A and DAC _ B output voltage values based on the parameter, and controlling the switch to generate the square wave signal.
The utility model provides a square wave signal generator, control chip controls based on user input's square wave signal's parameter DAC _ A with DAC _ B output voltage value to and control generation square wave signal. Therefore, the square wave signal generator generates the square wave signal based on the requirement of a user, and the applicability of the square wave signal generator is improved.
Optionally, the control chip is further configured to: generating a periodic pulse signal having a frequency of the square wave signal and a duty cycle of the square wave signal based on the frequency and the duty cycle; controlling the DAC _ A output voltage value based on the amplitude of the square wave signal; controlling the DAC _ B output voltage value based on a magnitude of precision of an amplitude of the square wave signal.
Optionally, the control chip is further configured to determine a level of the periodic pulse signal; when the periodic pulse signal is at a low level, controlling the switch to be connected with the ground; when the periodic pulse signal is at a high level, controlling the switch to be connected with the pushing circuit; and controlling the switch to switch between the connection with the ground and the connection with the pushing circuit according to the periodic pulse signal so as to generate the square wave signal.
Optionally, after the control chip is powered on, the DAC _ a receives a first output voltage adjustment instruction from the control chip, and adjusts the voltage value of the DAC _ a output signal based on the first output voltage adjustment instruction, where the first output voltage adjustment instruction includes the amplitude of the square wave signal.
Optionally, after the control chip is powered on, the DAC _ B receives a second voltage adjustment instruction output by the control chip, adjusts the DAC _ B output voltage value based on the second output voltage adjustment instruction, and adjusts the DAC _ a reference voltage value by using the DAC _ B output voltage value, so that the precision of the DAC _ a output signal corresponds to the adjusted DAC _ a reference voltage value, where the second voltage adjustment instruction includes the magnitude of the precision of the amplitude of the square wave signal.
Optionally, the square wave signal generator further includes:
and the reference voltage source is connected with the DAC _ B and used for providing a reference voltage for the DAC _ B.
Optionally, the switch is a high speed switch.
Optionally, the speed at which the high speed switch switches between grounding and connecting the push circuit is greater than a first threshold; the internal resistance of the high-speed switch is smaller than a second threshold value; the noise figure of the high speed switch is less than a third threshold.
The utility model provides a square wave signal generator, the switch has at ground connection and connection the speed of switching between the pushing circuit is greater than first threshold value, and the internal resistance is less than the second threshold value and noise figure is less than the third threshold value, avoids control chip control the switch is at ground connection and connection switching time overlength between the pushing circuit leads to the hopping of the square wave signal of generation along the longer problem of time, has improved the performance that generates square wave signal.
Detailed Description
The utility model provides a square wave signal generator for solve the technical problem that the square wave signal that generates among the prior art can't satisfy the product precision demand.
The embodiment of the utility model provides an in technical scheme can pass through set up control chip, digital analog conversion chip DAC _ A, digital analog conversion chip DAC _ B and switch in the square wave signal generator. And if the precision of the generated square wave signal is adjusted according to the actual requirement of the product, the square wave signal generator is connected with the DAC _ A and the DAC _ B through the control chip to control the output voltages of the DAC _ A and the DAC _ B, and the DAC _ A reference voltage value is correspondingly adjusted by controlling the DAC _ B output voltage value, so that the precision of the DAC _ A output signal corresponds to the adjusted DAC _ A reference voltage value. Therefore, the amplitude value of the square wave signal generated by the square wave signal generator is more accurate by controlling the output voltage of the DAC _ A and the DAC _ B through the control chip.
The embodiment of the present invention provides a solution, the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. According to the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without any creative work belong to the protection scope of the present invention.
In order to better understand the technical solutions, the following detailed descriptions of the technical solutions of the present invention are provided through the drawings and the specific embodiments, and it should be understood that the specific features of the embodiments and the embodiments of the present invention are the detailed descriptions of the technical solutions of the present invention, rather than the limitations of the technical solutions of the present invention, and the technical features of the embodiments and the embodiments of the present invention can be combined with each other without conflict.
Referring to fig. 1, an embodiment of the present invention provides a square wave signal generator, where a main control system of the square wave signal generator includes a control chip 101, and a data communication system of the square wave signal generator includes a digital-to-analog conversion chip DAC _ a102, a digital-to-analog conversion chip DAC _ B103, and a switch 104;
the control chip 101 is connected with the DAC _ a102, the DAC _ B103 and the switch 104, and is used for controlling the output voltage values of the DAC _ a102 and the DAC _ B103 and controlling the switch 104 to switch periodically between the connection with the ground and the connection with the DAC _ a102, so as to generate a square wave signal;
the DAC _ B103 is connected with the DAC _ A102, and the DAC _ B outputs a voltage value for controlling a DAC _ A reference voltage value;
and if the precision of the DAC _ A output voltage value needs to be adjusted, the control chip correspondingly adjusts the DAC _ A reference voltage value by controlling the DAC _ B output voltage value, so that the precision of the DAC _ A output signal corresponds to the adjusted DAC _ A reference voltage value.
The square wave signal generator further comprises: a reference voltage source 105, wherein the reference voltage source 105 is connected to the DAC _ B103 and is used for providing a reference voltage for the DAC _ B103;
further, in order to increase the driving capability of the DAC _ a102 and increase the value of the square wave signal generator output voltage. The square wave signal generator further comprises: and the push circuit 106 is connected between the DAC _ a102 and the switch 104, and is used for amplifying the DAC _ a output signal and transmitting the amplified DAC _ a output signal to the switch 104. It should be understood that the pushing circuit 106 may be a low-noise amplifying circuit, or may be other circuits capable of amplifying the DAC _ a output signal, and is not limited herein.
Further, in order to enable the square wave signal generated by the square wave signal generator to meet the actual requirement of the product. The control chip 101 is specifically configured to: receiving parameters of the square wave signal input by a user, wherein the parameters comprise one or more combinations of the frequency of the square wave signal, the duty ratio of the square wave signal, the amplitude of the square wave signal and the precision magnitude of the amplitude of the square wave signal; controlling the DAC _ A and DAC _ B output voltage values based on the parameter, and controlling the switch to generate the square wave signal.
Further, the purpose of accurately controlling the frequency and the amplitude of the square wave signal generated by the square wave signal generator is achieved. The control chip 101 is further configured to: generating a periodic pulse signal having a frequency of the square wave signal and a duty cycle of the square wave signal based on the frequency and the duty cycle; controlling the DAC _ A output voltage value based on the amplitude of the square wave signal; controlling the DAC _ B output voltage value based on a magnitude of precision of an amplitude of the square wave signal.
Specifically, as shown in fig. 2, based on different uses of the control chip 101, the control chip 101 is divided into a plurality of functional modules, which may specifically be: a parameter setting code module 201, a control processing code module 202, a DAC _ a output voltage setting code module 203, a DAC _ B output voltage setting code module 204, and a periodic pulse signal generation code module 205, where the parameter setting code module 201 is configured to implement setting of a current wave signal parameter, for example, frequency of a square wave signal, duty ratio of the square wave signal, amplitude of the square wave signal, or magnitude of precision of the amplitude of the square wave signal; the control processing code module 202 is configured to receive the parameter, and based on the parameter, control the DAC _ a output voltage setting code module 203 to set the DAC _ a output voltage value, control the DAC _ B output voltage setting code module 204 to set the DAC _ B output voltage value, and control the periodic pulse signal generation code module 205 to set generation of the periodic pulse signal.
For example, when the types of the DAC _ a102 chips and the DAC _ B103 chips are selected, that is, the number of bits of the binary data input by the digital-to-analog conversion chip is determined, wherein the number of bits of the binary data input by the digital-to-analog conversion chip includes 8 bits, 16 bits, 24 bits, and the like, and the number of bits of the digital-to-analog conversion chip is not limited herein. After the control chip 101 is powered on, parameters such as the frequency of a square wave signal, the duty ratio of the square wave signal, the amplitude of the square wave signal, or the precision magnitude of the amplitude of the square wave signal are burned into the parameter setting code module 201 through an input port of the control chip 101, the parameter setting code module 201 sends the parameters to the control processing code module 202, and the control processing code module 202 calculates the frequency and the duty ratio of a generated periodic pulse signal according to the frequency of the square wave signal and the duty ratio of the square wave signal, for example, the frequency of the square wave signal is 30MHZ, the duty ratio is equal to 50%, the frequency of the generated periodic pulse signal is also 30MHZ, and the duty ratio is equal to 50%.
The control processing code module 202 then calculates the DAC _ B output voltage value based on the magnitude of the precision of the amplitude of the square wave signal. Specifically, the accuracy of the DAC _ a output voltage is calculated based on the following formula:
wherein, V1Outputting the accuracy of the voltage value for the DAC _ A; vref-A represents the magnitude of the DAC _ B reference voltage value; n is a radical of1A number of bits representing the DAC _ A102; n is a radical of2A number of bits representing the DAC _ B103; the value range of y is 0-2 ^ N2And represents a digital value of the DAC _ B103.
As can be seen from the above equation, after the DAC _ a102 and DAC _ B103 chips are selected, the accuracy of the DAC _ a output voltage is related to the reference voltage of the DAC _ a102, and in the square wave signal generator, the output port of the DAC _ B103 is connected to the reference voltage input port of the DAC _ a102, that is, in the embodiment of the present invention, the DAC _ a reference voltage value corresponds to the DAC _ B output voltage value. Therefore, the DAC _ B output voltage value can be obtained by the above equation and set at the DAC _ B output voltage setting code module.
The control processing code module calculates the DAC _ A output voltage value based on the following formula:
wherein, VoutOutputting a voltage value for the DAC _ A; the value range of x is 0-2 ^ N1Represents the digital value of the DAC _ a 102.
Further, in order to enable the square wave signal generator to generate the square wave signal meeting the product requirement. The control chip 101 is further configured to determine a level of the periodic pulse signal;
when the periodic pulse signal is in a low level, controlling the switch 104 to be connected with the ground; when the periodic pulse signal is at a high level, controlling the switch 104 to be connected with the push circuit 106; the switch 104 is controlled to switch between connecting ground and connecting the push circuit 106 according to the periodic pulse signal so that the square wave signal is generated.
After the control chip 101 is powered on, the DAC _ a102 receives a first output voltage adjustment instruction from the control chip 101, and adjusts the DAC _ a output voltage value based on the first output voltage adjustment instruction, where the first output voltage adjustment instruction includes the amplitude of the square wave signal.
After the control chip 101 is powered on, the DAC _ B103 receives a second voltage adjustment instruction output by the control chip 101, adjusts the DAC _ B output voltage value based on the second output voltage adjustment instruction, and adjusts the DAC _ a reference voltage value according to the DAC _ B output voltage value, so that the precision of the DAC _ a output signal corresponds to the adjusted DAC _ a reference voltage value, wherein the second voltage adjustment instruction includes the magnitude of the precision of the amplitude of the square wave signal.
Specifically, as shown in fig. 3a, after the control chip 101 is powered on, the control chip 101 sends a first voltage adjustment instruction to the DAC _ a102 and a second voltage adjustment instruction to the DAC _ B103, the DAC _ a102 receives the first voltage adjustment instruction, controls the DAC _ B output voltage value based on the second voltage adjustment instruction and the DAC _ B103 receives the second voltage adjustment instruction, controls the DAC _ B output voltage value based on the second voltage adjustment instruction, adjusts the DAC _ a reference voltage value by the DAC _ B output voltage value, so that the precision of the DAC _ a output signal corresponds to the adjusted DAC _ a reference voltage value, and obtains the DAC _ a output signal with the precision and the amplitude meeting the requirements by controlling the DAC _ a102 and the DAC _ B103 output voltage values.
Then, amplifying the DAC _ a output signal by the driving circuit 106 to obtain an amplified output signal, such as a periodic pulse signal shown in fig. 3b, where the control chip 101 determines the level of the generated periodic pulse signal, and when the periodic pulse signal is at a low level, controls the switch 104 to be connected to ground; when the periodic pulse signal is at a high level, controlling the switch 104 to be connected with the push circuit 106; the switch 104 is controlled to switch between connecting ground and connecting the push circuit 106 according to the periodic pulse signal, so that a square wave signal as shown in fig. 3c is generated.
It should be understood that the control chip 101 may be an editable logic gate array FPGA, or other programmable chips, as long as it can control the digital-to-analog conversion chip and the switch in the square wave signal generator, all the present invention is in the protection scope, and is not limited herein.
The utility model provides a square wave signal generator, if when adjusting the square wave signal's that generates precision according to the actual demand of product, this square wave signal generator passes through control chip with DAC _ A with DAC _ B connects, controls DAC _ A with DAC _ B's output voltage, and through control DAC _ B output voltage value corresponds the adjustment DAC _ A reference voltage value, makes DAC _ A output signal's precision corresponds with DAC _ A reference voltage value after the adjustment. Therefore, the output voltage of the DAC _ A and the output voltage of the DAC _ B are controlled through the control chip, so that the amplitude value of the square wave signal generated by the square wave signal generator can be controlled, and the precision of the square wave signal can be accurately controlled.
Further, for the purpose of improving the quality of the generated square wave signal. The switch 104 is a high speed switch. The speed at which the high speed switch switches between grounding and connecting the push circuit 106 is greater than a first threshold; the internal resistance of the high-speed switch is smaller than a second threshold value; the noise figure of the high speed switch is less than a third threshold.
The utility model provides a square wave signal generator, switch 104 has at ground connection and connection the speed of switching between the push circuit 106 is greater than first threshold value, and the internal resistance is less than the second threshold value and noise figure is less than the third threshold value, avoids control chip 101 control switch 104 is at ground connection and connection switching time overlength between the push circuit 106 leads to the hopping of the square wave signal of generation along the longer problem of time, has improved the quality of the square wave signal of generation.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims and their equivalents, the present invention is also intended to include such modifications and variations.