Example outputting saw-tooth waveform on DAC
Dependencies: mbed
Revision 0:1d3353c6dd1b, committed 2014-12-10
- Comitter:
- Richard37
- Date:
- Wed Dec 10 15:15:06 2014 +0000
- Commit message:
- Example outputting saw-tooth waveform on DAC
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 10 15:15:06 2014 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" + + +AnalogOut my_output(PA_4); + +Serial pc(D8, D2); + +int x=0; + +uint16_t aout; + + +int main() { + while(1) { + x=0; + while( x<4096) + { + my_output.write_u16(x); + x=x+1; + wait_us(50); + } + + + //pc.printf("%d\n\r", x); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Dec 10 15:15:06 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file