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

Dependencies:   mbed

Datasheet - http://www.analog.com/static/imported-files/data_sheets/AD7390_7391.pdf

Committer:
cassar10
Date:
Sat Apr 05 19:08:44 2014 +0000
Revision:
0:82cd70f9fc3f
Child:
1:19818c103c9c
Class looks to be set up. Need to test and set up a conversion to get correct voltage out.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cassar10 0:82cd70f9fc3f 1 #ifndef __AD7390_H__
cassar10 0:82cd70f9fc3f 2 #define __AD7390_H__
cassar10 0:82cd70f9fc3f 3
cassar10 0:82cd70f9fc3f 4 #include "mbed.h"
cassar10 0:82cd70f9fc3f 5
cassar10 0:82cd70f9fc3f 6 class AD7390 { //Create an AD7390 instance
cassar10 0:82cd70f9fc3f 7 public:
cassar10 0:82cd70f9fc3f 8 AD7390(PinName data, PinName clock, PinName resetpin, PinName latchpin, float RefV);
cassar10 0:82cd70f9fc3f 9 void Reset();
cassar10 0:82cd70f9fc3f 10 void Latch();
cassar10 0:82cd70f9fc3f 11 int RefV;
cassar10 0:82cd70f9fc3f 12 private:
cassar10 0:82cd70f9fc3f 13 DigitalOut reset, latch;
cassar10 0:82cd70f9fc3f 14 SPI spi;
cassar10 0:82cd70f9fc3f 15
cassar10 0:82cd70f9fc3f 16 };
cassar10 0:82cd70f9fc3f 17 #endif