![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
IIR filter of cascade form using float type operations and coefficients for ST Nucleo F401RE.
Diff: main.cpp
- Revision:
- 4:83e5419d22bb
- Parent:
- 2:d4999d914eee
- Child:
- 6:9b78c8c6ed27
diff -r a9bccab74012 -r 83e5419d22bb main.cpp --- a/main.cpp Wed Oct 22 09:07:55 2014 +0000 +++ b/main.cpp Thu Oct 23 00:25:44 2014 +0000 @@ -2,7 +2,7 @@ // IIR フィルタ,縦続形,float で演算 // Analog Input : A0 // Analog Output: MCP4922 using SPI -// 2014/10/20, Copyright (c) 2014 MIKAMI, Naoki +// 2014/10/23, Copyright (c) 2014 MIKAMI, Naoki //-------------------------------------------------------------- #include "mbed.h" @@ -30,9 +30,9 @@ { 1.942552E+00f, -9.865720E-01f, -1.942961E+00f, 1.000000E+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_(DAC_MCP4922::DAC_A); // for DA +const int FS_ = 12000; // Sampling frequency: 12 kHz +ADC_Base adc_(A0, FS_); // for AD +DAC_MCP4922 myDac_; // for DA int main() {