Simple demo to check the DAC output by a DVM. The output voltage steps up by 0.42 V in each 5 s.

Dependencies:   mbed

Fork of 05_dac12_test by Istvan Cserny

main.cpp

Committer:
icserny
Date:
2015-11-18
Revision:
0:6dbf8446ecb2

File content as of revision 0:6dbf8446ecb2:

/** 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);
        }
    }
}