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/

Revision:
4:dfd05c26edbe
Parent:
3:e6897d74d6bf
Child:
5:75c26157a53a
diff -r e6897d74d6bf -r dfd05c26edbe dsp.cpp
--- 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