A port of AD9850/51 code from Arduino source. This port allows direct input of the frequency in Mega Hertz rather than a series of Hex digits as in Liam Goudges program.

Dependencies:   mbed

Revision:
1:44d13dabc8e9
Parent:
0:bea0000c5526
--- a/main.cpp	Sun Feb 09 23:13:55 2014 +0000
+++ b/main.cpp	Mon Feb 10 00:17:37 2014 +0000
@@ -1,12 +1,12 @@
 #include "mbed.h"
 
 /* 
- * A simple single freq AD9850 Arduino test script
- * Original AD9851 DDS sketch by Andrew Smallbone at www.rocketnumbernine.com
- * Modified for testing the inexpensive AD9850 ebay DDS modules
+ * This program is a port of an AD9851 DDS Arduino sketch by Andrew Smallbone at www.rocketnumbernine.com
+ * It was later modified for testing the inexpensive AD9850 ebay DDS modules
  * Pictures and pinouts at nr8o.dhlpilotcentral.com
- * 9850 datasheet at http://www.analog.com/static/imported-files/data_sheets/AD9850.pdf
+ * AD9850 datasheet at http://www.analog.com/static/imported-files/data_sheets/AD9850.pdf
  * Use freely
+ * Ported by Alan Matheson on 20 February 2014
  */
  
  
@@ -18,6 +18,10 @@
  
  #define pulseHigh(pin) {pin = 1; pin = 0; }
 
+ // Pins used are the same as those used in the MBED driver for AD9850 digital synthesizer using hacked SPI interface
+ // by Liam Goudge Sept 2013
+ // This program allows the desired frequency in MegaHertz to be directly entered and uses bitbanging rather than the SPI pins.
+
 
 
  // configure data pins for output
@@ -67,17 +71,13 @@
  pulseHigh(FQ_UD);  // this pulse enables serial mode - Datasheet page 12 figure 10
 
 
-
-
-
 while(1)
   {
-   frequency = 10.0034;
-     {
-      sendFrequency(frequency);
-      pulseHigh(FQ_UD);
-     wait(5.0);
-          } 
+   frequency = 7.080;
+   sendFrequency(frequency);
+   pulseHigh(FQ_UD);
+   wait(5.0);
+   } 
  }
 
 }