![](/media/cache/profiles/6c18d13e9a2e04855a83a6ce1a9117fe.jpg.50x50_q85.jpg)
Simple demo to check the DAC output by a DVM. The output voltage steps up by 0.42 V in each 5 s.
Diff: main.cpp
- Revision:
- 0:6dbf8446ecb2
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