Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for generating sine wave

A technology of generating device and sine wave, applied in the direction of digital function generator, etc., can solve the problem of impossible realization, and achieve the effect of high-speed generation and simple structure

Inactive Publication Date: 2019-09-17
深圳市科陆精密仪器有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Therefore, it is impossible to realize the synthetic output of a large number of discrete points only by setting the chip select of SPI through the timer interrupt software of the microcontroller unit.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for generating sine wave
  • Method and device for generating sine wave
  • Method and device for generating sine wave

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0042] Such as figure 1 As shown, in one embodiment, a flow chart of a method for generating a sine wave is provided, the method comprising:

[0043] S100: Calculate the time interval between any two adjacent discrete points according to the preset number of discrete points and the frequency of the digital signal, and set the time interval as a timer count value of the micro control unit.

[0044] Among them, the generation of a sine wave is usua...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a sine wave generating method. The method comprises: according to a preset discrete point quantity and data signal frequency, a time interval between any two adjacent discrete points is calculated and set as a timer counting value of a micro-control unit; according to the timer counting value, each time interval generates a corresponding DMA request, and the data of the corresponding discrete point is transmitted to an SPI data register of the micro-control unit; discrete waveform data in the SPI data register is transmitted to an external digital-to-analog converter connected with an SPI and continuous waveform data is generated; when the quantity of the discrete point data transmitted to the SPI data register reaches the preset discrete point quantity, a corresponding sine wave is generated and a DMA interruption request is generated. The method solves the problem that only interruption of a timer of a micro-control unit cannot realize synthetic output of a large amount of discrete points, and the method achieves quick generation of a sine wave. Besides, the invention also relates to a sine wave generating device.

Description

technical field [0001] The invention relates to the field of waveform generation, in particular to a sine wave generation method and device. Background technique [0002] Usually, a dedicated FPGA chip is used for the signal generation of the power frequency sine wave. With the rapid development of chip technology, the resources of the chip are becoming more and more abundant, and it is possible to realize the generation of the sine wave through a single micro-control unit. [0003] The generation of a sine wave is usually to discretize a y=sin(ωt+θ) function at N points, and then output the discretized N point digital quantities to a digital-to-analog converter to convert the digital signal into an analog signal to realize Sine wave signal generation. The more digits the digital-to-analog converter has, the closer the generated sine wave is to the ideal signal. A 16-bit digital-to-analog converter supports N=2 16 = Discretization of 65536-point waveform. Such a sine wave...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F1/03
Inventor 曾春山
Owner 深圳市科陆精密仪器有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products