I was working on the problem for nearly a week; some phased progress has been acquired, for the entire waveform is already generated when I set the waveformsize twice
of the real length of the sequence generating the wave, but there are still some zero- points are interpolated between the real points, making the while wave looks like the pictures I attached.
Is it an oversampling problem, and how can I avoid these unwelcomed zero-points? From my point of view, I don’t believe that the problem lies in the impropriate time interval because as the code you sent to me:
- Code: Select all
delta = ((frequency * arbitrarywavesize) / 4096) * 4294967296# * 0.00000002
If the frequency is set 50Hz, according to Shannon sampling theorem, the sampling rate could be just set as 100Hz, which means that a time interval of 0.01 second is enough, while the actual time resolution is much higher than 0.01s, there must be some unwelcomed zero points was interpolated between the useful points generated by the sequence in waveform buffer.
I have done a serial of experiments, the frequency was respectively 50Hz, 100Hz, 1000Hz, and 10000Hz. The results are attached.