Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DSP_MultirateLinearphase
main.cpp
00001 //---------------------------------------------------------------------- 00002 // AD 変換の結果をそのまま DA 変換する,DA 出力はアップサンプリング使用 00003 // 00004 // 2021/12/13, Copyright (c) 2021 MIKAMI, Naoki 00005 //---------------------------------------------------------------------- 00006 00007 #include "MultirateLiPh.hpp" 00008 #pragma diag_suppress 870 // マルチバイト文字使用の警告抑制のため 00009 using namespace Mikami; 00010 00011 const float FS_ = 10.0f; // 入力の標本化周波数: 10 kHz 00012 MultirateLiPh myAdDa_(FS_); // 出力標本化周波数を4倍にするオブジェクト 00013 00014 // ADC 変換終了割込みに対する割込みサービス・ルーチン 00015 void AdcIsr() 00016 { 00017 float xn = myAdDa_.Input(); // 入力 00018 myAdDa_.Output(xn); // 出力 00019 } 00020 00021 int main() 00022 { 00023 printf("\r\nAD 変換の結果をそのまま DA 変換します\r\n"); 00024 printf("DA 変換の際はアップサンプリングを行います\r\n"); 00025 00026 myAdDa_.Start(&AdcIsr); // 標本化を開始する 00027 while (true) {} 00028 }
Generated on Thu Jul 21 2022 08:21:32 by
