CN114050810A - PWM waveform generation method, device, embedded equipment and storage medium - Google Patents
PWM waveform generation method, device, embedded equipment and storage medium Download PDFInfo
- Publication number
- CN114050810A CN114050810A CN202210035148.3A CN202210035148A CN114050810A CN 114050810 A CN114050810 A CN 114050810A CN 202210035148 A CN202210035148 A CN 202210035148A CN 114050810 A CN114050810 A CN 114050810A
- Authority
- CN
- China
- Prior art keywords
- data
- target
- serial peripheral
- peripheral interface
- pwm wave
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000002093 peripheral effect Effects 0.000 claims abstract description 78
- 230000008901 benefit Effects 0.000 abstract description 4
- 238000004891 communication Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K7/00—Modulating pulses with a continuously-variable modulating signal
- H03K7/08—Duration or width modulation ; Duty cycle modulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/02—Digital function generators
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
Abstract
The invention discloses a PWM waveform generation method, which is applied to embedded equipment comprising a serial peripheral interface and comprises the following steps: receiving data to be sent; generating a target PWM wave based on data to be transmitted by using a serial peripheral interface; and sending the target PWM wave to the external equipment corresponding to the data to be sent. The invention also discloses a PWM waveform generating device, an embedded device and a computer readable storage medium. By using the method of the invention, the embedded equipment does not need to be provided with a waveform generating device any more, and can also generate the target PWM wave, thereby saving the setting cost of the waveform generating device and improving the economic benefit of the embedded equipment.
Description
Technical Field
The present invention relates to the field of waveform processing technologies, and in particular, to a PWM waveform generation method, apparatus, embedded device, and computer-readable storage medium.
Background
Currently, in embedded devices, a dedicated waveform generating device is used to generate PWM waveforms. However, this makes the cost of generating the PWM waveform high.
Disclosure of Invention
The invention mainly aims to provide a PWM waveform generation method, a device, an embedded device and a computer readable storage medium, aiming at solving the technical problem of high cost of generating PWM waveforms in the prior art.
In order to achieve the above object, the present invention provides a PWM waveform generating method applied to an embedded device including a serial peripheral interface, the method including:
receiving data to be sent;
generating a target PWM wave based on data to be transmitted by using a serial peripheral interface;
and sending the target PWM wave to the external equipment corresponding to the data to be sent.
In addition, to achieve the above object, the present invention further provides a PWM waveform generating apparatus, including:
the receiving module is used for receiving data to be sent;
the generating module is used for generating a target PWM wave based on data to be sent by utilizing the serial peripheral interface;
and the transmitting module is used for transmitting the target PWM wave to the external equipment corresponding to the data to be transmitted.
In addition, in order to achieve the above object, the present invention further provides an embedded device, including: the system comprises a serial peripheral interface, a memory, a processor and a PWM waveform generation program which is stored in the memory and can run on the processor, wherein the processor executes the PWM waveform generation program to realize the steps in the PWM waveform generation method.
Further, to achieve the above object, the present invention also proposes a computer-readable storage medium having stored thereon a PWM waveform generation program which, when executed by a processor, realizes the steps in the PWM waveform generation method according to any one of the above.
The technical scheme of the invention provides a PWM waveform generation method, which is applied to embedded equipment comprising a serial peripheral interface and comprises the following steps: receiving data to be sent; generating a target PWM wave based on data to be transmitted by using a serial peripheral interface; and sending the target PWM wave to the external equipment corresponding to the data to be sent. Because the existing embedded equipment needs to be specially provided with a waveform generating device to generate the target PWM wave, the embedded equipment has more cost for the waveform generating device. In the invention, the embedded equipment generates the target PWM wave by using the ubiquitous serial peripheral interface, and a waveform generating device is not required to be arranged, so that the arrangement cost of the waveform generating device is saved, and the economic benefit of the embedded equipment is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an embedded device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a PWM waveform generating method according to a first embodiment of the present invention;
FIG. 3 is a graph comparing a target PWM wave and a clock wave according to the present invention;
fig. 4 is a block diagram of a PWM waveform generating apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embedded device in a hardware operating environment according to an embodiment of the present invention.
Generally, an embedded device includes: a serial peripheral interface 307, at least one processor 301, a memory 302, and a PWM waveform generation program stored on the memory and executable on the processor, the PWM waveform generation program configured to implement the steps of the PWM waveform generation method as before.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. The processor 301 may further include an AI (Artificial Intelligence) processor for processing operations related to the PWM waveform generation method so that the PWM waveform generation method model can be learned by self-training, improving efficiency and accuracy.
In some embodiments, the terminal may further include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of embedded devices and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, on which a PWM waveform generation program is stored, and the PWM waveform generation program, when executed by a processor, implements the steps of the PWM waveform generation method as above. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. It is determined that the program instructions may be deployed to be executed on one embedded device or on multiple embedded devices located at one site or distributed across multiple sites and interconnected by a communication network, as examples.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The computer-readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Based on the above hardware structure, an embodiment of the PWM waveform generation method of the present invention is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a PWM waveform generation method according to a first embodiment of the present invention, where the method is applied to an embedded device including a serial peripheral interface, and the method includes:
step S11: the embedded device receives data to be sent.
It should be noted that the execution main body of the present invention is an embedded device, and the structure of the embedded device refers to the above description, which is not described herein again. The embedded equipment is provided with a PWM waveform generating program, and the steps of the PWM waveform generating method are realized when the embedded equipment executes the PWM waveform generating program.
In the invention, the data to be sent can be any form of data to be sent, the data to be sent is used for data executed or received by external equipment, and the external equipment can be an RGB lamp, a stepping motor, an infrared remote control transmitter and the like. The data to be transmitted may be transmitted by the user.
Furthermore, the embedded device also comprises a main chip, and the main chip is provided with a serial peripheral interface; the embedded device receives data to be sent, and the method comprises the following steps: the embedded device receives data to be sent by using the main chip.
It is understood that the embedded device usually includes a main chip, such as a Central Processing Unit (CPU), and the serial peripheral interface is built in the main chip, that is, the serial peripheral interface is built in the embedded device, and there is no need to additionally provide the serial peripheral interface.
Step S12: the embedded device generates a target PWM wave based on data to be transmitted by using a serial peripheral interface.
Step S13: and the embedded equipment sends the target PWM wave to the external equipment corresponding to the data to be sent.
After receiving the data to be sent, the embedded device needs to convert the data to be sent into a form of a PWM wave, i.e., a target PWM wave, and then sends the target PWM wave to the external device. Generally, the data to be transmitted has an equipment identifier of the external equipment, and the target PWM wave is transmitted to the corresponding external equipment through the equipment identifier in the data to be transmitted.
In specific application, the main chip receives data to be sent, then the main chip sends the data to be sent to the serial peripheral interface, and the serial peripheral interface generates a target PWM wave based on the data to be sent.
Furthermore, the embedded equipment also comprises a host output and slave input interface, and the external equipment is embedded into the embedded equipment through the host output and slave input interface; the embedded device sends the target PWM wave to the external device corresponding to the data to be sent, and the method comprises the following steps: and the embedded equipment outputs the slave input interface through the host machine and sends the target PWM wave to the external equipment corresponding to the data to be sent.
The Master Output Slave Input interface is an mosi (Master Output Slave Input) corresponding to the Master Input Slave Output interface (MISO-Master Input Slave Output), and the embedded device needs to transmit the target PWM wave to the external device corresponding to the data to be transmitted through the Master Output Slave Input interface. For example, the master chip transmits the light control waveform to the RGB lamp through the master output slave input interface, so that the RGB lamp outputs the corresponding light by using the light control waveform.
Further, before the embedded device generates the target PWM wave based on the data to be transmitted by using the serial peripheral interface, the method further includes:
the embedded device receives a target duty ratio;
the embedded equipment utilizes a serial peripheral interface to generate a target PWM wave based on data to be sent, and the method comprises the following steps:
the embedded device generates a target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
In some embodiments, the data to be transmitted is further modulated by using a duty ratio to obtain a target PWM wave, where the duty ratio for modulating the data to be transmitted is the target duty ratio. The target PWM wave has a corresponding target duty cycle in addition to content corresponding to the data to be transmitted. The target duty cycle may be user transmitted.
Further, before the embedded device generates the target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface, the method further includes:
the embedded device receives a first frequency;
the embedded equipment utilizes the serial peripheral interface to generate a target PWM wave based on data to be sent and a target duty ratio, and the method comprises the following steps:
the embedded device generates a target PWM wave with a first frequency based on data to be transmitted and a target duty ratio by using a serial peripheral interface.
In some embodiments, the frequency of the target PWM wave may be set based on the requirement of the user, and the user may transmit the corresponding first frequency based on the requirement, so that the obtained target PWM wave is also the first frequency.
Further, before the embedded device generates the target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface, the method further includes:
the embedded equipment receives frequency division and multiplication information, wherein the frequency division and multiplication information comprises frequency division information or frequency multiplication information of the clock frequency of the serial peripheral interface;
the embedded equipment determines a second frequency by using frequency division and multiplication information and the clock frequency of the serial peripheral interface;
the embedded equipment utilizes the serial peripheral interface to generate a target PWM wave based on data to be sent and a target duty ratio, and the method comprises the following steps:
and the embedded equipment generates a target PWM wave with a second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
In other embodiments, the user may directly send the required frequency division and multiplication information (e.g., frequency division by 4, frequency halving, frequency doubling, etc.), and the embedded device obtains the corresponding second frequency based on the frequency division and multiplication information and with reference to the clock frequency of the serial peripheral interface, so as to obtain the target PWM wave with the frequency being the second frequency. It can be understood that, at this time, the user does not need to send frequency information, and the obtained target PWM wave is obtained by frequency division and multiplication information.
Referring to fig. 3, fig. 3 is a comparison graph of a target PWM wave of the present invention and a clock wave, wherein the frequency of the target PWM wave is 4 times the clock frequency of the clock waveform. Generally, when the target PWM wave is 00001111, a PWM wave of 4-division (with reference to the clock frequency) can be output, and similarly, when the target PWM wave is 01010101, a PWM wave of the same frequency (with reference to the clock frequency) can be output.
Further, before the embedded device generates the target PWM wave with the second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface, the method further includes:
the embedded equipment receives a control code of the serial peripheral interface;
the embedded equipment utilizes the serial peripheral interface to generate a target PWM wave with a second frequency based on data to be sent and a target duty ratio, and the method comprises the following steps:
and the embedded equipment loads a control code, and generates a target PWM wave with a second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
Correspondingly, before the embedded device generates the target PWM wave with the first frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface, the method further includes:
the embedded equipment receives a control code of the serial peripheral interface;
the embedded device utilizes the serial peripheral interface to generate a target PWM wave with a first frequency based on data to be transmitted and a target duty ratio, and the method comprises the following steps:
the embedded equipment loads a control code, and generates a target PWM wave with a first frequency based on data to be sent and a target duty ratio by using the serial peripheral interface.
The embedded equipment controls the serial peripheral interface to execute the step of generating the target PWM wave through the control code, the created control code can be a code which can be identified by any main chip, and the main chip of the embedded equipment controls the serial peripheral interface to execute the step of generating the target PWM wave by utilizing the control code.
The technical scheme of the invention provides a PWM waveform generation method, which is applied to embedded equipment comprising a serial peripheral interface and comprises the following steps: receiving data to be sent; generating a target PWM wave based on data to be transmitted by using a serial peripheral interface; and sending the target PWM wave to the external equipment corresponding to the data to be sent. Because the existing embedded equipment needs to be specially provided with a waveform generating device to generate the target PWM wave, the embedded equipment has more cost for the waveform generating device. In the invention, the embedded equipment generates the target PWM wave by using the ubiquitous serial peripheral interface, and a waveform generating device is not required to be arranged, so that the arrangement cost of the waveform generating device is saved, and the economic benefit of the embedded equipment is improved.
At present, the clock frequency of a Serial Peripheral Interface (SPI) is basically MHZ, even close to hundred MHZ, and the generated PWM waveform is microsecond level, even nanosecond level, which makes the accuracy of the obtained target PWM wave extremely high.
In addition, a target PWM wave is generated by using a serial peripheral interface, the duty ratio and the frequency are programmable, the effect of saving the device cost of the intermediate waveform generator is achieved, and the single board saves 2-3 yuan of cost; aiming at different frequencies of a main control device of the embedded equipment, only corresponding software needs to be upgraded to refresh SPI control logic, and hardware compatibility is stronger.
Referring to fig. 4, fig. 4 is a block diagram of a first embodiment of the PWM waveform generation apparatus according to the present invention, and based on the same inventive concept as the previous embodiment, the apparatus includes:
a receiving module 10, configured to receive data to be sent;
a generating module 20, configured to generate a target PWM wave based on data to be sent by using a serial peripheral interface;
and the sending module 30 is configured to send the target PWM wave to the external device corresponding to the data to be sent.
Further, the generating module 20 is configured to receive the target duty cycle; and generating a target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
Further, the generating module 20 is configured to receive a first frequency; and generating a target PWM wave with a first frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
Further, the generating module 20 is configured to receive frequency division and multiplication information, where the frequency division and multiplication information includes frequency division information or frequency multiplication information of a clock frequency of the serial peripheral interface; determining a second frequency by using frequency division and multiplication information and the clock frequency of the serial peripheral interface; and generating a target PWM wave with a second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
Further, the generating module 20 is configured to receive a control code of the serial peripheral interface; and loading a control code, and generating a target PWM wave with the frequency of the second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
Furthermore, the embedded equipment also comprises a host output and slave input interface, and the external equipment is embedded into the embedded equipment through the host output and slave input interface; and the sending module 30 is configured to send the target PWM wave to the external device corresponding to the data to be sent through the master output slave input interface.
Furthermore, the embedded device also comprises a main chip, and the main chip is provided with a serial peripheral interface; the receiving module 10 is configured to receive data to be sent by using a main chip.
It should be noted that, since the steps executed by the apparatus of this embodiment are the same as the steps of the foregoing method embodiment, the specific implementation and the achievable technical effects thereof can refer to the foregoing embodiment, and are not described herein again.
The above description is only an alternative embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A PWM waveform generation method is applied to an embedded device comprising a serial peripheral interface, and comprises the following steps:
receiving data to be sent;
generating a target PWM wave based on the data to be transmitted by using the serial peripheral interface;
and sending the target PWM wave to external equipment corresponding to the data to be sent.
2. The method of claim 1, wherein prior to generating a target PWM wave based on the data to be transmitted using the serial peripheral interface, the method further comprises:
receiving a target duty cycle;
the generating a target PWM wave based on the data to be transmitted by using the serial peripheral interface includes:
and generating a target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
3. The method of claim 2, wherein prior to generating a target PWM wave based on the data to be transmitted and the target duty cycle using the serial peripheral interface, the method further comprises:
receiving a first frequency;
the generating a target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface includes:
and generating a target PWM wave with the first frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
4. The method of claim 2, wherein prior to generating a target PWM wave based on the data to be transmitted and the target duty cycle using the serial peripheral interface, the method further comprises:
receiving frequency division and multiplication information, wherein the frequency division and multiplication information comprises frequency division information or frequency multiplication information of the clock frequency of the serial peripheral interface;
determining a second frequency by using the frequency division and multiplication information and the clock frequency of the serial peripheral interface;
the generating a target PWM wave based on the data to be transmitted and the target duty ratio by using the serial peripheral interface includes:
and generating a target PWM wave with the frequency of the second frequency based on the data to be transmitted and the target duty ratio by using the serial peripheral interface.
5. The method of claim 4, wherein prior to generating, with the serial peripheral interface, a target PWM wave having a frequency of the second frequency based on the data to be transmitted and the target duty cycle, the method further comprises:
receiving a control code of the serial peripheral interface;
the generating, by using the serial peripheral interface, a target PWM wave having a frequency of the second frequency based on the data to be transmitted and the target duty ratio includes:
and loading the control code, and generating a target PWM wave with the frequency of the second frequency by using the serial peripheral interface based on the data to be transmitted and the target duty ratio.
6. The method of any of claims 1-5, wherein the embedded device further comprises a master-output-slave-input interface, the external device being embedded in the embedded device through the master-output-slave-input interface; the sending the target PWM wave to the external device corresponding to the data to be sent comprises:
and transmitting the target PWM wave to external equipment corresponding to the data to be transmitted through the host output slave input interface.
7. The method of any of claims 1-5, wherein the embedded device further comprises a master chip, the master chip being provided with the serial peripheral interface; the receiving data to be transmitted includes:
and receiving data to be sent by utilizing the main chip.
8. A PWM waveform generation apparatus, comprising:
the receiving module is used for receiving data to be sent;
the generating module is used for generating a target PWM wave based on the data to be sent by utilizing the serial peripheral interface;
and the transmitting module is used for transmitting the target PWM wave to the external equipment corresponding to the data to be transmitted.
9. An embedded device, comprising a serial peripheral interface, a memory, a processor, and a PWM waveform generation program stored in the memory and executable on the processor, the processor executing the PWM waveform generation program to implement the steps in the PWM waveform generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a PWM waveform generation program is stored thereon, which when executed by a processor, implements the steps in the PWM waveform generation method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210035148.3A CN114050810A (en) | 2022-01-13 | 2022-01-13 | PWM waveform generation method, device, embedded equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210035148.3A CN114050810A (en) | 2022-01-13 | 2022-01-13 | PWM waveform generation method, device, embedded equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114050810A true CN114050810A (en) | 2022-02-15 |
Family
ID=80196483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210035148.3A Pending CN114050810A (en) | 2022-01-13 | 2022-01-13 | PWM waveform generation method, device, embedded equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114050810A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201708773U (en) * | 2010-05-28 | 2011-01-12 | 深圳职业技术学院 | Arbitrarywaveform generator |
CN103870421A (en) * | 2012-12-10 | 2014-06-18 | 上海工程技术大学 | FPGA (Field Programmable Gate Array) based serial interface and PWM (Pulse Width Modulation) combined application IP (Intellectual Property) core |
CN104935304A (en) * | 2015-06-02 | 2015-09-23 | 电子科技大学 | Broadband repetition arbitrary waveform generator and generation method |
CN106132000A (en) * | 2016-06-27 | 2016-11-16 | 汕头大学 | A kind of digital radio LED light source controller |
CN213399259U (en) * | 2020-11-11 | 2021-06-08 | 西安羚控电子科技有限公司 | STM 32-based PWM output system |
-
2022
- 2022-01-13 CN CN202210035148.3A patent/CN114050810A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201708773U (en) * | 2010-05-28 | 2011-01-12 | 深圳职业技术学院 | Arbitrarywaveform generator |
CN103870421A (en) * | 2012-12-10 | 2014-06-18 | 上海工程技术大学 | FPGA (Field Programmable Gate Array) based serial interface and PWM (Pulse Width Modulation) combined application IP (Intellectual Property) core |
CN104935304A (en) * | 2015-06-02 | 2015-09-23 | 电子科技大学 | Broadband repetition arbitrary waveform generator and generation method |
CN106132000A (en) * | 2016-06-27 | 2016-11-16 | 汕头大学 | A kind of digital radio LED light source controller |
CN213399259U (en) * | 2020-11-11 | 2021-06-08 | 西安羚控电子科技有限公司 | STM 32-based PWM output system |
Non-Patent Citations (1)
Title |
---|
QQQAAA1980: "基于串行通信控制的PWM脉冲发生***", 《HTTPS://WWW.DOCIN.COM/P-623780458.HTML&ISPAY=1》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111142711A (en) | Firmware configuration method and device, storage medium and mobile terminal | |
CN112883036B (en) | Index creation method, device, storage server and storage medium | |
CN112351097A (en) | Device control method, device, sending end and storage medium | |
CN112689172A (en) | Program playing method and device, set top box and storage medium | |
WO2022135060A1 (en) | Terminal device, nfc clock control method, nfc module, and medium | |
JP2023516259A (en) | DISPLAY DEVICE DRIVING METHOD, DISPLAY DEVICE, AND COMPUTER-READABLE STORAGE MEDIUM | |
CN112612526A (en) | Application program control method and device, terminal device and storage medium | |
CN113867758A (en) | Unmanned aerial vehicle automatic upgrading method and device, unmanned aerial vehicle, remote control terminal and storage medium | |
CN112583907A (en) | Connection method and device, smart home equipment and computer readable storage medium | |
CN114050810A (en) | PWM waveform generation method, device, embedded equipment and storage medium | |
CN113543104B (en) | Bluetooth communication method, multimedia device and storage medium | |
CN113225234B (en) | Asset detection method, device, terminal equipment and computer readable storage medium | |
CN112350895B (en) | Keep-alive method and device for application program, equipment and computer readable storage medium | |
CN112925744A (en) | Method and device for modifying flash package, terminal equipment and storage medium | |
CN114968853B (en) | Power chip management method, system and electronic equipment | |
CN112346885A (en) | Electronic device control method, device, equipment and computer readable storage medium | |
CN114594965A (en) | Application software installation method and device, terminal equipment and storage medium | |
WO2022127546A1 (en) | Gateway service processing method, gateway, receiving terminal, gateway service processing system, and storage medium | |
CN113821252A (en) | Method and device for constructing small program, terminal device and storage medium | |
CN114385077A (en) | FPGA signal modulation and demodulation dynamic reconstruction method, device, system and storage medium | |
CN112612593A (en) | Bluetooth control method, device, terminal equipment and computer readable storage medium | |
CN112532971A (en) | Image processing method, image processing device, display terminal and computer readable storage medium | |
CN114546865A (en) | Order attribution information obtaining method and device, debugging equipment and storage medium | |
CN113535132B (en) | Equipment access method, device, terminal equipment and storage medium | |
CN113791734A (en) | Encoder reading acquisition method and device, servo system and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220215 |