CW Decoder (Morse code decoder) 1st release version. mbed = 131 revision (Not latest) is used. Only run on DISCO-F746NG mbed board.

Dependencies:   BSP_DISCO_F746NG F746_GUI F746_SAI_IO LCD_DISCO_F746NG TS_DISCO_F746NG UIT_FFT_Real mbed

Base on F746_Spectrogram program created by 不韋 呂-san.
/users/MikamiUitOpen/code/F746_Spectrogram/
Thanks 不韋 呂-san to use fundamental parts such as FFT, SAI, GUI and other useful subroutines.
You do NOT need any modification for mbed hardware and NO additional circuits.
The mbed board read CW tone from your receiver speaker via MEMES microphone (on board) and show it on the screen.

MySpectrogram/AnalysisBase.cpp

Committer:
kenjiArai
Date:
2017-02-05
Revision:
0:e608fc311e4e

File content as of revision 0:e608fc311e4e:

//-------------------------------------------------------
//  Base abstract class for spectrum analysis
//
//  2016/07/23, Copyright (c) 2016 MIKAMI, Naoki
//-------------------------------------------------------

#include "AnalysisBase.hpp"

namespace Mikami
{
    AnalyzerBase::AnalyzerBase(int nData, int nFft, int nUse)
        : N_DATA_(nData), N_FFT_(nFft),
          fft_(nFft), wHm_(nData-1, nUse),
          xData_(nUse), wData_(nUse) {}

    void AnalyzerBase::Execute(const float xn[], float db[])
    {
        // Differencing
        for (int n=0; n<N_DATA_-1; n++)
            xData_[n] = xn[n+1] - 0.8f*xn[n];
            
        // Windowing
        wHm_.Execute(xData_, wData_);
            
        Analyze(wData_, db);
    }
}