![](/media/cache/profiles/f0fcf351df4eb6786e9bb6fc4e2dee02.jpg.50x50_q85.jpg)
CW Decoder (Morse code decoder) 1st release version. Only run on Nucleo-F446RE mbed board.
Dependencies: Array_Matrix F446_AD_DA ST7565_SPI_LCD TextLCD UIT_FFT_Real
Fork of F446_MySoundMachine by
Base on F446_MySoundMachine program created by 不韋 呂-san.
Thanks to 不韋 呂-san making fundamental part such as FFT and ADC high speed interrupt driven program.
I just combined LCD and show CW code.
Diff: SignalProcessing/BilinearDesignLH.hpp
- Revision:
- 6:5e21ac9f0550
- Parent:
- 5:503bd366fd73
--- a/SignalProcessing/BilinearDesignLH.hpp Tue Jan 31 12:52:35 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -//------------------------------------------------------------------------ -// Design of Butterworth LPF and HPF using bilinear transform -- Header -// -// 2016/03/31, Copyright (c) 2016 MIKAMI, Naoki -//------------------------------------------------------------------------ - -#ifndef BILINEAR_BUTTERWORTH_HPP -#define BILINEAR_BUTTERWORTH_HPP - -#include "mbed.h" -#include <complex> // requisite -#include "Array.hpp" - -namespace Mikami -{ - typedef complex<float> Complex; // define "Complex" - - class BilinearDesign - { - public: - struct Coefs { float a1, a2, b1, b2; }; - enum Type { LPF, HPF }; - - // Constructor - BilinearDesign(int order, float fs) - : PI_FS_(PI_/fs), ORDER_(order), - sP_(order/2), zP_(order/2), ck_(order/2) {} - - // Destractor - virtual ~BilinearDesign() {} - - // Execution of design - void Execute(float fc, Type pb, Coefs c[], float& g); - - private: - static const float PI_ = 3.1415926536f; - const float PI_FS_; - const int ORDER_; - - Array<Complex> sP_; // Poles on s-plane - Array<Complex> zP_; // Poles on z-plane - Array<Coefs> ck_; // Coefficients of transfer function for cascade form - - float gain_; // Gain factor for cascade form - - void Butterworth(); - void Bilinear(float fc); - void ToCascade(Type pb); - void GetGain(Type pb); - void GetCoefs(Coefs c[], float& gain); - }; -} -#endif // BILINEAR_BUTTERWORTH_HPP