Class library for internal ADC and DAC connected by SPI. This library support clock generator using TIM3 for switched-capacitor filter to smooth output signal of DAC. This library includes derivative class to support interrupt occured in end of AD conversion. Validated for ST Nucleo F401RE, F411RE. 内蔵 ADC と,SPI 接続の DAC のためのクラスライブラリ.DAC の出力信号を平滑化するためのスイッチトキャパシタフィルタ用のクロックは TIM3 を使用.ST Nucleo F401RE,F411RE で動作を確認.

Dependents:   UITDSP_ADDA_Example UIT2_MovingAv_Intr UIT2_VariableFIR UIT2_VowelSynthesizer ... more

Revision:
2:0cf4cc40ee02
Parent:
0:2cdd5c91d975
Child:
4:03c4518de836
--- a/DAC_MCP4922.hpp	Mon Feb 23 13:38:51 2015 +0000
+++ b/DAC_MCP4922.hpp	Tue Feb 24 02:57:27 2015 +0000
@@ -1,7 +1,8 @@
 //------------------------------------------------------
-//  Class for single DAC in MCP4922
+// Class for single DAC in MCP4922 -- Header
+//      Fast version
 //
-//  2015/01/31, Copyright (c) 2015 MIKAMI, Naoki
+// 2015/02/03, Copyright (c) 2015 MIKAMI, Naoki
 //------------------------------------------------------
 
 #ifndef DAC_MCP4922_HPP
@@ -26,6 +27,9 @@
                 : DAC_MCP4921(mosi, sclk, cs, ldac),
                   wcr_(dac | 0x3000) {}
 
+    protected:
+        void SetCR(DAC dac) { wcr_ = dac  | 0x3000; }
+
     private:
         uint16_t wcr_;  // write command register
 
@@ -44,4 +48,3 @@
     };
 }
 #endif  // DAC_MCP4922_HPP
-