IIR filter of cascade form using Biquad class for ST Nucleo F401RE.
Dependencies: UITDSP_ADDA mbed
Diff: main.cpp
- Revision:
- 7:ee6c82112718
- Parent:
- 5:14bb865c7eee
diff -r a8cb3a877896 -r ee6c82112718 main.cpp --- a/main.cpp Sat Nov 15 06:20:51 2014 +0000 +++ b/main.cpp Fri Sep 04 09:07:38 2015 +0000 @@ -2,13 +2,11 @@ // IIR フィルタ,縦続形,float で演算, Biquad クラス利用 // Analog Input : A0 // Analog Output: MCP4922 using SPI -// 2014/11/12, Copyright (c) 2014 MIKAMI, Naoki +// 2015/07/03, Copyright (c) 2015 MIKAMI, Naoki //-------------------------------------------------------------- -#include "mbed.h" - -#include "ADC_Base.hpp" // for ADC not using interrupt -#include "DAC_MCP4922.hpp" // for DAC MCP4922 +#include "ADC_BuiltIn.hpp" // for ADC not using interrupt +#include "DAC_MCP4921.hpp" // for DAC MCP4921, MCP4922 #include "Biquad.hpp" // 2nd-ordered IIR filter using namespace Mikami; @@ -28,9 +26,9 @@ { 1.942552E+00f, -9.865720E-01f, -1.942961E+00f, 1.0E+00f}}; // 3段目 const float g0_ = 1.000028E-02f; // 利得定数 -const int FS_ = 12000; // Sampling frequency: 12 kHz -ADC_Base adc_(A0, FS_); // for AD -DAC_MCP4922 myDac_; // for DA +const int FS_ = 12000; // Sampling frequency: 12 kHz +ADC_BuiltIn adc_(A0, FS_); // for AD +DAC_MCP4921 myDac_; // for DA int main() {