Disclosure of Invention
To the problem among the prior art, the application provides a pulse generator based on C51 singlechip, can be fast, accurate and convenient the trigger pulse of production different grade type to can realize frequency modulation, transfer duty cycle, amplitude modulation's control to the signal.
In order to solve the technical problem, the application provides the following technical scheme:
in a first aspect, the present application provides a pulse generator based on a C51 singlechip, including: the key module comprises a control core unit, a crystal oscillator clock signal unit and a key module which are connected with a signal input end of the control core unit, and a signal conversion unit which is connected with a signal output end of the control core unit;
the key module is used for sending a pulse modulation instruction to the control core unit according to the key operation of a user;
the control core unit is used for modulating a pulse digital signal according to the received pulse modulation instruction and a reference clock signal sent by the crystal oscillator clock signal unit to obtain a modulated pulse digital signal;
the signal conversion unit is used for converting the pulse digital signal sent by the control core unit into a pulse analog signal.
The pulse analog signal processing device further comprises a two-stage amplification operation unit connected with the signal output end of the signal conversion unit, and the two-stage amplification operation unit is used for performing signal amplification processing on the pulse analog signal sent by the signal conversion unit.
The pulse analog signal processing circuit further comprises a variable resistor connected with a signal output end of the two-stage amplification operation unit, wherein the variable resistor is used for carrying out signal amplitude adjustment on the pulse analog signal subjected to the signal amplification processing.
Further, the pulse modulation instruction sent by the key module includes at least one of a pulse switching instruction, a pulse frequency increasing instruction, a pulse frequency reducing instruction, a pulse duty ratio increasing instruction and a pulse duty ratio decreasing instruction.
Further, the control core unit is a C51 singlechip.
Further, the crystal oscillator clock signal unit comprises a crystal oscillator circuit.
Further, the crystal oscillator clock signal unit further comprises a reset circuit.
Further, the signal conversion unit is a DAC0832 conversion chip.
According to the technical scheme, the pulse generator based on the C51 single chip microcomputer is used for modulating pulse digital signals generated by the crystal oscillator clock signal unit by receiving various pulse modulation instructions sent by the key module, so that different types of trigger pulses can be generated quickly, accurately and conveniently, and the control of frequency modulation, duty ratio modulation and amplitude modulation can be realized on the signals.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In consideration of the problems that in the prior art, most programmable devices such as an FPGA (CPLD) or a DSP (digital signal processor) are adopted to realize signal generation, the price of the devices is relatively high, and often, the signal generation device only generates specific signals to meet the requirements of the specific working conditions, so that the waste of resources is caused. In order to be able to generate different types of trigger pulses quickly, accurately and conveniently and to realize control of frequency modulation, duty cycle modulation and amplitude modulation on signals, the present application provides an embodiment of a pulse generator based on a C51 single chip microcomputer, referring to fig. 1, in this embodiment, the pulse generator based on the C51 single chip microcomputer specifically includes a control core unit 10, a crystal clock signal unit 20 and a key module 30 connected to a signal input end of the control core unit 10, and a signal conversion unit 40 connected to a signal output end of the control core unit 10;
the key module 30 is configured to send a pulse modulation instruction to the control core unit 10 according to a key operation of a user;
the control core unit 10 is configured to modulate a pulse digital signal according to the received pulse modulation instruction and the reference clock signal sent by the crystal oscillator clock signal unit 20, so as to obtain a modulated pulse digital signal;
it can be understood that the crystal oscillator circuit in the crystal oscillator clock signal unit 20 provides a reference clock signal for the control core unit 10 (for example, a C51 single chip microcomputer), the single chip microcomputer carries a program therein, the state of the external key is constantly refreshed and judged, and when the detected corresponding key is pressed, the corresponding program code is activated to implement the corresponding function.
The signal conversion unit 40 is configured to convert the pulse digital signal sent by the control core unit 10 into a pulse analog signal.
Optionally, the control core unit 10 may be a C51 single chip microcomputer, wherein the C51 single chip microcomputer is a generic name of a single chip microcomputer compatible with an intel 8051 instruction system, and the C51 single chip microcomputer is widely applied to household appliances, automobiles, industrial measurement and control, and communication equipment.
Optionally, a C51 single chip microcomputer is used as a control core device, and a crystal oscillator clock signal unit 20 is built at the periphery, so that a single chip microcomputer minimum system can be formed.
Optionally, referring to fig. 2, the signal input end of the C51 single chip microcomputer of the present application is further connected to a key module 30, and is respectively provided with a corresponding opening, so as to receive a pulse modulation instruction triggered when a user performs a key operation, and accordingly perform signal modulation operations such as switching, frequency increasing, frequency decreasing, duty ratio increasing, duty ratio decreasing, and the like on a pulse signal generated by the crystal oscillator clock signal unit 20.
Optionally, the pulse modulation instruction sent by the key module 30 includes at least one of a pulse switching instruction, a pulse frequency increasing instruction, a pulse frequency decreasing instruction, a pulse duty ratio increasing instruction, and a pulse duty ratio decreasing instruction.
In some possible embodiments of the present application, the signal conversion unit 40 connected to the signal output terminal of the control core unit 10 may be a DAC0832 conversion chip, and referring to fig. 3, the 8-way digital quantity signal at the signal output terminal of the control core unit 10 is connected to the DAC0832 conversion chip, so as to convert the pulse digital signal generated by the C51 single chip microcomputer into a pulse analog signal.
In some possible embodiments of the present application, referring to fig. 3, the signal output terminal of the signal conversion unit 40 may further be connected to a two-stage amplification operation unit 50 (i.e., a two-stage amplification operation circuit), where the two-stage amplification operation unit 50 is configured to perform signal amplification processing on the pulse analog signal sent by the signal conversion unit 40.
In some possible embodiments of the present application, referring to fig. 3, the signal output terminal of the two-stage amplification operation unit 50 is connected to a variable resistor, and the variable resistor is used for performing signal amplitude adjustment on the pulse analog signal after the signal amplification processing.
As can be seen from the above description, according to the pulse generator based on the C51 single chip microcomputer provided in the embodiment of the present application, the control core unit 10 modulates the pulse digital signal generated by the crystal oscillator clock signal unit 20 by receiving various pulse modulation instructions sent by the key module 30, so that different types of trigger pulses can be generated quickly, accurately and conveniently, and the frequency modulation, the duty cycle modulation, and the amplitude modulation of the signal can be controlled.
As a preferred embodiment, the crystal oscillator clock signal unit 20 includes a crystal oscillator circuit and a reset circuit, where the crystal oscillator circuit is configured to provide a clock signal to the single chip, and the reset circuit is configured to clear a program counter of the single chip.
The above description is only an exemplary embodiment of the present invention, and is not intended to limit the scope of the present invention. Any equivalent changes and modifications that can be made by one skilled in the art without departing from the spirit and principles of the invention should fall within the protection scope of the invention.