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 AD7390.h Source File

AD7390.h

00001 #ifndef __AD7390_H__
00002 #define __AD7390_H__
00003 
00004 #include "mbed.h"
00005 
00006 class AD7390    {                                                //Create an AD7390 instance
00007     SPI& spi;
00008     DigitalOut reset, latch;
00009     public:
00010         AD7390(SPI& spi, PinName resetpin, PinName latchpin);    //RefV set up for user reference voltage
00011         void Reset();
00012         void Latch();
00013         void Init(int Frequency);                                //Set SPI frequency during initialisation
00014         void Write(float Volts, float RefV);
00015         void WriteL(float volts, float RefV);
00016     private:
00017         
00018 
00019 };
00020 #endif