This is a program which can be used for a Direct Digital Synthesizer (DDS), model AD9954. A phase step to a desired final value or a phase ramp from 0 to 359 degree is triggered upon a start signal received by the TeraTerm-Terminal. The RAM is not used in this case.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ahambi
Date:
Fri Nov 09 15:45:19 2012 +0000
Parent:
6:1cf1523d29f3
Commit message:
menu added;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Nov 09 15:08:10 2012 +0000
+++ b/main.cpp	Fri Nov 09 15:45:19 2012 +0000
@@ -1,3 +1,7 @@
+//      *******************************************
+//      *** phase ramps & steps without the RAM ***
+//      *******************************************
+
 #include "mbed.h"
 #include "AD9954.h"
 
@@ -23,6 +27,14 @@
     
 int main() {
         
+        pc.printf("*************************************************** \n \r"); 
+        pc.printf("*** Phase steps and slow phase ramp without RAM *** \n \r"); 
+        pc.printf("*************************************************** \n \r"); 
+        pc.printf("Enter: \n \r");
+        pc.printf("'1' or '2' --> which output channel should be ramped. \n \r"); 
+        pc.printf("'p' --> enter the final phase value in degree. The DDS will start to make phase steps 0-->final value with a 5 kHz frequency. The signal can be observed with the mbed trigger on pin 13 \n \r"); 
+        pc.printf("'r' --> A phase ramp from 0-->359 degree in 700 steps is started. The ramp takes approximately a millisecond. It is repeated until another key is pressed.\n \r");
+        
         double freq0;
         freq0 = 80.0e6;         // Output frequency of both output channels
         double clock = 400.0e6; // Frequency of external clock signal