The experiment using this program is introduced in "Interface" No.10, CQ publishing Co.,Ltd, 2014. 本プログラムを使った実験は,CQ出版社のインターフェース 2014年10月号で紹介しています.
Dependencies: DSProcessingIO mbed
Revision 0:512bfb9310b2, committed 2014-07-15
- Comitter:
- CQpub0Mikami
- Date:
- Tue Jul 15 08:05:58 2014 +0000
- Child:
- 1:86f35f76ab5c
- Commit message:
- 1
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AD_DA.cpp Tue Jul 15 08:05:58 2014 +0000 @@ -0,0 +1,26 @@ +//-------------------------------------------------------------- +// Example for using Adc and Dac classes +// Copyright (c) 2014 MIKAMI, Naoki, 2014/07/14 +//-------------------------------------------------------------- + +#include "mbed.h" +#include "AdcInternal.hpp" +#include "MCP4922Single.hpp" + +using namespace Mikami; + +Adc adc_; +Dac dacA_(Dac::DAC_A); +Ticker timer_; + +void TimerIsr() +{ + float value = adc_.Read(); // AD + dacA_.Write(value); // DA +} + +int main() +{ + timer_.attach_us(&TimerIsr, 20); + while (true) {} +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DSProcessingIO.lib Tue Jul 15 08:05:58 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/CQpub0Mikami/code/DSProcessingIO/#c3f647a89947
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jul 15 08:05:58 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file