Class for AD7390, a 12 bit SPI driven external DAC from Analog Devices.
Datasheet - http://www.analog.com/static/imported-files/data_sheets/AD7390_7391.pdf
Diff: AD7390.h
- Revision:
- 3:37ec9ea72264
- Parent:
- 1:19818c103c9c
- Child:
- 4:0c327b37ddc1
--- a/AD7390.h Sat Apr 05 21:06:17 2014 +0000 +++ b/AD7390.h Sun Apr 06 20:07:38 2014 +0000 @@ -4,17 +4,17 @@ #include "mbed.h" class AD7390 { //Create an AD7390 instance + SPI& spi; + DigitalOut reset, latch; public: - AD7390(PinName data, PinName clock, PinName resetpin, PinName latchpin, float RefV, unsigned int feq); //RefV set up for user reference voltage + AD7390(SPI& spi, PinName resetpin, PinName latchpin); //RefV set up for user reference voltage void Reset(); void Latch(); - void Write(float Volts); - void WriteL(float volts); - float RefV; - unsigned int freq; + void Init(); private: - DigitalOut reset, latch; - SPI spi; + void Write(float Volts, float RefV); + void WriteL(float volts, float RefV); + }; #endif \ No newline at end of file