Commit Graph

17 Commits

Author SHA1 Message Date
Jake-B a581404e04 - Fixed a few problems with Arduino Zero support
- Added a 10-bit sine table, probably wasteful considering its stored in 16-bit integers.
- Added "DDS_MAX_COMPARATOR" and "DDS_MAX_ACCUMULATOR" macros to hide some math and imrpove readability.
- Simplified calcFrequency and made it work for arbirary frequencies (with/without default refclk)
- Simplified getDutyCycle().  I think its more understandable now, and works for various combinations of accumulator size and lookup table size.

Tested on both an Arduino Zero and an Arduino UNO.  Seems to work, but YMMV.
2015-08-17 17:26:33 -04:00
Jake-B fdaa602401 Very rough draft of DDS supporting the Arduio Zero and it's built-in DAC. 2015-08-16 20:17:36 -04:00
Stephen Olesen 4f1c863487 Default refclk now 9600, remove old table and serial debugging. 2015-07-13 18:50:48 -06:00
Stephen Olesen 9bcf52ec64 Update large DDS sine table to use signed integers. 2015-07-05 16:29:27 -06:00
Stephen Olesen 7131e46ff0 Allow refclkOffset to be set on the fly in DDS and the calibration tool. 2015-07-04 18:31:18 -06:00
Stephen Olesen 4af33167a0 Added Crystal Calibration sketch with simple Serial UI. Fixed ddsAccumulator_t type. 2015-07-04 14:13:45 -06:00
Stephen Olesen acc4aebe03 Add calculators for frequency steps. Accumulator has a typedef now. Optimize tick. 2015-07-03 15:23:39 -06:00
Stephen Olesen 7db28bff0e Change DDS to using signed integers to try to keep our DC bias averaged out. 2015-07-02 19:30:53 -06:00
Stephen Olesen 2152100873 Change amplitude scaling. Go back to refclk for ICR1. Added phase changes. 2015-07-02 18:04:12 -06:00
Stephen Olesen 429e645ad2 Example for AFSK sending (AX25 format) added. DDS updated to a slower clock rate again. 2015-07-01 20:30:49 -06:00
Stephen Olesen 660fe0c602 Corrected the duration calculation on fixed DDS length. 2015-07-01 18:05:17 -06:00
Stephen Olesen 120442533d Added DDS sample. Fixed pin 11 PWM output, now default (3 works better). 2015-07-01 17:56:40 -06:00
Stephen Olesen 016ad2398a Added a define to use pin 3 for PWM, instead of the new default pin 11. 2015-07-01 15:01:55 -06:00
Stephen Olesen 8f2115adbc Add some comments. 2015-07-01 14:54:22 -06:00
Stephen Olesen 2f4d17e4ed Fixed up the duration timers, clockTick needs a cleanup. 2015-07-01 14:42:20 -06:00
Stephen Olesen 31eb465ebf Allow for high idle duty cycle when output is 'off', amplitude adjustments. 2015-07-01 14:27:10 -06:00
Stephen Olesen 1117542411 Created generic DDS class for tone generation, update AFSK to start the right timers. 2015-07-01 14:04:20 -06:00