Example outputting saw-tooth waveform on DAC

Dependencies:   mbed

main.cpp

Committer:
Richard37
Date:
2014-12-10
Revision:
0:1d3353c6dd1b

File content as of revision 0:1d3353c6dd1b:

#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);
      
    }
}