Istvan Cserny
/
05_dac12_test
Simple demo to check the DAC output by a DVM. The output voltage steps up by 0.42 V in each 5 s.
Revision 0:6dbf8446ecb2, committed 2015-11-18
- Comitter:
- icserny
- Date:
- Wed Nov 18 15:26:39 2015 +0000
- Commit message:
- First version
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 |
diff -r 000000000000 -r 6dbf8446ecb2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Nov 18 15:26:39 2015 +0000 @@ -0,0 +1,20 @@ +/** 05_dac12_demo + * Simple demo to check the DAC output by a DVM + * The output voltage steps up in each 5 seconds + * by about 0.42 V (assuming VREFH = 3.3V) + */ + +#include "mbed.h" + +AnalogOut aout(PTE30); + +int main() +{ + + while(1) { + for (uint16_t i = 0; i < 0xffff; i += 0x2000) { + aout.write_u16(i); + wait(5); + } + } +} \ No newline at end of file
diff -r 000000000000 -r 6dbf8446ecb2 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Nov 18 15:26:39 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11 \ No newline at end of file