Class for AD7390, a 12 bit SPI driven external DAC from Analog Devices.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "AD7390.h"
00003 
00004 SPI spi(p5,p6,p7);
00005 AD7390 Test(spi,p10,p11);
00006 
00007 int main(){
00008     Test.Init(10000000);
00009 while (true){
00010     Test.Reset();
00011     for (float V = 0; V !=3.3; V=V+0.005){
00012         Test.WriteL(V,3.3);
00013         wait(0.02);
00014     }
00015 
00016 }
00017 }
00018