Source lists for AD converter is explained on "Interface" No.10, CQ publishing Co.,Ltd, 2014. Source lists for DA converter is explained on "Interface" No.11, CQ publishing Co.,Ltd, 2014. 本ライブラリのADコンバータ用のソースリストについては,CQ出版社のインターフェース 2014年10月号に載っています. DAコンバータ用のソースリストについての説明は,CQ出版社のインターフェース 2014年11月号に載っています.

Dependents:   FFT_Sampling FIR_LPF_Direct FIR_LPF_Symmetry IIR_LPF ... more

Fork of SignalProcessingIO by CQpub0 Mikami

AdcInternal.hpp

Committer:
CQpub0Mikami
Date:
2014-07-29
Revision:
2:2a8a3dc3da8e
Parent:
0:a2cdffe24b67

File content as of revision 2:2a8a3dc3da8e:

//------------------------------------------------------
// Class for internal ADC for signal processing
//
// Copyright (c) 2014 MIKAMI, Naoki,  2014/06/17
//------------------------------------------------------

#ifndef ADC_INTERNAL_HPP
#define ADC_INTERNAL_HPP

#include "mbed.h"

namespace Mikami
{
    class Adc
    {
    public:
        explicit Adc(PinName pin = A0)
                    : adc_(pin) {}
        float Read()
            { return 2*(adc_.read() - 0.5f); }
    private:
        Adc(const Adc&);
        Adc& operator=(const Adc&);
        AnalogIn adc_;
    };
}
#endif  // ADC_INTERNAL_HPP