AD5384 DAC.

Fork of AD5384 by wimbeaumont Project

Revision:
2:fc250e37a028
Parent:
1:d2d6341d3e97
--- a/AD5384.cpp	Sun Oct 05 17:10:03 2014 +0000
+++ b/AD5384.cpp	Mon Oct 06 22:25:16 2014 +0000
@@ -15,9 +15,11 @@
  * v1.10  initial release version
  * v1.11  added init 1 and init 2 function an ctrlreg defs 
  * v1.12  
+ * v1.13  corrected channel mask from 0x1F  to 0x3F  
+ * 
  */
 
-#define AD5384_SRC_VERSION "1.12"
+#define AD5384_SRC_VERSION "1.13"
 
 #define  M_DATA_R  0x3
 #define  M_OFFS_R  0x2 
@@ -85,11 +87,11 @@
 
 
 u32 AD5384::format_word(u8 mode,u8 ch,u8 rw,u16 data) {
-      // not clear what is the MSB bit ,set  it to zero
+      // MSB set to 0 , toggle mode not supported
             u32 shift = (u32) rw&1;            
             u32 word= shift << 22;
            
-            shift= (u32)(ch &0x1F);
+            shift= (u32)(ch &0x3F);
             shift = shift << 16;
             word = word | shift;
            
@@ -230,21 +232,3 @@
      return (u16) data;
 }    
 
-
-
-
-
-#include "sscm_comm.h" 
-/*
- 
-u16 AD5384::get_src_version_nr(){
-       return sscm_comm::get_hex_version_nr(VERSION_AD5384_SRC);
-}    
-
-// returns the version number of hdr of this  module 
-u16 AD5384::get_hdr_version_nr(){
-      return sscm_comm::get_hex_version_nr(VERSION_AD5384_HDR);
-
-}
-
-*/