Medium Frequency R2R Sine Wave Generator 1.25 Mhz

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2013-04-11 | updated: 2013-04-11


This object generates a Medium Frequency Sine Wave into an R2R network using a "DDS precalculation" technique.

The cosine wave has N=16 steps, each step takes 4CLK for a max sine output of 1.25MHz@80MHz (1.56MHz@100MHz CLK)

The secret is to offset the steps by half a step in the time domain, eg for N=16, don't use 0,22.5,45 degrees but 11.25, 33.75, 56.25 degrees etc such that two successive samples near the peak have the same output value. Then instead of outputting the second identical sample, JMP to the start of the loop and repeat.The JMP and Output (MOV OUTA, SampleValue) both use 4 CLKs.


Original File Upload
Binary Data Medium_Frequency_R2R_Sine_Wave_Generator_1.25_Mhz_v01.spin5.13 KB


how get the values for other sineswaves? , for example for a sinewave  of 16 bits and more steps