AD9857 IQ DDS Digital Up Converter Experiment using Nucleo F401

Dependencies:   mbed

Digital Signal Processing for IQ Quadradure Modulation DDS AD9857 using Nucleo F401.

see http://ttrftech.tumblr.com/post/114310226891/

Files at this revision

API Documentation at this revision

Comitter:
edy555
Date:
Mon Mar 23 16:03:07 2015 +0000
Parent:
3:e6897d74d6bf
Child:
5:75c26157a53a
Commit message:
fix saturation in am modulation

Changed in this revision

dsp.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/dsp.cpp	Mon Mar 23 15:00:50 2015 +0000
+++ b/dsp.cpp	Mon Mar 23 16:03:07 2015 +0000
@@ -516,8 +516,7 @@
         // fetch only R-ch (top half of word) and halving it
         int16_t x = s >> 16;
         // add DC and set zero at quadrature
-        x /= 2;
-        x += 0x4000;
-        *dst++ = x & 0xffff;
+        x = __SSAT(x + 0x3800, 16);
+        *dst++ = __PKHBT(x, x, 16);
     }        
 }
\ No newline at end of file
--- a/main.cpp	Mon Mar 23 15:00:50 2015 +0000
+++ b/main.cpp	Mon Mar 23 16:03:07 2015 +0000
@@ -482,7 +482,7 @@
     MODE_NUM
 };
 
-int mode = MODE_USB;
+int mode = MODE_AM;//MODE_USB;
 
 const char *mode_names[] = {
     "NFM", "AM", "USB", "LSB", "IQ"