Commit Graph
3 Commits
Author SHA1 Message Date
Jake-B 11f5e8b733 Updated examples/DDS/DDS.ino to include the ISRs for the Arduino Zero.
NOTE: this sample won't really work for the HamShield ont he Ardiuno Zero as it will
Besides the logic voltage issue, it will be playing its tones out of AO, rather
than D3 or D11.  Hook up your oscilloscope to A0 to see the waveform.
2015-08-18 08:44:11 -04:00
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