summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Geldenhuis <none@none>2012-02-10 17:05:52 +1300
committerAndre Geldenhuis <none@none>2012-02-10 17:05:52 +1300
commit2916a76d06afcf0d5595e58567a7c8ed7ce90676 (patch)
treeec476fa9b1fdd3d50f789424c2f473e15b8d20db
parent89a893dae5ddaa7ddf287c6944ee26496d9bc8e8 (diff)
downloadDDS-2916a76d06afcf0d5595e58567a7c8ed7ce90676.tar.gz
DDS-2916a76d06afcf0d5595e58567a7c8ed7ce90676.tar.bz2
DDS-2916a76d06afcf0d5595e58567a7c8ed7ce90676.zip
Added example and added setting pin 11 to output
-rw-r--r--DDS.cpp3
-rw-r--r--examples/DDS/DDS.pde40
2 files changed, 43 insertions, 0 deletions
diff --git a/DDS.cpp b/DDS.cpp
index 8971424..b4dc76e 100644
--- a/DDS.cpp
+++ b/DDS.cpp
@@ -74,6 +74,9 @@ DDS::DDS(double startfreq=1000)
SetDDSTimers(1);
SetFreq(startfreq);
+ //activate outputs on D11
+ pinMode(11, OUTPUT);
+
}
diff --git a/examples/DDS/DDS.pde b/examples/DDS/DDS.pde
new file mode 100644
index 0000000..9257c02
--- /dev/null
+++ b/examples/DDS/DDS.pde
@@ -0,0 +1,40 @@
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with This program. If not, see <http://www.gnu.org/licenses/>.
+
+//Note that this is a limited implementation of the DominoEX spec, it
+//currently has no support for the secondary alphabet, as such it is good
+//practise to continually transmit as this will help the receiver
+//maintain sync
+
+// DDS components based on:
+// DDS Sine Generator mit ATMEGS 168
+// Timer2 generates the 31250 KHz Clock Interrupt
+//
+// KHM 2009 / Martin Nawrath
+// Kunsthochschule fuer Medien Koeln
+// Academy of Media Arts Cologne
+
+#include <DDS.h>
+
+DDS myDDS(1500);
+
+void setup()
+{
+ myDDS.SetFreq(1500); //get the frequncy from the DominoEX object
+
+}
+void loop()
+{
+ //do nothing
+
+ }